Repository navigation
Conversation
|
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 Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a localized composer-state bug fix with targeted regression coverage. It preserves provider-specific model options during switching without changing APIs, schemas, infrastructure, or unrelated runtime paths. You can add or adjust custom eligibility rules. Learn more. |
|
Closing as part of the open-PR backlog sweep (wave 2). Reason: Sticky provider options already preserved when selection omits options. Reopen if this is still wanted and you’re willing to rebase onto current |
Problem
Switching providers replaced that provider’s sticky model selection with an option-less selection. Returning from Claude to Codex could therefore erase a saved reasoning effort such as High and fall back to the model default, Low.
Fix
Preserve existing provider-specific options when updating a sticky model selection without explicit options. When a draft has no selection for the newly active provider, restore that provider’s sticky options instead.
Add regression coverage for switching between Codex and Claude while retaining both providers’ saved options.
Verification
vp test run apps/web/src/composerDraftStore.test.ts— 81 passedvp run --filter @t3tools/web typecheckUI changes
No visual changes. Before this fix, Codex → Claude → Codex could change the saved reasoning effort from High to Low. After the fix, High is restored.
Built with gpt-5.6-sol through the Codex harness in T3 Code.
Note
Low Risk
Localized composer draft store logic with regression tests; no API or auth changes, only how per-provider model options are merged on switch.
Overview
Fixes composer draft state so provider-specific model options (e.g. Codex reasoning effort, Claude effort) are not dropped when you switch providers or update a sticky selection without passing options again.
setStickyModelSelectionnow reuses the existing sticky entry’s options when the incoming selection has nooptionsfield, instead of overwriting with a bare provider+model pair.setModelSelectionuses the same fallback: if the thread draft has no selection for that provider yet, it pulls options fromstickyModelSelectionByProviderbefore merging, so returning to Codex after Claude restores High instead of defaulting to Low.Adds a regression test that alternates Codex and Claude and asserts both providers keep their saved options in the draft and sticky maps.
Reviewed by Cursor Bugbot for commit 3b5840b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
composerDraftStoreto preserve provider options when switching modelssetStickyModelSelectionnow reuses existing sticky options fromstate.stickyModelSelectionByProvider[instanceId]when an incoming selection has no options, instead of overwriting with an options-less entrysetModelSelectionnow falls back to the sticky selection for that provider when no per-thread selection exists, preserving options across provider switchescodexandclaudeAgentproviderssetStickyModelSelectionorsetModelSelectionwithout options now retains previously stored options rather than dropping themMacroscope summarized 3b5840b.