Repository navigation
Conversation
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.
What broke
#65749 made a model's speeds (such as
gpt-5.5-fast) share one reasoning variant, stored under the base model's key (openai/gpt-5.5). Before that change each speed was a model of its own, with its variant saved under its own key. After upgrading, the TypeScript TUI and the desktop/web app read only the base-model key. So a variant a user had saved for a speed model was silently ignored.Who: users who had saved a variant for a speed model (for example
variant: {"openai/gpt-5.5-fast": "high"}) and have no entry for the base model.Trigger: in a new draft that has no configured variant, select GPT-5.5, then Fast. The prompt uses the default variant instead of
high. Existing sessions are not affected, because their variant is stored with the session.Introduced by #65749, at
packages/tui/src/context/local.tsx(preferredSelection) andpackages/app/src/providers/models/models.tsx(getVariant).Fix
Both clients still read the shared base-model variant first. When that key has no entry, they now fall back to the model's own key, then to the first of its speeds that has a saved variant. This migrates old speed-keyed preferences when they are read. Writes still go to the shared base key, so the first variant the user picks replaces the old entry.
Because a model's speeds share one variant, the old speed entry also applies when the model runs at its standard speed, as long as no base-model entry exists.
Clients covered
packages/tui) and the desktop/web app (packages/app).packages/cli-rs/crates/tui/src/local.rs,preferred), from feat(cli-rs): bring the Rust client up to v2.4.0, and fix finished subagents #65825. It reads only the base-model key and has the same gap. This PR changes only how preferences are read and never rewrites the saved file, so the Rust TUI is not fixed indirectly. It needs its own change.Tests
packages/tui/test/component/dialog-speed.test.tsx: "a variant saved for a speed before speeds shared their model's variant still applies to it"packages/app/test-browser/fixtures/model-selection.ts: "a variant saved for a speed before speeds shared their model's variant still applies in a draft"Output before the fix:
Both pass after the fix. Package typechecks,
packages/appunit and browser tests,packages/tuitests andbun run checkall pass. One file-watcher test inpackages/tui(test/plugin-source.test.ts) failed once during the full run; it is unrelated to this change and passes when run alone.Found by the daily review job.