Fix model settings getting stuck#1538
Merged
juliusmarminge merged 4 commits intopingdotgg:mainfrom Mar 30, 2026
Merged
Conversation
…king 'off' for Haiku)
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Preserve default context window values so dispatch can clear stale selections - Move shared model option normalization into shared utilities - Use structural equality when stripping default server settings arrays
- Allow `contextWindow` to round-trip through Claude model settings patches - Remove the obsolete default-settings test
juliusmarminge
approved these changes
Mar 30, 2026
8 tasks
TimCrooker
added a commit
to TimCrooker/t3code
that referenced
this pull request
Mar 30, 2026
Resolve modify/delete conflict on packages/contracts/src/settings.test.ts by accepting main's deletion — the file was removed in pingdotgg#1538 and the colorblind default is covered by the schema itself. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Chrono-byte
pushed a commit
to Chrono-byte/t3code
that referenced
this pull request
Mar 31, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
xddinside
pushed a commit
to xddinside/t3code
that referenced
this pull request
Apr 4, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
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 Changed
Removed option stripping logic
Why
Currently, selecting non-default option for Text Generation Model results in setting getting stuck. For example, switching Fast Mode to 'on' for Opus & GPT works, but you can't turn it off, same with switching Thinking to 'off' for Haiku - it gets stuck and you won't be able to switch it to "on"
Checklist
Note
Medium Risk
Changes model option normalization for Claude/Codex across web and server, which can alter what options get dispatched/persisted (notably preserving explicit defaults like
fastMode: false,thinking: true, andcontextWindow). Also adjusts server settings default-stripping equality for arrays, which affects what gets written tosettings.json.Overview
Fixes model settings toggles getting stuck by switching Claude/Codex option normalization to capability-aware shared helpers that preserve explicit boolean/default values (so
deepMergecan overwrite prior selections) and drop unsupported options.Moves normalization logic into
packages/shared/src/model.ts, removes the server/provider-specific normalizers, updates both Git text generation layers and the web composer state to use the new functions, and expands coverage with regression tests (includingcontextWindow). Separately, server settings persistence now usesEqual.equalsfor array comparisons, and the server settings patch schema now allowsclaudeAgent.options.contextWindow.Written by Cursor Bugbot for commit 27d36bc. This will update automatically on new commits. Configure here.
Note
Fix model settings getting stuck by preserving explicit boolean and default values during normalization
normalizeClaudeModelOptionsWithCapabilitiesandnormalizeCodexModelOptionsWithCapabilitiesinpackages/shared/src/model.ts, replacing local implementations in both server and web layers.falseforfastMode, explicittrueforthinking, and defaultcontextWindowvalues instead of stripping them, which was the root cause of settings getting stuck.contextWindowon models that don't support it) are now omitted rather than carried through.apps/server/src/serverSettings.tsby replacingJSON.stringifycomparison withEqual.equalsfor structural equality.ClaudeModelOptionsPatchinpackages/contracts/src/settings.tsnow includes an optionalcontextWindowfield to support partial updates.Macroscope summarized 27d36bc.