Repository navigation
fix(native-chat): only save and send a Codex speed the user picked - #27630
Draft
brennanb2025 wants to merge 8 commits into
Draft
brennanb2025 wants to merge 8 commits into
brennanb2025 wants to merge 8 commits into
Conversation
…d it With no pick, the picker derives what to show from the thread's reported tier and the current model instead of writing Standard into the picks, so Codex keeps applying the user's configured tier per model.
…cker shows A pick the model does not offer is kept (Codex leaves it out, so that model runs standard) and applies again on a model that offers it, so no Standard nobody chose is saved or remembered. Codex runs flex on every model and leaves out any other unlisted tier, which the shown tier now follows.
The Speed option declares that an unlisted value runs its default, so the picker shows Standard for a carried, saved or seeded pick the current model does not offer instead of a raw tier id. The Codex host lists Flex as a choice while the chat runs it, since Codex runs it on every model.
…would One Codex helper derives the shown tier and lists Flex while it is chosen; the live read and, through the agent's resting options, the at-rest read both use it, so an older client paired with this host never sees a raw tier id either, and a saved Flex shows as Flex before the chat starts.
…ffer What a turn sends now matches what the picker shows: a picked tier the current model does not offer goes out as Standard, while the pick itself is kept and applies again on a model that offers it.
…ehavior One flow test covers an unpicked configured tier and a kept pick across models (shown, sent and saved); redundant per-step tests are dropped.
…er-only-when-picked
This branch has not been deployed
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.
ELI5
If your Codex config sets a speed (say Ultrafast) and a native chat opens on a model that can't use it, Orca showed Standard and then quietly saved Standard as if you had picked it. From then on that chat sent Standard with every message, so switching to a model that can run your configured speed never got it back, even after a restart. Now Orca only saves and sends a speed you actually picked; otherwise Codex applies your configured speed on each model, and the picker shows what that will be.
What Changed
Before (since #26962 added the Speed picker):
service_tier = "ultrafast". You open a chat on GPT-6 Luna, which does not offer Ultrafast. The picker correctly shows Standard.After:
Mechanism: the Codex chat keeps the user's picks in one map, which is what goes out on each message, what is saved with the chat, and what the app remembers for the next chat. A fallback wrote
defaultinto that map whenever the chosen or configured speed wasn't offered by the current model, turning a display decision into a saved pick. The fallback is removed: the map now only ever holds what the user picked, and the speed the picker shows is derived on every read from the pick (else the configured speed) and the current model. A model offers a speed when it lists it, plus Standard everywhere and Flex, which Codex runs on every model without listing it; any other speed Codex leaves out, so the picker shows Standard for it.What the picker shows is worked out in one Codex helper: Standard for a speed the model doesn't offer, and Flex added to the model's choices while it is chosen. The same helper decides what a message sends, so the two never disagree. The Codex side uses it both for a running chat and, through the Codex agent's resting-options hook, for a chat that isn't running, so a client that predates this change, paired with a newer host, sees the same values. On the app side, the Speed option also declares that a value the model doesn't list runs as Standard. That covers the moment right after a model switch, before Orca re-reads the options, and a new chat started from a remembered pick.
Why
A speed the user never picked is neither sent nor saved, so the agent's own configuration stays in charge. Deriving the shown value instead of storing it also removes the stale-pick bug class rather than adding another guard. Making Codex's per-model default speed (Fast for some models) apply automatically was considered and left out: Codex applies it only in its own terminal app, not for chats like Orca's, and doing so would raise usage without the user choosing it.
Linked Issue
None; follow-up to #26962 (known gap listed in its notes).
Visual Proof
N/A: no new UI. The only visible difference is that the Speed picker no longer shows a raw lowercase tier id (for example
ultrafast) as an extra choice on a model that doesn't offer it; it shows Standard there, which is what runs.Testing
Agent skill upstream boundary
Notes