Skip to content

fix(clients): keep model selection sticky across threads - #9163

Closed
StiensWout wants to merge 2 commits into
pingdotgg:mainfrom
StiensWout:t3code/fix-project-model-selection
Closed

fix(clients): keep model selection sticky across threads#9163
StiensWout wants to merge 2 commits into
pingdotgg:mainfrom
StiensWout:t3code/fix-project-model-selection

Conversation

@StiensWout

@StiensWout StiensWout commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

PR #6011 made every project default override the user's current and app-wide model choice. Because projects are commonly created with a stored model, new threads kept snapping back to that model and reasoning effort.

Restore the precedence used by the composer on web and mobile: explicit draft or current-thread selection, then the app-wide sticky selection, then the project default, then the provider default. Project defaults still apply when the user has no active global choice.

Focused verification:

  • pnpm exec vp test run apps/web/src/lib/chatThreadActions.test.ts apps/mobile/src/lib/modelOptions.test.ts
  • pnpm typecheck in apps/web
  • pnpm typecheck in apps/mobile

Implemented with GPT-5.6 Sol in the Codex harness through T3 Code.


Note

Medium Risk
Changes default model behavior for new threads/tasks across web and mobile; resolveNewThreadModelSelectionOverride now requires stickySelection, though in-repo callers are updated.

Overview
Restores composer-aligned model precedence after project defaults began overriding the user’s app-wide sticky choice when starting new tasks or threads.

On mobile, resolveNewTaskModelSelection and related fallbacks now resolve draft → sticky → project → provider, including buildModelOptions fallback ordering and comments/migration for stale new-task: drafts on disk.

On web, resolveNewThreadModelSelectionOverride gains a stickySelection argument and orders carried current-thread model (when switching drafts) → sticky → project default. useHandleNewThread reads sticky state from the composer draft store when minting or refreshing empty drafts.

Tests on both platforms assert sticky beats project default and that project still applies when sticky is absent.

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

Note

Fix model selection to stay sticky across threads before project default

  • Reorders the model fallback chain in both mobile and web new-thread/new-task flows so the sticky app-wide selection outranks the project default. Draft selection still wins first, provider fallback remains last.
  • Mobile resolveNewTaskModelSelection in modelOptions.ts and the NewTaskFlowProvider in new-task-flow-provider.tsx apply the new precedence.
  • Web resolveNewThreadModelSelectionOverride in chatThreadActions.ts and the handler in useHandleNewThread.ts now take the active sticky provider's model selection as input; carried cross-thread selection still outranks sticky.
  • Behavioral Change: new threads/tasks that previously fell back to the project default model will now pick up the last user-selected sticky model instead.

Macroscope summarized 9188f9d.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 2, 2026
Comment thread apps/web/src/hooks/useHandleNewThread.ts
@macroscopeapp

macroscopeapp Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The PR changes model-selection precedence across mobile and web thread creation, causing a persisted sticky model to override a configured project default. Because this changes product defaults and affects existing user flows, human review is required.

You can add or adjust custom eligibility rules. Learn more.

@StiensWout StiensWout closed this Sep 2, 2026
mwolson added a commit to mwolson/t3code that referenced this pull request Sep 2, 2026
CTM pingdotgg#6011 honor project default models made a stored project default beat
the current thread and the app-wide sticky model. New threads then snapped
back to Codex gpt-5.4 and dropped Pi effort.

Restore the composer order: current thread, then sticky last-used, then
project default. Port of closed pingdotgg#9163 keep model selection sticky.
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:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant