Skip to content

Default Fast service tier for eligible ChatGPT plans#19053

Merged
shijie-oai merged 3 commits intomainfrom
shijie/fast-mode-enterprise
Apr 23, 2026
Merged

Default Fast service tier for eligible ChatGPT plans#19053
shijie-oai merged 3 commits intomainfrom
shijie/fast-mode-enterprise

Conversation

@shijie-oai
Copy link
Copy Markdown
Collaborator

@shijie-oai shijie-oai commented Apr 22, 2026

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 standard service tier value. This keeps existing config compatibility while letting core own the managed default policy.

What changed

  • Resolve the effective service tier in core at session creation: explicit fast or flex wins, explicit null/clear or [notice].fast_default_opt_out = true resolves to standard routing, and otherwise eligible ChatGPT plans resolve to Fast when FastMode is enabled.
  • Add [notice].fast_default_opt_out as the persisted opt-out marker for managed Fast defaults.
  • Treat app-server/TUI service_tier: null as an explicit standard/clear choice by preserving that intent through config loading.
  • Update TUI rendering to use core's effective service tier for startup and status surfaces while still keeping config.service_tier as the explicit configured choice.
  • Update /fast off to clear service_tier, persist the opt-out marker, and send explicit standard for subsequent turns.

Verification

  • Added unit coverage for config override/notice handling, service-tier resolution, runtime null clearing, and /fast off turn propagation.
  • cargo build -p codex-cli

Full test suite was not run locally per author request.

@shijie-oai shijie-oai force-pushed the shijie/fast-mode-enterprise branch 2 times, most recently from a20cd3d to 7f2c8b5 Compare April 23, 2026 00:14
}
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)) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@shijie-oai shijie-oai force-pushed the shijie/fast-mode-enterprise branch from 7f2c8b5 to 461c11d Compare April 23, 2026 00:32
@shijie-oai shijie-oai force-pushed the shijie/fast-mode-enterprise branch from 461c11d to 9e34623 Compare April 23, 2026 00:51
@shijie-oai shijie-oai changed the title Feat: enable fast mode for enterprise Default Fast service tier for eligible ChatGPT plans Apr 23, 2026
Comment on lines +1036 to +1039
if service_tier.is_none() {
self.config.notices.fast_default_opt_out = Some(true);
edits = edits.set_fast_default_opt_out(/*opted_out*/ true);
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +803 to +810
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)
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@shijie-oai shijie-oai marked this pull request as ready for review April 23, 2026 01:36
@shijie-oai shijie-oai requested a review from a team as a code owner April 23, 2026 01:36
Comment on lines +2036 to +2042
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),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer matching the exact config value but the value in memory.

Copy link
Copy Markdown
Collaborator Author

@shijie-oai shijie-oai Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so that we show the correct status in TUI

shijie-oai added a commit that referenced this pull request Apr 23, 2026
shijie-oai added a commit that referenced this pull request Apr 23, 2026
@shijie-oai shijie-oai force-pushed the shijie/fast-mode-enterprise branch from 5554329 to 7e82246 Compare April 23, 2026 03:25
@shijie-oai shijie-oai force-pushed the shijie/fast-mode-enterprise branch from 7e82246 to e1cc4e0 Compare April 23, 2026 04:27
@shijie-oai shijie-oai merged commit 0217099 into main Apr 23, 2026
25 checks passed
@shijie-oai shijie-oai deleted the shijie/fast-mode-enterprise branch April 23, 2026 04:54
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants