diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index 5d7c1549a..c3ab83766 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -2010,6 +2010,7 @@ "go", "plus", "pro", + "prolite", "team", "self_serve_business_usage_based", "business", diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 2c575202e..dd839cd58 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -9924,6 +9924,7 @@ "go", "plus", "pro", + "prolite", "team", "self_serve_business_usage_based", "business", diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 56497c786..66b91082e 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -6720,6 +6720,7 @@ "go", "plus", "pro", + "prolite", "team", "self_serve_business_usage_based", "business", diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountRateLimitsUpdatedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/AccountRateLimitsUpdatedNotification.json index d1812f069..67a5f055b 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountRateLimitsUpdatedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/AccountRateLimitsUpdatedNotification.json @@ -28,6 +28,7 @@ "go", "plus", "pro", + "prolite", "team", "self_serve_business_usage_based", "business", diff --git a/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json index f2cf7cb3a..64109ca2a 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/AccountUpdatedNotification.json @@ -33,6 +33,7 @@ "go", "plus", "pro", + "prolite", "team", "self_serve_business_usage_based", "business", diff --git a/codex-rs/app-server-protocol/schema/json/v2/GetAccountRateLimitsResponse.json b/codex-rs/app-server-protocol/schema/json/v2/GetAccountRateLimitsResponse.json index 23f7d3cfd..2d34ee47d 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/GetAccountRateLimitsResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/GetAccountRateLimitsResponse.json @@ -28,6 +28,7 @@ "go", "plus", "pro", + "prolite", "team", "self_serve_business_usage_based", "business", diff --git a/codex-rs/app-server-protocol/schema/json/v2/GetAccountResponse.json b/codex-rs/app-server-protocol/schema/json/v2/GetAccountResponse.json index acaa77918..853492715 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/GetAccountResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/GetAccountResponse.json @@ -51,6 +51,7 @@ "go", "plus", "pro", + "prolite", "team", "self_serve_business_usage_based", "business", diff --git a/codex-rs/app-server-protocol/schema/typescript/PlanType.ts b/codex-rs/app-server-protocol/schema/typescript/PlanType.ts index ad5bcab38..44891467e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/PlanType.ts +++ b/codex-rs/app-server-protocol/schema/typescript/PlanType.ts @@ -2,4 +2,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PlanType = "free" | "go" | "plus" | "pro" | "team" | "self_serve_business_usage_based" | "business" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown"; +export type PlanType = "free" | "go" | "plus" | "pro" | "prolite" | "team" | "self_serve_business_usage_based" | "business" | "enterprise_cbp_usage_based" | "enterprise" | "edu" | "unknown"; diff --git a/codex-rs/backend-client/src/client.rs b/codex-rs/backend-client/src/client.rs index 6049c1697..20baa1cfe 100644 --- a/codex-rs/backend-client/src/client.rs +++ b/codex-rs/backend-client/src/client.rs @@ -473,6 +473,7 @@ impl Client { crate::types::PlanType::Go => AccountPlanType::Go, crate::types::PlanType::Plus => AccountPlanType::Plus, crate::types::PlanType::Pro => AccountPlanType::Pro, + crate::types::PlanType::ProLite => AccountPlanType::ProLite, crate::types::PlanType::Team => AccountPlanType::Team, crate::types::PlanType::SelfServeBusinessUsageBased => { AccountPlanType::SelfServeBusinessUsageBased @@ -486,7 +487,8 @@ impl Client { crate::types::PlanType::Guest | crate::types::PlanType::FreeWorkspace | crate::types::PlanType::Quorum - | crate::types::PlanType::K12 => AccountPlanType::Unknown, + | crate::types::PlanType::K12 + | crate::types::PlanType::Unknown => AccountPlanType::Unknown, } } diff --git a/codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs b/codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs index 300674357..4d9ec1e36 100644 --- a/codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs +++ b/codex-rs/codex-backend-openapi-models/src/models/rate_limit_status_payload.rs @@ -65,6 +65,8 @@ pub enum PlanType { Plus, #[serde(rename = "pro")] Pro, + #[serde(rename = "prolite")] + ProLite, #[serde(rename = "free_workspace")] FreeWorkspace, #[serde(rename = "team")] @@ -85,4 +87,6 @@ pub enum PlanType { Enterprise, #[serde(rename = "edu")] Edu, + #[serde(rename = "unknown", other)] + Unknown, } diff --git a/codex-rs/login/src/auth/manager.rs b/codex-rs/login/src/auth/manager.rs index 71857c970..15b129a16 100644 --- a/codex-rs/login/src/auth/manager.rs +++ b/codex-rs/login/src/auth/manager.rs @@ -314,6 +314,7 @@ impl CodexAuth { InternalKnownPlan::Go => AccountPlanType::Go, InternalKnownPlan::Plus => AccountPlanType::Plus, InternalKnownPlan::Pro => AccountPlanType::Pro, + InternalKnownPlan::ProLite => AccountPlanType::ProLite, InternalKnownPlan::Team => AccountPlanType::Team, InternalKnownPlan::SelfServeBusinessUsageBased => { AccountPlanType::SelfServeBusinessUsageBased diff --git a/codex-rs/login/src/token_data_tests.rs b/codex-rs/login/src/token_data_tests.rs index be160ecd6..aeb55ffb9 100644 --- a/codex-rs/login/src/token_data_tests.rs +++ b/codex-rs/login/src/token_data_tests.rs @@ -153,4 +153,10 @@ fn workspace_account_detection_matches_workspace_plans() { ..IdTokenInfo::default() }; assert_eq!(personal.is_workspace_account(), false); + + let personal = IdTokenInfo { + chatgpt_plan_type: Some(PlanType::Known(KnownPlan::ProLite)), + ..IdTokenInfo::default() + }; + assert_eq!(personal.is_workspace_account(), false); } diff --git a/codex-rs/protocol/src/account.rs b/codex-rs/protocol/src/account.rs index e9f2fc9ec..bb46329a5 100644 --- a/codex-rs/protocol/src/account.rs +++ b/codex-rs/protocol/src/account.rs @@ -12,6 +12,7 @@ pub enum PlanType { Go, Plus, Pro, + ProLite, Team, #[serde(rename = "self_serve_business_usage_based")] #[ts(rename = "self_serve_business_usage_based")] @@ -53,11 +54,19 @@ mod tests { .expect("enterprise cbp usage based should serialize"), "\"enterprise_cbp_usage_based\"" ); + assert_eq!( + serde_json::to_string(&PlanType::ProLite).expect("prolite should serialize"), + "\"prolite\"" + ); assert_eq!( serde_json::from_str::("\"self_serve_business_usage_based\"") .expect("self-serve business usage based should deserialize"), PlanType::SelfServeBusinessUsageBased ); + assert_eq!( + serde_json::from_str::("\"prolite\"").expect("prolite should deserialize"), + PlanType::ProLite + ); assert_eq!( serde_json::from_str::("\"enterprise_cbp_usage_based\"") .expect("enterprise cbp usage based should deserialize"), diff --git a/codex-rs/protocol/src/auth.rs b/codex-rs/protocol/src/auth.rs index 11455ec90..99e067bf2 100644 --- a/codex-rs/protocol/src/auth.rs +++ b/codex-rs/protocol/src/auth.rs @@ -16,6 +16,7 @@ impl PlanType { "go" => Self::Known(KnownPlan::Go), "plus" => Self::Known(KnownPlan::Plus), "pro" => Self::Known(KnownPlan::Pro), + "prolite" => Self::Known(KnownPlan::ProLite), "team" => Self::Known(KnownPlan::Team), "self_serve_business_usage_based" => { Self::Known(KnownPlan::SelfServeBusinessUsageBased) @@ -36,6 +37,7 @@ pub enum KnownPlan { Go, Plus, Pro, + ProLite, Team, #[serde(rename = "self_serve_business_usage_based")] SelfServeBusinessUsageBased, @@ -54,6 +56,7 @@ impl KnownPlan { Self::Go => "Go", Self::Plus => "Plus", Self::Pro => "Pro", + Self::ProLite => "Pro Lite", Self::Team => "Team", Self::SelfServeBusinessUsageBased => "Self Serve Business Usage Based", Self::Business => "Business", @@ -69,6 +72,7 @@ impl KnownPlan { Self::Go => "go", Self::Plus => "plus", Self::Pro => "pro", + Self::ProLite => "prolite", Self::Team => "team", Self::SelfServeBusinessUsageBased => "self_serve_business_usage_based", Self::Business => "business", diff --git a/codex-rs/protocol/src/error.rs b/codex-rs/protocol/src/error.rs index 3ffdeb48e..f421db8af 100644 --- a/codex-rs/protocol/src/error.rs +++ b/codex-rs/protocol/src/error.rs @@ -493,7 +493,7 @@ impl std::fmt::Display for UsageLimitReachedError { retry_suffix_after_or(self.resets_at.as_ref()) ) } - Some(PlanType::Known(KnownPlan::Pro)) => format!( + Some(PlanType::Known(KnownPlan::Pro | KnownPlan::ProLite)) => format!( "You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits{}", retry_suffix_after_or(self.resets_at.as_ref()) ), diff --git a/codex-rs/tui/src/status/helpers.rs b/codex-rs/tui/src/status/helpers.rs index 5103b9e4d..ef28ed7fc 100644 --- a/codex-rs/tui/src/status/helpers.rs +++ b/codex-rs/tui/src/status/helpers.rs @@ -100,6 +100,8 @@ pub(crate) fn plan_type_display_name(plan_type: PlanType) -> String { "Business".to_string() } else if plan_type.is_business_like() { "Enterprise".to_string() + } else if plan_type == PlanType::ProLite { + "Pro Lite".to_string() } else { title_case(format!("{plan_type:?}").as_str()) } @@ -216,6 +218,7 @@ mod tests { (PlanType::Go, "Go"), (PlanType::Plus, "Plus"), (PlanType::Pro, "Pro"), + (PlanType::ProLite, "Pro Lite"), (PlanType::Team, "Business"), (PlanType::SelfServeBusinessUsageBased, "Business"), (PlanType::Business, "Enterprise"), diff --git a/codex-rs/tui/src/tooltips.rs b/codex-rs/tui/src/tooltips.rs index 9565831b2..8f6d5ba1a 100644 --- a/codex-rs/tui/src/tooltips.rs +++ b/codex-rs/tui/src/tooltips.rs @@ -61,7 +61,7 @@ pub(crate) fn get_tooltip(plan: Option, fast_mode_enabled: bool) -> Op Some(plan_type) if matches!( plan_type, - PlanType::Plus | PlanType::Enterprise | PlanType::Pro + PlanType::Plus | PlanType::Enterprise | PlanType::Pro | PlanType::ProLite ) || plan_type.is_team_like() || plan_type.is_business_like() => {