Conversation
|
Thanks for isolating the persisted-state distinction. The premise is confirmed on current main: The source-marker change in commit Automated hermes-sweeper review. |
|
The source marker here fixes the stale/default-derived state path: legacy or default-derived composer state refreshes from the active profile, while an intentional picker choice remains sticky. One complementary invariant from #62055 is still worth retaining: a valid I validated that approach locally by carrying the profile default into Desktop memory only, deriving the mismatch in the model controls, and covering the pill/control behavior. The focused Desktop suite passed 36 tests, plus typecheck and the production build. I am closing #62072 rather than racing this canonical fix, but wanted to preserve the tested UX invariant here. |
|
Closing as superseded by #65896 (merged), which salvaged this fix (and #62486) for #58498 — refresh default-derived composer model/provider so sticky localStorage mirrors of the profile default keep following Your diagnosis and approach are what landed; authorship was preserved in the salvage. Thank you! |
Problem
Fixes #58498.
Desktop can persist the composer model/provider in localStorage and then send that pair on
session.createas a per-session override. The same persistent slot was used for two different meanings:/api/model/info, which should keep followingconfig.yamlWhen the profile default changed outside the renderer (for example CLI/config now says
provider: openai-codex,default: gpt-5.5), a stale default-derived composer value could still be sent as a no-session override. That matches the reporter's dump:config.yamlshowed OpenAI Codex, while the desktop turn was built asprovider=nous model=openai/gpt-5.5.Root Cause
refreshCurrentModel()skipped any non-empty composer model, because it could not tell a user picker choice from a default mirror. The second post-fetch race guard had the same unconditional skip.Fix
Add a tiny persisted source marker for the composer model:
manualfor explicit desktop model-picker selectionsdefaultfor profile-default refreshes and Settings -> Model savesrefreshCurrentModel()now preserves onlymanualchoices. Default-derived and legacy composer state refreshes from/api/model/info, so new Desktop chats stop overriding the correct OpenAI Codex config with a stale Nous route.Tests
npm --workspace apps/desktop run test:ui -- src/app/session/hooks/use-model-controls.test.tsxnpm --workspace apps/desktop run typecheckcd apps/desktop && npx eslint src/app/desktop-controller.tsx src/app/session/hooks/use-model-controls.ts src/app/session/hooks/use-model-controls.test.tsx src/store/session.ts