mirror of
https://github.com/openai/codex.git
synced 2026-11-19 15:04:25 +00:00
Support self-serve Business ProLite accounts (#35785)
## What changed - Recognize `self_serve_business_prolite` across authentication, account and rate-limit APIs, generated schemas, workspace classification, status display, cloud configuration gating, and usage-limit messaging. - Keep the Python SDK's `PlanType` enum compatible with non-empty string values introduced by newer Codex runtimes while preserving its known constants. ## Testing - Cover token parsing, account reads and notifications, backend rate-limit mapping, workspace behavior, error formatting, and Python SDK response coercion for the new plan value. GitOrigin-RevId: 70bc17a7c4ba4028cb10e4333cc1f2ac64da361f
This commit is contained in:
1 parent
bb1af235ea
commit
cf7e9cfe6a
25 files changed
+258
-29
No files matched your search
@@ -685,6 +685,9 @@ impl Client {
|
||||
crate::types::PlanType::Pro => AccountPlanType::Pro,
|
||||
crate::types::PlanType::ProLite => AccountPlanType::ProLite,
|
||||
crate::types::PlanType::Team => AccountPlanType::Team,
|
||||
crate::types::PlanType::SelfServeBusinessProLite => {
|
||||
AccountPlanType::SelfServeBusinessProLite
|
||||
}
|
||||
crate::types::PlanType::SelfServeBusinessUsageBased => {
|
||||
AccountPlanType::SelfServeBusinessUsageBased
|
||||
}
|
||||
@@ -732,7 +735,14 @@ mod tests {
|
||||
use wiremock::matchers::path;
|
||||
|
||||
#[test]
|
||||
fn map_plan_type_supports_usage_based_business_variants() {
|
||||
fn map_plan_type_supports_business_variants() {
|
||||
let business_prolite =
|
||||
serde_json::from_str::<crate::types::PlanType>("\"self_serve_business_prolite\"")
|
||||
.expect("business ProLite should deserialize");
|
||||
assert_eq!(
|
||||
Client::map_plan_type(business_prolite),
|
||||
AccountPlanType::SelfServeBusinessProLite
|
||||
);
|
||||
assert_eq!(
|
||||
Client::map_plan_type(crate::types::PlanType::SelfServeBusinessUsageBased),
|
||||
AccountPlanType::SelfServeBusinessUsageBased
|
||||
|
||||
Reference in new issue
Block a user