Repository navigation
Studio: loaded models card and live monitor fixes - #14601
Conversation
|
@codex review |
1 similar comment
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9dd1294f57
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!(before.backend_loaded ?? before.loaded)) | ||
| return { status: "alreadyFree" }; | ||
| await useEmbeddingModelStore | ||
| .getState() | ||
| .applyResidency(unloadEmbeddingModel); |
There was a problem hiding this comment.
Verify the embedding model identity before ejecting it
If the embedding model is replaced between the card's five-second polls (for example, from another tab), clicking the stale model A row unloads the newly resident model B. The fresh status read only checks whether any embedder is loaded; it never compares before.embedding_model with entry.name, and /api/settings/embedding-model/unload unconditionally releases the current backend. When the fresh response identifies a different loaded model, return a replaced outcome instead of unloading it, as the image and video eject paths already do.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 7092913: a different resident embedder now returns replaced instead of being unloaded.
| const decision = await confirmStopRunningChatsIfNeeded( | ||
| "Unloading this model", | ||
| "unloadOne", | ||
| entry.name, |
There was a problem hiding this comment.
Scope the serving-model stop confirmation by checkpoint
When two kept local models share a display name but have different checkpoints, ejecting the second one checks the first one's running chats: confirmStopRunningChatsIfNeeded passes entry.name to /active-generations, whose model_slots.serving_slot selects the first matching slot. The subsequent unload correctly uses the checkpoint, so the confirmation and unload target different models. This can reject an unload with 409 without offering the required confirmation, or, after confirmation, stop prompt queues belonging to the model that should remain loaded through requestScopedLocalPromptQueueStop(decision.promptQueueThreadIds). Pass checkpoint to the confirmation helper so both operations address the same slot.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 7092913: the running-chat check now gets the checkpoint, the same id the unload uses.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
The loaded-models indicator Playwright suite fails on this PR, at the same step on two platforms (base
Main's recent Mac and Windows UI runs pass this suite, and this PR changes the loaded-models card / live monitor that the step drags. The element the step measures is probably no longer rendered, or no longer matched by the suite's locator, after the restore. Either the card should still restore to its saved position, or the suite needs the new selector in this PR. |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf5f898a08
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!name || (active && (checkpoint === activeCheckpoint || name === active))) { | ||
| continue; |
There was a problem hiding this comment.
Deduplicate the active serving row by checkpoint, not label
When the active model and another kept local model share a display name but have different checkpoints (for example, /x/model.gguf and /y/model.gguf), name === active skips both serving entries. The later loaded loop also skips that name, so the second model disappears from the card despite still occupying memory, leaving no eject control for it. When checkpoint identities are available, compare those alone to exclude the active model; use the display-name fallback only when a checkpoint is unavailable.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6e28467: with both checkpoints known the active model is excluded by checkpoint only.
|
@codex review |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts
Stacked on #14592 (same files); the diff below is against that branch.
What changes for users
Loaded models card
Real model names for image and video rows. A model loaded from a local snapshot showed
snapshots/<sha>; rows now show the Hub id the backend already sends asdisplay_repo_id. Eject still matches on the realrepo_id.Kept models no longer look idle. With "Keep multiple models loaded", models answering requests from extra slots were labelled "Still in memory" and treated as inactive. They now show "Also serving" and eject by their own checkpoint, never the active model.
Memory per model. The chat, image and video status routes report an additive, best-effort
resident_mib:Rows append it, e.g. "Chat · GGUF · Q4_K_M · 1.0 GiB". Unknown stays hidden.
The RAG embedding model is listed (owner only, while resident) and can be ejected from the card.
Managed accounts: when another account's model holds the GPU, the card shows one "In use by another account" row instead of nothing.
Small fixes:
Live monitor
How it was verified
npm run typecheck,npm run i18n:check:strict, the fullnpm test(13423 pass, 0 fail) andnpm run buildall pass. New tests:loaded-models-floating-polish,loaded-models-eject-serving,floating-monitor-polish, plus a case inloaded-models-dismiss.tests/test_loaded_model_resident_mib.py; related status and media tests pass (390).ruff checkis clean.unsloth/Qwen3-0.6B-GGUFQ4_K_M loaded through llama.cpp:/api/inference/statusreturnsresident_mib: 983, and the card row reads "Chat · GGUF · Q4_K_M · 1.0 GiB".Both panels with a model loaded:
The monitor after the server stops:
Not tested here