ui: model status and load progress via /models/sse feed - #24878
Merged
ServeurpersoCom merged 3 commits intoJun 22, 2026
Conversation
Contributor
Author
|
We can configure the displayed text and the percentage for draft/mmproj inside model-loading.ts : And it will be easy to make it work for downloading and single model mode when the backend does. |
ServeurpersoCom
commented
Jun 21, 2026
…he chat and /models/sse parsers
ngxson
approved these changes
Jun 22, 2026
allozaur
requested changes
Jun 22, 2026
allozaur
left a comment
Contributor
There was a problem hiding this comment.
Wonderful work. One architectural nitpick and we good to go @ServeurpersoCom
Address review from allozaur
allozaur
approved these changes
Jun 22, 2026
papamoose
pushed a commit
to papamoose/llama.cpp
that referenced
this pull request
Jun 27, 2026
* ui: model status and load progress via /models/sse feed * ui: centralize SSE wire-format delimiters into shared constants for the chat and /models/sse parsers * ui: type /models/sse event names as a ServerModelsSseEventType enum Address review from allozaur
adrianhoehne
pushed a commit
to adrianhoehne/llama.cpp
that referenced
this pull request
Jul 5, 2026
* ui: model status and load progress via /models/sse feed * ui: centralize SSE wire-format delimiters into shared constants for the chat and /models/sse parsers * ui: type /models/sse event names as a ServerModelsSseEventType enum Address review from allozaur
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
When you pick a model that is not loaded yet, you now see what is happening instead of a silent wait: the model row shows a live status and a progress bar as it loads, and if you just send a message to a cold model, the same progress shows right in the chat while it warms up. It updates itself in real time, so the interface always reflects the real state of your models.
Additional information
Video
LoadingProgress.mp4
Implementation
Replace the post-operation status polling with a single persistent /models/sse feed that becomes the source of truth for model state in router mode. The feed drives live row status, staged load progress and load/unload completion, surfaced both in the model selector and inline in chat while a cold model warms up. The stage labels and the tail share that each phase owns are centralized as constants, so the per-stage reports unify into one global percentage: text_model fills the bar while each later phase, spec then mmproj, takes a configurable trailing slice (set to 10%), tune the share and the names in one place. It is one reconnecting reader with one awaiter per model, no per-operation streams. Dispatch is event-kind based so it extends cleanly: the upcoming dedicated download process slots in by adding a downloading status and download_* events on the same feed, with its own byte-based progress alongside the stage-based load progress, no rework of the backbone.
Built on the server-side feed work by @ngxson : real-time load progress via /models/sse (#24828), mtmd load progress callback (#24865) and the spec model fix with the stages list (#24870); the dedicated download process (#24834) plugs into the same feed.
Ref: #24822
Requirements