mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
Move service tier helpers out of data types
This commit is contained in:
@@ -314,6 +314,7 @@ use codex_protocol::config_types::Personality;
|
||||
use codex_protocol::config_types::ReasoningSummary as ReasoningSummaryConfig;
|
||||
use codex_protocol::config_types::ServiceTier;
|
||||
use codex_protocol::config_types::WindowsSandboxLevel;
|
||||
use codex_protocol::config_types::priority_service_tier;
|
||||
use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::ResponseInputItem;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
@@ -788,7 +789,7 @@ fn get_service_tier(
|
||||
|
||||
account_plan_type
|
||||
.is_some_and(is_enterprise_default_service_tier_plan)
|
||||
.then(ServiceTier::priority)
|
||||
.then(priority_service_tier)
|
||||
}
|
||||
|
||||
fn is_enterprise_default_service_tier_plan(plan_type: AccountPlanType) -> bool {
|
||||
|
||||
@@ -34,6 +34,7 @@ use codex_protocol::ThreadId;
|
||||
use codex_protocol::account::PlanType as AccountPlanType;
|
||||
use codex_protocol::config_types::ServiceTier;
|
||||
use codex_protocol::config_types::TrustLevel;
|
||||
use codex_protocol::config_types::priority_service_tier;
|
||||
use codex_protocol::exec_output::ExecToolCallOutput;
|
||||
use codex_protocol::models::FileSystemPermissions;
|
||||
use codex_protocol::models::FunctionCallOutputBody;
|
||||
@@ -2801,7 +2802,7 @@ fn get_service_tier_defaults_enterprise_accounts_to_fast() {
|
||||
Some(AccountPlanType::Enterprise),
|
||||
/*fast_mode_enabled*/ true,
|
||||
),
|
||||
Some(ServiceTier::priority())
|
||||
Some(priority_service_tier())
|
||||
);
|
||||
assert_eq!(
|
||||
get_service_tier(
|
||||
@@ -2810,7 +2811,7 @@ fn get_service_tier_defaults_enterprise_accounts_to_fast() {
|
||||
Some(AccountPlanType::EnterpriseCbpUsageBased),
|
||||
/*fast_mode_enabled*/ true,
|
||||
),
|
||||
Some(ServiceTier::priority())
|
||||
Some(priority_service_tier())
|
||||
);
|
||||
assert_eq!(
|
||||
get_service_tier(
|
||||
@@ -2819,7 +2820,7 @@ fn get_service_tier_defaults_enterprise_accounts_to_fast() {
|
||||
Some(AccountPlanType::Business),
|
||||
/*fast_mode_enabled*/ true,
|
||||
),
|
||||
Some(ServiceTier::priority())
|
||||
Some(priority_service_tier())
|
||||
);
|
||||
assert_eq!(
|
||||
get_service_tier(
|
||||
@@ -2828,7 +2829,7 @@ fn get_service_tier_defaults_enterprise_accounts_to_fast() {
|
||||
Some(AccountPlanType::Team),
|
||||
/*fast_mode_enabled*/ true,
|
||||
),
|
||||
Some(ServiceTier::priority())
|
||||
Some(priority_service_tier())
|
||||
);
|
||||
assert_eq!(
|
||||
get_service_tier(
|
||||
@@ -2837,7 +2838,7 @@ fn get_service_tier_defaults_enterprise_accounts_to_fast() {
|
||||
Some(AccountPlanType::SelfServeBusinessUsageBased),
|
||||
/*fast_mode_enabled*/ true,
|
||||
),
|
||||
Some(ServiceTier::priority())
|
||||
Some(priority_service_tier())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user