Serve and update models in the background from the console, and follow them under Jobs

The console starts a serve or update job over the admin API and stays,
instead of closing to follow the download. Jobs lists them with their
progress and steps; the sidebar counts those running. ctl model serve and
update take --detach; ctl jobs lists jobs and follows one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-04 01:27:02 +02:00
1 parent d311a3ca4a
commit e12996f7dd
12 files changed
+280 -34

No files matched your search

+7
View File
@@ -122,6 +122,13 @@ func (a *API) Register(mux *http.ServeMux) {
mux.HandleFunc("POST /api/v1/restart", a.restart)
mux.HandleFunc("POST /api/v1/models/serve", a.serveModel)
mux.HandleFunc("GET /api/v1/jobs/{id}", a.job)
mux.HandleFunc("GET /api/v1/jobs", func(w http.ResponseWriter, _ *http.Request) {
out := []modelserve.Job{}
if a.serve != nil {
out = a.serve.Jobs()
}
writeJSON(w, http.StatusOK, out)
})
mux.HandleFunc("GET /api/v1/updates", a.listUpdates)
mux.HandleFunc("POST /api/v1/updates/check", a.checkUpdates)
mux.HandleFunc("POST /api/v1/models/{name}/update", a.updateModel)