Honor default service tier in Codex CLI#21909
Draft
shijie-oai wants to merge 6 commits into
Draft
Conversation
shijie-oai
commented
May 11, 2026
Comment on lines
+310
to
+311
| /// `priority` or `flex`; legacy `fast` also works). Use `unset` to opt | ||
| /// out of the model catalog default service tier. |
Collaborator
Author
There was a problem hiding this comment.
Did not want to use "default" because that is a real service tier on the backend and the behavior we are introducing here is not consistent. If we see "unset", we would pass null for service tier which feel wrong if we do it with "default".
Collaborator
Author
There was a problem hiding this comment.
Alternatively I was thinking about introducing a separate boolean to track user intentional for not using defualt service tier prodvided by the backend but that feel fragile and hard to reasoning if user config state is incorrect.
shijie-oai
commented
May 11, 2026
Comment on lines
-595
to
-597
| let account_plan_type = auth_manager | ||
| .auth_cached() | ||
| .and_then(|auth| auth.account_plan_type()); |
Collaborator
Author
There was a problem hiding this comment.
Default service tier is now backend driven.
8b0451b to
2a792e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Codex can now receive
default_service_tierfrom the model catalog. The client should honor backend-owned model metadata for default priority routing instead of duplicating plan-specific rules locally. The client also needs a durable way to represent standard routing when a model has a catalog default, so turning Fast mode off does not get overwritten by that default on the next turn.What Changed
default_service_tierto shared model metadata and model presets, including cache/test fixtures and the Bedrock catalog shape.defaultServiceTierthrough app-server v2model/list, regenerated the JSON/TypeScript schema fixtures, and preserved the field when the TUI bootstraps from app-server models.ModelInfo::effective_service_tier(...)for local/session state andModelInfo::service_tier_for_request(...)for the Responses API request boundary.service_tier = "unset"sentinel so config/TUI state can explicitly opt out of catalog defaults while inference requests still omitservice_tier.Feature::FastMode; when FastMode is disabled, Codex does not apply a model default and only preserves explicit supported tiers orunset.unsetwhen the user turns an active tier off.Validation
cargo build -p codex-clicargo test -p codex-protocol service_tier --libcargo test -p codex-core get_service_tier --libcargo test -p codex-tui user_turn_sends_standard_override_after_fast_is_turned_off --libcargo test -p codex-app-server-protocolcargo test -p codex-app-server model_listcargo test -p codex-tui app_server_session --lib