Repository navigation
Studio: embedding model picker, pins and eject in the RAG menu - #12875
Conversation
- "Embedding <model> >" chip in the RAG menu heading, owner only. Click opens a picker with the current, default and pinned models; picking one switches the embedding model. Change model opens Settings at the embedding model row. - Pin buttons on Settings > Documents & RAG picker rows and in the RAG picker. Pins are stored per browser. - switchEmbeddingModel mirrors the Settings save order (claim, resolve, save) and reports models that still need a download. - Rename the shared chip class to menu-heading-chip.
|
Status of the red checks here:
|
|
Correction to my earlier note: the |
- RAG menu: the Model chip swaps the menu to the model list in place, with Select model, More models, hover-only grey pins and Eject while a model is resident. - Settings: long description and re-index note move behind an info hint; status shows On device with a hint, and Not loaded under the picker. - Picker trigger shows a tick when loaded and ejects on hover, like the chat model picker.
|
@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. |
…ings, focusable Eject
|
@codex review |
|
@codex review |
…nsformers owner for bare aliases
|
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! 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". |
Summary
Adds an embedding model picker to the RAG menu, plus pinning so people can switch between embedding models without going back to Settings each time. Also tidies the Settings embedding row and lets the embedding model be ejected from both places.
RAG menu
/api/settings/embedding-modelroute is owner only.general-rag-embeddingscroll target).Settings > Documents & RAG
Implementation
useEmbeddingPinsStore: pinned model ids in localStorage (unsloth_embedding_pins), mirrored to the account like the model picker pins, so an account switch's localStorage purge does not lose them.pins-mirror.tsmoves tosrc/liband gains anembeddinglist;/api/settings/pinned-modelsgains a matchingembeddingfield, stored per account asrag_embedding_pinned.switchEmbeddingModelkeeps the Settings picker's order: claim save order, resolve, then save what the resolve found (GGUF repo and backend), through the shareduseEmbeddingModelStore. A pick made in Settings and one made in the RAG menu cannot land out of order.ejectEmbeddingModelgoes through the store's existingapplyResidency(unloadEmbeddingModel)path, the same one Settings uses, so it never takes a place in save order.embeddingModelName/embeddingModelOwnerturn repo ids and local paths into row labels.sandbox-level-chiptomenu-heading-chip.Testing
npm test: 10781 pass, 0 fail.pytest tests/test_account_chat_settings.py -k pinned: 6 pass, covering the newembeddinglist.typecheck,i18n:checkandbuildpass. No new lint errors in touched files.rag-embedding-picker.test.tscovers the switch outcomes (saved, needs download, resolver error, superseded, failed resolve still saves, failed save), eject going through the residency path, name and owner parsing, row order, the owner only chip and in place list swap, the Settings deep link, pin wiring and styling, the info hints, and Eject only showing while a model is resident.