[GH-ISSUE #2154] [Engine] answer GET /models/sse (llama.cpp's model status feed) #860

Closed
opened 2026-11-04 01:46:32 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @Daniel-Aaron-Bloom on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2154

Strata already mimics llama-server's router on /models: the listing reports the model's status (loaded / unloaded), so the model loads on use and can unload between requests. A front-end that watches that status (llama.cpp's own web UI, and any client that follows llama-server's model management API) also subscribes to GET /models/sse to learn about load and unload events as they happen, instead of polling. Strata answers that with a 404 today, so those clients log a warning and reconnect forever - Zed's llama.cpp provider retries every 5 s - and their model list never refreshes on its own.

The ask: answer GET /models/sse with 200 and text/event-stream, keep the connection open, and emit llama.cpp's status_change events (loading, loaded, unloaded) when the model loads, unloads or restarts - all transitions the server already knows about. A quiet feed sends the usual SSE-comment keep-alive.

I have a change ready that does this (the route, a broadcast on the existing load/unload transitions, tests in serve/test_lifecycle.py, docs in DETAILS.md); the PR follows. It is purely additive: every existing endpoint answers exactly as before.

Re-checked on 0.2.2 (main 011c9e60): serve/server.py still has no /models/sse route, so the 404 and the endless reconnects still stand. Checked by reading the code on that revision, not by a live server run.

Environment: Apple M4 Max (64 GB unified memory, no discrete GPU), macOS 26.6.2.

The change is in #2155, reopened and merged with main; its serve/test_lifecycle.py tests (13) pass on that revision.

Originally created by @Daniel-Aaron-Bloom on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2154 Strata already mimics llama-server's router on `/models`: the listing reports the model's status (`loaded` / `unloaded`), so the model loads on use and can unload between requests. A front-end that watches that status (llama.cpp's own web UI, and any client that follows llama-server's model management API) also subscribes to `GET /models/sse` to learn about load and unload events as they happen, instead of polling. Strata answers that with a 404 today, so those clients log a warning and reconnect forever - Zed's llama.cpp provider retries every 5 s - and their model list never refreshes on its own. The ask: answer `GET /models/sse` with 200 and `text/event-stream`, keep the connection open, and emit llama.cpp's `status_change` events (`loading`, `loaded`, `unloaded`) when the model loads, unloads or restarts - all transitions the server already knows about. A quiet feed sends the usual SSE-comment keep-alive. I have a change ready that does this (the route, a broadcast on the existing load/unload transitions, tests in `serve/test_lifecycle.py`, docs in `DETAILS.md`); the PR follows. It is purely additive: every existing endpoint answers exactly as before. Re-checked on 0.2.2 (main `011c9e60`): `serve/server.py` still has no `/models/sse` route, so the 404 and the endless reconnects still stand. Checked by reading the code on that revision, not by a live server run. Environment: Apple M4 Max (64 GB unified memory, no discrete GPU), macOS 26.6.2. The change is in #2155, reopened and merged with main; its `serve/test_lifecycle.py` tests (13) pass on that revision.
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6270846951 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Author
Owner

@Daniel-Aaron-Bloom commented on GitHub (Oct 23, 2026):

/reopen

<!-- gh-comment-id:6370127988 --> @Daniel-Aaron-Bloom commented on GitHub (Oct 23, 2026): /reopen
Author
Owner

@github-actions[bot] commented on GitHub (Oct 23, 2026):

Reopened, thank you. A maintainer will pick it up from here.

<!-- gh-comment-id:6370131347 --> @github-actions[bot] commented on GitHub (Oct 23, 2026): Reopened, thank you. A maintainer will pick it up from here.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659252177 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#860
No description provided.