Skip to content

fix(web): preserve selected model when changing reasoning effort#1999

Open
fgonzalezurriola wants to merge 1 commit intopingdotgg:mainfrom
fgonzalezurriola:fix/model-default-reasoning-effort
Open

fix(web): preserve selected model when changing reasoning effort#1999
fgonzalezurriola wants to merge 1 commit intopingdotgg:mainfrom
fgonzalezurriola:fix/model-default-reasoning-effort

Conversation

@fgonzalezurriola
Copy link
Copy Markdown

@fgonzalezurriola fgonzalezurriola commented Apr 13, 2026

IMPORTANT: i tried to fix it manually but gpt codex 5.3 xhigh explained me why i have skill issues, reviewed by my skill issued brain.

What Changed

closes #1844, preserving the selected base model when changing the reasoning effort

Why

bug in issue #1844 with certain state changing reasoning effort changes to the default model GPT5.4 (in codex)

imo changing between gpt-5.4-mini xhigh and gpt-5.4 medium/high helps into pushing further for $20 users, accidentally using gpt-5.4-xhigh has a huge impact for limits

UI Changes

None

Checklist

  • [ x ] This PR is small and focused
  • [ x ] I explained what changed and why
  • I included before/after screenshots for any UI changes
  • [ x ] I included a video for animation/interaction changes
2026-04-13_15-51-15.mp4

Note

Medium Risk
Touches composer draft model-selection persistence logic; bugs here could cause unexpected model changes or incorrect sticky settings across threads/providers, but the change is small and covered by a targeted test.

Overview
Fixes a model-selection regression where changing provider traits (notably Codex reasoningEffort) could reset the chosen model back to the provider default.

TraitsPicker now passes the currently selected model as baseModel when persisting option changes, and composerDraftStore.setProviderModelOptions accepts/normalizes this baseModel and uses it when a draft/provider selection doesn’t exist yet (including sticky snapshots). Adds a unit test covering this “options update before selection exists” scenario.

Reviewed by Cursor Bugbot for commit 87fbe87. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Preserve selected model when changing reasoning effort in chat composer

  • Extends setProviderModelOptions in composerDraftStore.ts to accept an optional baseModel parameter, used as the initial model when no model is currently set for the provider in draft or sticky state.
  • Updates TraitsPicker.tsx to pass the current model as baseModel when calling setProviderModelOptions, so changing reasoning effort no longer resets the selected model.
  • Adds a test in composerDraftStore.test.ts covering that the provided baseModel is reflected in both draft and sticky selections.

Macroscope summarized 87fbe87.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8215b6f4-ae54-4fb6-b1d7-8f1467d8c4e7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Apr 13, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 13, 2026

Approvability

Verdict: Approved

Straightforward bug fix that adds a fallback parameter to preserve the selected model when updating reasoning effort options. The change is minimal, well-tested, and has clear intent with no side effects outside the immediate fix.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: After receiving the first answer, changing the reasoning effort changes the model to GPT-5.4

1 participant