Support the ent26 enterprise plan (#35238)

## What changed

- Recognize `ent26` in authentication, account protocol, backend rate-limit
  payloads, and generated app-server schemas.
- Treat it as an enterprise workspace plan for cloud-config eligibility and
  business-style usage-limit guidance.
- Cover token parsing, serialization, backend mapping, plan classification,
  cloud-config access, and usage-limit formatting with tests.

GitOrigin-RevId: 537d897c8b1d80bcdb66d0fd402563fbb8c5a277
This commit is contained in:
bwanner-oai authored and copyberry committed 2026-07-24 20:00:59 +00:00
1 parent 99744cfe04
commit 544007d006
16 files changed
+71 -13

No files matched your search

+15
View File
@@ -69,6 +69,21 @@ fn id_token_info_parses_hc_plan_as_enterprise() {
assert_eq!(info.is_workspace_account(), true);
}
#[test]
fn id_token_info_parses_ent26_plan() {
let fake_jwt = fake_jwt(serde_json::json!({
"email": "user@example.com",
"https://api.openai.com/auth": {
"chatgpt_plan_type": "ent26"
}
}));
let info = parse_chatgpt_jwt_claims(&fake_jwt).expect("should parse");
assert_eq!(info.get_chatgpt_plan_type().as_deref(), Some("Enterprise"));
assert_eq!(info.get_chatgpt_plan_type_raw().as_deref(), Some("ent26"));
assert_eq!(info.is_workspace_account(), true);
}
#[test]
fn id_token_info_parses_usage_based_business_plans() {
let self_serve_business_jwt = fake_jwt(serde_json::json!({