Skip to content

Desktop: offer Restart model when the running model gets its vision files (ATO-1373) - #1144

Closed
sosidudku1 wants to merge 4 commits into
bugs-1370-vision-fetch-buttonfrom
bugs-1373-vision-restart
Closed

sosidudku1 wants to merge 4 commits into
bugs-1370-vision-fetch-buttonfrom
bugs-1373-vision-restart

Conversation

@sosidudku1

@sosidudku1 sosidudku1 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes ATO-1373 (part of ATO-1360). Stacked on #1143 (ATO-1370 / ATO-1372; base is that branch); merge that one first.

What was wrong. A vision projector is read only when a model starts. Fetching it for the model that is already running changed nothing: the Switch card is dropped for the current model, and the model stayed without vision although the file was on disk.

What changed (the option proposed in the issue; Nadya's call)

  • When a finished pull is for the model the local server runs now (modelServingNow: the status poll, else the live local pick), the download card shows Vision files for <model> are ready with a Restart model button instead of Switch.
  • Nothing restarts by itself: a restart would end a reply in progress. Under a running turn the button is refused with the reason and the offer stays (llmTurnsRunning / llmStopRefusal, as Settings' Restart model does).
  • Restart goes through the existing llmRestartModel (ATO-852), which now returns whether the model came back up. A failed restart keeps the offer with the reason.
  • The offer goes away once that model stopped or started again some other way (a new server pid), or on its × ("Later": the next start reads images).
  • A model that is not running gets nothing: its next start picks the projector up.
  • Both finished-pull paths (Settings and the picker) ask visionLanded before setting up a Switch.
  • The picker's finished pull reads the model status afresh before deciding (selPullFinished is async now), since the status is otherwise refreshed only by Settings and Diagnostics. catalog-projector.test.mjs and switching-outbox.test.mjs wait for it.
  • New test desktop/test/vision-restart.test.mjs, including a stale reading of the old model after a picker switch.

How to check. Start a vision model without its mmproj-*.gguf, send a couple of messages. Settings › Get vision files, wait for it to finish. The card says the vision files are ready, with Restart model; the chat is not cut. Press it: the model restarts and an attached image is now described. Press it during a reply: a refusal, the reply goes on.

Checked on the second Mac on 12.11.2026 in the combined run with the other open PRs: build, lint, test types, vitest, desktop unit tests, desktop smoke and live smoke all green.

… files (ATO-1373)

A vision projector is read only when a model starts. Fetching it for the
model that is already running changed nothing: the Switch card is dropped
for the current model, and the model stayed without vision although the
file was on disk.

When the finished pull is for the model the local server runs now, the
download card shows "Vision files for <model> are ready" with a Restart
model button instead of Switch. Nothing restarts by itself, since that
would end a reply in progress; under a running turn the button is refused
with the reason and the offer stays. The offer goes away once that model
stopped or started again another way. A model that is not running gets
nothing: its next start picks the projector up.
… (ATO-1373)

The status the offer checks is refreshed only by Settings, its poll and
Diagnostics. After a switch in the composer's picker it could still name
the old model, so Get vision files from the picker gave no Restart offer,
or one for the old model and its old server pid.

selPullFinished now reads the status afresh first, as llmAfterPull does.
It is async now; the two tests that call it wait for it.
…nto bugs-1373-vision-restart

# Conflicts:
#	desktop/test/catalog-projector.test.mjs
#	desktop/test/switching-outbox.test.mjs
@sosidudku1

Copy link
Copy Markdown
Collaborator Author

Closing: this code is already merged into rel/xp-build via #1257 (and into main via #1256 where it applies). GitHub did not mark it merged because the PR targets another feature branch.

@sosidudku1 sosidudku1 closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant