Default Fast service tier for eligible ChatGPT plans (#19053)

## 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.
This commit is contained in:
Shijie Rao
2026-04-23 00:54:44 -04:00
committed by GitHub
parent 082fc4f632
commit 02170996e6
16 changed files with 289 additions and 33 deletions

View File

@@ -631,7 +631,12 @@
"$ref": "#/definitions/SandboxMode"
},
"service_tier": {
"$ref": "#/definitions/ServiceTier"
"allOf": [
{
"$ref": "#/definitions/ServiceTier"
}
],
"description": "Optional explicit service tier preference for new turns (`fast` or `flex`)."
},
"tools": {
"$ref": "#/definitions/ToolsToml"
@@ -1397,6 +1402,10 @@
},
"description": "Tracks scopes where external config migration prompts should be suppressed."
},
"fast_default_opt_out": {
"description": "Tracks whether the user opted out of Codex-managed fast defaults.",
"type": "boolean"
},
"hide_full_access_warning": {
"description": "Tracks whether the user has acknowledged the full access warning prompt.",
"type": "boolean"