mirror of
https://github.com/openai/codex.git
synced 2026-11-08 00:36:31 +00:00
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:
1 parent
a01a2d9146
commit
3016671bb0
22 files changed
+106
-14
No files matched your search
@@ -97,7 +97,9 @@ pub(crate) fn compose_account_display(
|
||||
}
|
||||
|
||||
pub(crate) fn plan_type_display_name(plan_type: PlanType) -> String {
|
||||
if plan_type.is_team_like() {
|
||||
if plan_type == PlanType::EnterpriseCbpAutomation {
|
||||
"Enterprise (Automation)".to_string()
|
||||
} else if plan_type.is_team_like() {
|
||||
"Business".to_string()
|
||||
} else if plan_type.is_business_like() {
|
||||
"Enterprise".to_string()
|
||||
@@ -222,6 +224,7 @@ mod tests {
|
||||
(PlanType::SelfServeBusinessProLite, "Business"),
|
||||
(PlanType::SelfServeBusinessUsageBased, "Business"),
|
||||
(PlanType::Business, "Enterprise"),
|
||||
(PlanType::EnterpriseCbpAutomation, "Enterprise (Automation)"),
|
||||
(PlanType::EnterpriseCbpUsageBased, "Enterprise"),
|
||||
(PlanType::Enterprise, "Enterprise"),
|
||||
(PlanType::Edu, "Edu"),
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ expression: sanitized
|
||||
│ Directory: [[workspace]] │
|
||||
│ Permissions: Custom (workspace with network access, Ask for approval) │
|
||||
│ Agents.md: <none> │
|
||||
│ Account: Enterprise │
|
||||
│ Account: Enterprise (Automation) │
|
||||
│ │
|
||||
│ Limits: data not available yet │
|
||||
╰──────────────────────────────────────────────────────────────────────────╯
|
||||
@@ -365,7 +365,7 @@ async fn status_snapshot_shows_chatgpt_plan_without_email() {
|
||||
|
||||
write_chatgpt_auth(
|
||||
temp_home.path(),
|
||||
ChatGptAuthFixture::new("access-chatgpt").plan_type("enterprise"),
|
||||
ChatGptAuthFixture::new("access-chatgpt").plan_type("enterprise_cbp_automation"),
|
||||
AuthCredentialsStoreMode::File,
|
||||
)
|
||||
.expect("write email-less ChatGPT auth");
|
||||
@@ -384,7 +384,7 @@ async fn status_snapshot_shows_chatgpt_plan_without_email() {
|
||||
account_display,
|
||||
StatusAccountDisplay::ChatGpt {
|
||||
email: None,
|
||||
plan: Some("Enterprise".to_string()),
|
||||
plan: Some("Enterprise (Automation)".to_string()),
|
||||
}
|
||||
);
|
||||
let usage = TokenUsage::default();
|
||||
|
||||
Reference in new issue
Block a user