Shijie Rao
370b13afc9
Honor client-resolved service tier defaults ( #23537 )
...
## Why
Model catalog responses can now advertise a nullable
`default_service_tier` for each model. Codex needs to preserve three
distinct states all the way from config/app-server inputs to inference:
- no explicit service tier, so the client may apply the current model
catalog default when FastMode is enabled
- explicit `default`, meaning the user intentionally wants standard
routing
- explicit catalog tier ids such as `priority`, `flex`, or future tiers
Keeping those states distinct prevents the UI from showing one tier
while core sends another, especially after model switches or app-server
`thread/start` / `turn/start` updates.
## What Changed
- Plumbed `default_service_tier` through model catalog protocol types,
app-server model responses, generated schemas, model cache fixtures, and
provider/model-manager conversions.
- Added the request-only `default` service tier sentinel and normalized
legacy config spelling so `fast` in `config.toml` still materializes as
the runtime/request id `priority`.
- Moved catalog default resolution to the TUI/client side, including
recomputing the effective service tier when model/FastMode-dependent
surfaces change.
- Updated app-server thread lifecycle config construction so
`serviceTier: null` preserves explicit standard-routing intent by
mapping to `default` instead of internal `None`.
- Kept core responsible for validating explicit tiers against the
current model and stripping `default` before `/v1/responses`, without
applying catalog defaults itself.
## Validation
- `CARGO_INCREMENTAL=0 cargo build -p codex-cli`
- `CARGO_INCREMENTAL=0 cargo test -p codex-app-server model_list`
- `cargo test -p codex-tui service_tier`
- `cargo test -p codex-protocol service_tier_for_request`
- `cargo test -p codex-core get_service_tier`
- `RUST_MIN_STACK=8388608 CARGO_INCREMENTAL=0 cargo test -p codex-core
service_tier`
2026-05-20 15:57:50 -07:00
..
2026-02-01 23:38:43 -08:00
2026-04-17 13:37:25 -07:00
2026-04-21 22:33:24 -07:00
2026-02-01 23:38:43 -08:00
2026-03-06 00:03:39 +00:00
2026-02-09 23:10:26 -08:00
2026-03-06 00:03:39 +00:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-03-06 17:30:17 -08:00
2026-05-18 17:28:50 -07:00
2026-03-06 17:30:17 -08:00
2026-03-06 17:30:17 -08:00
2026-03-06 17:30:17 -08:00
2026-03-06 17:30:17 -08:00
2026-03-06 17:30:17 -08:00
2026-02-01 23:38:43 -08:00
2026-03-06 17:30:17 -08:00
2026-03-06 17:30:17 -08:00
2026-03-08 17:38:01 -07:00
2026-02-01 23:38:43 -08:00
2026-05-19 10:19:46 +00:00
2026-05-20 14:59:41 -07:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-05-14 15:16:15 +02:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-04-22 22:24:12 -07:00
2026-03-25 02:27:00 +00:00
2026-03-25 02:27:00 +00:00
2026-05-18 12:12:14 -07:00
2026-02-05 23:31:04 +00:00
2026-02-25 02:11:51 -08:00
2026-04-29 00:45:24 +00:00
2026-04-17 09:34:55 +00:00
2026-04-29 00:45:24 +00:00
2026-02-25 02:11:51 -08:00
2026-04-11 00:23:50 -07:00
2026-02-01 23:38:43 -08:00
2026-04-30 11:42:07 -07:00
2026-04-20 10:44:03 -07:00
2026-04-07 11:22:28 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-04-13 17:46:56 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-04-07 11:22:28 -07:00
2026-03-24 15:52:13 -07:00
2026-04-07 11:22:28 -07:00
2026-04-07 11:22:28 -07:00
2026-03-13 14:42:20 -07:00
2026-03-13 14:42:20 -07:00
2026-02-01 23:38:43 -08:00
2026-04-17 13:37:25 -07:00
2026-04-24 01:53:13 +00:00
2026-04-22 20:34:15 +00:00
2026-05-20 14:59:41 -07:00
2026-04-29 23:39:57 +00:00
2026-05-20 14:59:41 -07:00
2026-05-20 14:59:41 -07:00
2026-05-15 15:04:04 -07:00
2026-05-19 11:03:47 -07:00
2026-05-19 11:03:47 -07:00
2026-05-15 15:04:04 -07:00
2026-04-06 16:27:02 -07:00
2026-02-02 17:41:55 -08:00
2026-04-29 19:14:53 -04:00
2026-03-27 00:27:15 -07:00
2026-02-01 23:38:43 -08:00
2026-04-13 20:37:11 -07:00
2026-04-13 20:37:11 -07:00
2026-04-19 23:22:49 -07:00
2026-04-19 23:22:49 -07:00
2026-04-23 13:00:46 -07:00
2026-04-23 13:00:46 -07:00
2026-04-20 19:59:36 -07:00
2026-04-06 19:17:14 -07:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-03-19 15:09:59 -07:00
2026-04-11 04:39:19 +00:00
2026-04-11 04:39:19 +00:00
2026-02-01 23:38:43 -08:00
2026-02-13 16:26:32 -08:00
2026-05-20 15:57:50 -07:00
2026-04-29 01:36:19 +00:00
2026-04-29 01:36:19 +00:00
2026-02-17 11:02:23 -08:00
2026-04-22 22:24:12 -07:00
2026-05-20 02:42:56 +00:00
2026-05-20 02:42:56 +00:00
2026-02-01 23:38:43 -08:00
2026-05-18 03:11:54 -07:00
2026-05-18 03:11:54 -07:00
2026-04-17 16:47:58 -07:00
2026-03-19 15:02:45 -07:00
2026-05-19 22:03:08 -07:00
2026-05-12 17:56:30 -07:00
2026-04-17 16:47:58 -07:00
2026-05-20 14:59:41 -07:00
2026-05-13 00:50:29 -07:00
2026-05-13 00:50:29 -07:00
2026-04-29 23:49:20 -07:00
2026-04-29 23:49:20 -07:00
2026-04-29 23:49:20 -07:00
2026-05-12 17:56:30 -07:00
2026-05-08 20:46:39 -07:00
2026-04-29 23:49:20 -07:00
2026-05-08 20:46:39 -07:00
2026-05-08 20:46:39 -07:00
2026-05-01 00:16:25 -07:00
2026-05-01 00:16:25 -07:00
2026-04-17 16:47:58 -07:00
2026-03-09 12:40:25 -07:00
2026-05-04 16:43:58 -07:00
2026-05-04 16:43:58 -07:00
2026-05-19 23:47:48 -07:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-05-15 14:33:24 -07:00
2026-02-01 23:38:43 -08:00
2026-05-15 15:04:04 -07:00
2026-04-17 21:41:57 -07:00
2026-04-17 21:41:57 -07:00
2026-02-27 12:45:59 -08:00
2026-03-03 17:01:00 -08:00
2026-03-23 12:57:40 -07:00
2026-02-01 23:38:43 -08:00
2026-05-07 20:56:42 -07:00
2026-04-14 14:26:10 -07:00
2026-02-01 23:38:43 -08:00
2026-04-22 10:38:19 -07:00
2026-04-22 10:38:19 -07:00
2026-02-17 14:53:58 -08:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-02-25 13:14:30 -08:00
2026-02-03 18:15:55 -08:00
2026-02-03 18:15:55 -08:00
2026-05-19 21:19:38 +00:00
2026-05-20 20:12:07 +00:00
2026-04-24 20:53:41 -07:00
2026-05-20 15:07:35 -07:00
2026-05-20 15:07:35 -07:00
2026-05-20 15:07:35 -07:00
2026-05-20 15:07:35 -07:00
2026-05-20 15:07:35 -07:00
2026-05-20 15:07:35 -07:00
2026-05-18 11:28:53 -07:00
2026-04-13 16:11:05 -07:00
2026-04-13 16:11:05 -07:00
2026-04-22 06:10:09 -04:00
2026-05-15 15:04:04 -07:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-03-03 15:56:11 -08:00
2026-05-15 15:04:04 -07:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-05-15 15:04:04 -07:00
2026-02-25 09:59:10 -08:00
2026-02-25 09:59:10 -08:00
2026-02-25 09:59:10 -08:00
2026-03-16 21:38:07 -07:00
2026-04-07 15:43:38 -07:00
2026-04-30 13:39:48 +03:00
2026-04-14 00:13:13 -07:00
2026-04-14 00:13:13 -07:00
2026-05-19 23:47:48 -07:00
2026-05-20 20:12:07 +00:00
2026-02-01 23:38:43 -08:00
2026-05-15 15:04:04 -07:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-05-20 20:12:07 +00:00
2026-03-18 23:42:40 -06:00
2026-03-18 23:42:40 -06:00
2026-05-15 15:04:04 -07:00
2026-05-14 23:00:05 -07:00
2026-05-20 20:12:07 +00:00
2026-02-18 15:20:03 -08:00
2026-02-01 23:38:43 -08:00
2026-02-17 14:53:58 -08:00
2026-02-01 23:38:43 -08:00
2026-05-15 15:04:04 -07:00
2026-02-25 13:14:30 -08:00
2026-02-25 13:14:30 -08:00
2026-05-15 15:04:04 -07:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-02-01 23:38:43 -08:00
2026-05-15 15:04:04 -07:00
2026-05-15 15:04:04 -07:00
2026-05-15 15:04:04 -07:00
2026-05-15 15:04:04 -07:00
2026-02-06 00:35:04 +00:00
2026-04-17 18:11:47 -07:00
2026-05-05 09:58:23 -07:00
2026-02-18 13:03:16 -08:00
2026-03-08 18:07:46 -07:00
2026-02-18 13:03:16 -08:00
2026-02-01 23:38:43 -08:00