Default Fast service tier for eligible ChatGPT plans#19053
Conversation
a20cd3d to
7f2c8b5
Compare
| } | ||
| SlashCommand::Fast => { | ||
| let next_tier = if matches!(self.config.service_tier, Some(ServiceTier::Fast)) { | ||
| let next_tier = if matches!(self.current_service_tier(), Some(ServiceTier::Fast)) { |
There was a problem hiding this comment.
We cannot toggle based on the config value because enterprise users can be on fast but not have the service tier set because it is carried in memory.
7f2c8b5 to
461c11d
Compare
461c11d to
9e34623
Compare
| if service_tier.is_none() { | ||
| self.config.notices.fast_default_opt_out = Some(true); | ||
| edits = edits.set_fast_default_opt_out(/*opted_out*/ true); | ||
| } |
There was a problem hiding this comment.
When serice_tier went from true to false, we would record the event which the users has explicitly set the service tier and enterprise default would not longer be applied.
| if configured_service_tier.is_some() || fast_default_opt_out || !fast_mode_enabled { | ||
| return configured_service_tier; | ||
| } | ||
|
|
||
| account_plan_type | ||
| .is_some_and(is_enterprise_default_service_tier_plan) | ||
| .then_some(ServiceTier::Fast) | ||
| } |
There was a problem hiding this comment.
This is the key of the logic, if the user does not have the config set and has not explicitly opt out and fast mode is enabled, we would then go ahead and default to fast mode.
| Some(None) => { | ||
| // Preserve explicit standard/clear intent after the nested override | ||
| // collapses into `Config.service_tier = None`. | ||
| notices.fast_default_opt_out = Some(true); | ||
| None | ||
| } | ||
| None => config_profile.service_tier.or(cfg.service_tier), |
There was a problem hiding this comment.
Some(None) -> explicitly passing in null from client, we would like to treat that as the highest priority and passing fast_default_opt_out as true to override enterprise default behavior.
None -> omitted, we will have core takeover the behavior which is the calculated default value.
| StatusLineItem::SessionId => self.thread_id.map(|id| id.to_string()), | ||
| StatusLineItem::FastMode => Some( | ||
| if matches!(self.config.service_tier, Some(ServiceTier::Fast)) { | ||
| if matches!(self.current_service_tier(), Some(ServiceTier::Fast)) { |
There was a problem hiding this comment.
No longer matching the exact config value but the value in memory.
There was a problem hiding this comment.
so that we show the correct status in TUI
5554329 to
7e82246
Compare
7e82246 to
e1cc4e0
Compare
Why
Enterprise and business-like ChatGPT plans should get Codex's Fast service tier by default when the user or caller has not made an explicit service-tier choice. At the same time, callers need a durable way to choose standard routing without adding a new persisted
standardservice tier value. This keeps existing config compatibility while letting core own the managed default policy.What changed
fastorflexwins, explicit null/clear or[notice].fast_default_opt_out = trueresolves to standard routing, and otherwise eligible ChatGPT plans resolve to Fast when FastMode is enabled.[notice].fast_default_opt_outas the persisted opt-out marker for managed Fast defaults.service_tier: nullas an explicit standard/clear choice by preserving that intent through config loading.config.service_tieras the explicit configured choice./fast offto clearservice_tier, persist the opt-out marker, and send explicit standard for subsequent turns.Verification
/fast offturn propagation.cargo build -p codex-cliFull test suite was not run locally per author request.