Model selection resets to default on tab navigation — not persisted per thread or globally
Description
Changing the model in the composer (chat-v1 → DeepSeek v4 Flash) is not persisted anywhere — not per thread, not globally. Navigating to another tab (Skills, MCP Servers, Connections) and back to Chat resets the selector to the default, and the next message is sent on the default model. Observed twice in one session, same thread.
Reported by: Alan (QA)
Build: v0.63.29 (default was chat-v1). On v0.63.31 the boot default is openrouter/deepseek/deepseek-v4-flash; retest whether a non-default choice still resets.
Reproducible: Yes
Steps to reproduce
- In Chat, open the model selector and choose
deepseek-v4.1-flash - Send a message — log shows
[session-builder] agent_id=orchestrator … resolved_model=openrouter/deepseek/deepseek-v4.1-flash - Click Skills (or any other sidebar tab), then click Chat
- Send another message
Log timeline from the session (same thread-aba8e711…):
14:10:31 resolved_model=openrouter/deepseek/deepseek-v4.1-flash ← selected
14:13, 14:15 deepseek (held)
14:17:47 resolved_model=chat-v1 ← reset after tab switch
14:43:24 deepseek ← re-selected
14:50:22 chat-v1 ← reset again
No config write or thread-settings RPC appears between the selection and the reset; every turn is cache miss — rebuilding session agent … via profile 'default', so whatever the composer sends on that message wins.
Expected behaviour
- The chosen model persists for the thread (and optionally as the new default) across navigation and restart
- The selector reflects the model the next message will actually use
Actual behaviour
- Selection lives only in composer component state; remount resets it; backend has no record
Impact
- Users are silently switched back to the default model mid-conversation
- Cost/quality expectations broken; impossible to reliably test a non-default model
Acceptance criteria
- [ ] Model selection is written to thread settings (and a "set as default" option writes config)
- [ ] Selector state is read from the thread on mount, not initialised to default
- [ ] Chat → other tab → Chat → send uses the selected model (verified in
resolved_model) - [ ] Persists across app restart
- [ ] Reproducible on v0.63.29 — confirm on v0.63.31 and fix in next build
Model selection in the composer is only held in component state and resets to default when navigating away from Chat and back, causing messages to be sent on the wrong model. This is a bug because user choice is silently lost; priority p2 because it breaks a core workflow (model selection) but there is a workaround (re-select before sending), and no data loss or outage.
Labelled priority: p2.
@Al629176 This looks already fixed on main by e44b7743f. The model you pick now gets saved as your default, so it should stay put after switching tabs or restarting. It's one setting for all chats though, not per thread.
Closing: already fixed on main, verified at 0f1ecc9d2.
The fix is e44b7743f, which adds applyComposerModel (app/src/pages/Conversations.tsx:480-496) persisting the choice through openhuman.inference_update_model_settings. Confirmed as an ancestor of upstream/main, and applyComposerModel is present in the current tree.
Worth recording how this was nearly missed. That commit's subject is "fix(conversations): handle empty conversation list gracefully" — it says nothing about model persistence. A fleet worker had a correction drafted contradicting @obchain's earlier comment on the strength of that subject line, and reading the diff reversed it. obchain was right.
The general lesson, for anyone triaging from git log: a commit subject describes the author's headline intent, not the diff's full effect. Fixes frequently ride along inside commits named for something else. Verify a fix claim by reading the diff (git show <sha>, or git diff ${SHA}^1 ${SHA} on a merge), not by the subject.
If model selection still resets on tab navigation for you on a build containing e44b7743f, please reopen with the version — that would mean a second path is involved.