Skip to content

fix: maintain reasoning selections for multiple providers#2760

Open
adambuchweitz wants to merge 1 commit into
pingdotgg:mainfrom
adambuchweitz:fix/multi-provider-reasoning
Open

fix: maintain reasoning selections for multiple providers#2760
adambuchweitz wants to merge 1 commit into
pingdotgg:mainfrom
adambuchweitz:fix/multi-provider-reasoning

Conversation

@adambuchweitz
Copy link
Copy Markdown

@adambuchweitz adambuchweitz commented May 19, 2026

What Changed

Fix secondary Codex reasoning selection by threading the instance ID instead of just the provider.

Codex reasoning options have to follow the configured provider instance, not the driver kind. Otherwise multiple Codex accounts collapse into codex and secondary-account choices can fail to stick.

Here's an HTML code tour, because it's fun: https://lp-tours.up.railway.app/d/99a0303e-58e1-4ae6-9e47-3568830c62fc

Why

The composer could display or persist traits through ProviderDriverKind, such as codex, even when the active provider was a distinct ProviderInstanceId, such as "codex_work"

The practical ramifications are that I would set reasoning to Low but it would send it as Extra High, costing me precious tokens.

UI Changes

None

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes how composer model options are keyed and persisted (from driver kind to instance id), which could affect saved draft/sticky selections and active provider behavior across threads/instances.

Overview
Fixes composer traits/model-option handling to be instance-aware so multiple configured accounts under the same provider driver (e.g. Codex) don’t overwrite each other.

ChatComposer and traits rendering now pass instanceId through and read composerModelOptions via selectedInstanceId instead of selectedProvider. TraitsPicker and composerProviderState thread instanceId into persistence calls.

useComposerDraftStore.setProviderModelOptions now accepts an optional instanceId to write selections under that instance key and, when provided, updates draft/sticky activeProvider accordingly; tests add coverage for storing option changes on a custom instance.

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 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: 635dfb96-e2cf-4f95-a321-6cbb29b0fc41

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 size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 19, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 19, 2026

Fix reasoning selections to persist per provider instance across multiple providers

  • setProviderModelOptions in composerDraftStore.ts now accepts an optional instanceId, keying model selections and activeProvider by provider instance rather than driver kind.
  • ChatComposer.tsx passes selectedInstanceId when looking up model options and rendering traits controls, so changes apply to the specific instance.
  • TraitsPicker.tsx and composerProviderState.tsx forward instanceId through to the store update, enabling instance-scoped trait persistence.
  • Behavioral Change: switching reasoning/model options for one provider instance no longer overwrites selections for other instances of the same driver.

Macroscope summarized 9b5d554.

Comment thread apps/web/src/composerDraftStore.ts
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 19, 2026

Approvability

Verdict: Approved

Straightforward bug fix that changes how model options are keyed from provider to instance ID, allowing multiple instances of the same provider to maintain separate reasoning selections. The change is well-scoped with a test and doesn't affect sensitive code paths.

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

@adambuchweitz adambuchweitz force-pushed the fix/multi-provider-reasoning branch from 215044b to 9b5d554 Compare May 19, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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.

1 participant