[GH-ISSUE #14534] app: fix model picker not updating when switching between chats #71489

Closed
opened 2026-05-05 01:53:36 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @iamadalek on GitHub (Mar 1, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14534


title: "Fix model picker not updating when switching between chats"
slug: "fix-model-picker-chat-switch"
status: defined
created_at: "2026-03-01T00:00:00Z"
domain: coding
intent: "Fix bug where model selection popup shows wrong model after switching between chats in the desktop app"

Problem

When using the Ollama desktop app (macOS), the model picker dropdown does not update correctly when switching between chat sessions that use different models. If a user starts a long-running chat with model A, switches to view a historical chat that used model B, then switches back to the original chat, the model picker still displays model B instead of model A. The picker eventually corrects itself after 0.5–1 second, but only after the chat has completed — during active streaming it stays wrong.

This is a long-standing bug present across many versions (confirmed through 0.17.4). It creates user confusion about which model is actively responding.

Related upstream issue: https://github.com/ollama/ollama/issues/14504

Requirements

  1. The model picker must reflect the correct model for the active chat immediately upon switching chats
  2. The update must happen synchronously with the chat switch — no 0.5–1 second delay
  3. The fix must work for both in-progress (streaming) chats and completed (historical) chats
  4. No regression in model picker behavior when starting new chats or selecting models manually

Acceptance Criteria

  • Switching from chat using model A to chat using model B updates the model picker to show model B immediately
  • Switching back to the original chat updates the model picker to show model A immediately
  • Model picker updates correctly even when the original chat is still streaming a response
  • Model picker updates correctly for completed/historical chats
  • No visual flicker or intermediate incorrect state during the switch
  • Existing model selection behavior (manual model changes, new chat creation) is unaffected

Constraints

  • Fix must be in the React+TypeScript desktop UI layer (app/ui/)
  • Must use existing state management patterns (TanStack React Query, React context, TanStack Router)
  • Must not change the REST API contract or server-side behavior
  • Must maintain compatibility with the WebView integration layer
  • Follow existing component patterns: function components, custom hooks, Tailwind CSS

Dependencies

  • Requires understanding of useSelectedModel hook and how chat-to-model association is stored/retrieved
  • Requires understanding of TanStack Router's navigation lifecycle and how route params propagate to the model picker
  • Key files to investigate: app/ui/app/src/components/ModelPicker.tsx, app/ui/app/src/components/Chat.tsx, app/ui/app/src/routes/c.$chatId.tsx
  • No external dependencies or blocking work items
Originally created by @iamadalek on GitHub (Mar 1, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14534 --- title: "Fix model picker not updating when switching between chats" slug: "fix-model-picker-chat-switch" status: defined created_at: "2026-03-01T00:00:00Z" domain: coding intent: "Fix bug where model selection popup shows wrong model after switching between chats in the desktop app" --- ## Problem When using the Ollama desktop app (macOS), the model picker dropdown does not update correctly when switching between chat sessions that use different models. If a user starts a long-running chat with model A, switches to view a historical chat that used model B, then switches back to the original chat, the model picker still displays model B instead of model A. The picker eventually corrects itself after 0.5–1 second, but only after the chat has completed — during active streaming it stays wrong. This is a long-standing bug present across many versions (confirmed through 0.17.4). It creates user confusion about which model is actively responding. Related upstream issue: https://github.com/ollama/ollama/issues/14504 ## Requirements 1. The model picker must reflect the correct model for the active chat immediately upon switching chats 2. The update must happen synchronously with the chat switch — no 0.5–1 second delay 3. The fix must work for both in-progress (streaming) chats and completed (historical) chats 4. No regression in model picker behavior when starting new chats or selecting models manually ## Acceptance Criteria - [ ] Switching from chat using model A to chat using model B updates the model picker to show model B immediately - [ ] Switching back to the original chat updates the model picker to show model A immediately - [ ] Model picker updates correctly even when the original chat is still streaming a response - [ ] Model picker updates correctly for completed/historical chats - [ ] No visual flicker or intermediate incorrect state during the switch - [ ] Existing model selection behavior (manual model changes, new chat creation) is unaffected ## Constraints - Fix must be in the React+TypeScript desktop UI layer (`app/ui/`) - Must use existing state management patterns (TanStack React Query, React context, TanStack Router) - Must not change the REST API contract or server-side behavior - Must maintain compatibility with the WebView integration layer - Follow existing component patterns: function components, custom hooks, Tailwind CSS ## Dependencies - Requires understanding of `useSelectedModel` hook and how chat-to-model association is stored/retrieved - Requires understanding of TanStack Router's navigation lifecycle and how route params propagate to the model picker - Key files to investigate: `app/ui/app/src/components/ModelPicker.tsx`, `app/ui/app/src/components/Chat.tsx`, `app/ui/app/src/routes/c.$chatId.tsx` - No external dependencies or blocking work items
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#71489