Support Enterprise automation account plans (#36228)

## What changed

- Recognize `enterprise_cbp_automation` as an Enterprise workspace plan in authentication, backend responses, and app-server account and rate-limit APIs.
- Expose the plan in generated protocol schemas and display it as `Enterprise (Automation)` in account status.
- Apply existing workspace eligibility and Business usage-limit behavior to the new plan.

## Testing

- Cover JWT parsing, plan conversion and serialization, app-server responses, workspace eligibility, usage-limit formatting, and TUI status rendering.

GitOrigin-RevId: d84ae2be3dd60fe398f226e6dc434efe27a387a5
This commit is contained in:
sashank-oai authored and copyberry committed 2026-07-30 21:49:53 +00:00
1 parent a01a2d9146
commit 3016671bb0
22 files changed
+106 -14

No files matched your search

+21
View File
@@ -122,6 +122,27 @@ fn id_token_info_parses_usage_based_business_plans() {
assert_eq!(enterprise_cbp.is_workspace_account(), true);
}
#[test]
fn id_token_info_parses_enterprise_cbp_automation_plan() {
let jwt = fake_jwt(serde_json::json!({
"email": "service-account@example.com",
"https://api.openai.com/auth": {
"chatgpt_plan_type": "enterprise_cbp_automation"
}
}));
let info = parse_chatgpt_jwt_claims(&jwt).expect("should parse");
assert_eq!(
info.get_chatgpt_plan_type().as_deref(),
Some("Enterprise (Automation)")
);
assert_eq!(
info.get_chatgpt_plan_type_raw().as_deref(),
Some("enterprise_cbp_automation")
);
assert_eq!(info.is_workspace_account(), true);
}
#[test]
fn id_token_info_parses_self_serve_business_prolite_plan() {
let jwt = fake_jwt(serde_json::json!({