Repository navigation
Unsloth Studio / Desktop: pick, download and load models on a linked instance from the chat and Images pickers - #12093
Draft
LeoBorcherding wants to merge 59 commits into
Draft
LeoBorcherding wants to merge 59 commits into
LeoBorcherding wants to merge 59 commits into
Conversation
…rve their models through /v1
…mote's own API; API page panel and details dialog
…w and grows on scroll, detail pane follows the newest request, no truncated labels
…what the caller receives
The rail, the settings row and the details dialog read only the first GPU, so a machine with an RX 6500 XT and an RX 5700 XT showed as one 4 GB card (and the settings row as 2x RX 6500 XT). They now name each card, sum the VRAM, and the dialog adds a Total VRAM line.
The rail groups cards by model and draws one VRAM cell per card in rows of up to 8. The details dialog puts Total VRAM first and scrolls the per-card list past two cards, numbering each card and wrapping long names instead of cutting them off.
…d images A half pill beside On Device switches the chat and Images pickers to a linked Unsloth Studio. Recommended and On Device then list that machine's models; a pick downloads and loads there through an allowlisted proxy that adds the instance's key server-side. /v1/images/generations forwards @name/model ids, and the Images page loads and generates on the machine its model came from.
A probe that timed out marked a reachable machine offline and the panel refused to list it. The panel now tries the machine's inventory and reports only a real failure. Fit, the header and the machine menu use every card's VRAM, since llama.cpp splits a GGUF across them.
…detectCapabilities The Images trigger names the linked machine with the cloud icon, as chat does for @-ids. The media filter used detectCapabilities without importing it.
…s on the tab row Linked quant rows use the local variant markup: mono label, downloaded tag, fit badge and size. The panel widens by the machine switch so All and Recent no longer wrap.
…instances # Conflicts: # studio/frontend/src/features/api-monitor/api-monitor-page.tsx
…odel-picker # Conflicts: # studio/frontend/src/features/chat/api/chat-adapter.ts
This was referenced Oct 1, 2026
Main's contrast-slider scan covers the rail: its bar tracks now use the contrast-wash gain.
…d UI scale checks Read the media catalogs inside a function, since they come through the chat barrel and a module-scope read throws when the import cycle re-enters. Keep the picker's resolved memo named currentModel and call the linked-machine wrapper triggerModel, so the dropped-model label check finds the memo that consults the connections. The gallery delete test stubs ip(), which every image route goes through for the linked machine. The machine name's max width scales with --ui-space-scale.
/v1/models lists every linked instance's models as @name/id, embedding models included, but /v1/embeddings had no linked branch, so a client that picked one got the local embedding path or an error instead of the instance that serves it. It now resolves and forwards like completions does. Test added.
…CI contracts The Hebrew and Swedish overlays arrived with the merge of main and had none of the 61 linked-instance strings, which fails the strict i18n check. The linked-instance routes are owner-only installation objects, so the account isolation matrix skips them with that reason, as it does for NPU models. The usage-examples contract reads the filtered catalog set, the API page's overflow contract leaves the font-mono example request alone, and a blank line from the merge resolution is formatted away.
The proxy is behind the same installation-owner check as the other linked-instance routes, so it carries the same skip reason.
Image, speech and separation models carry a task, and none of their endpoints forwards a linked id, so advertising them sent a client that picked one to the local media runtime. They are left out until their endpoint forwards. Test added.
Image generation resolves and forwards a linked id here, so text-to-image rows stay in the linked catalog; speech and separation rows stay out.
The catalog filter ran after probe, so the status cards in Settings still listed media models as copyable ids. The filter now runs in probe, which both read. Test added.
…witch Picking a model on another machine moved progress polling, Stop and the gallery before the busy check, so Stop could go to the wrong machine. The switch is now refused while work is running. An idle switch kept the old machine's shelf, whose actions then went to the new machine; it is now dropped, any listing in flight is fenced, and the new shelf is fetched. Test added.
…gone A removed linked instance left its id stored, so every Images request went to its proxy and returned 404. Once the refreshed list lacks it, the page switches to this machine through the same path a pick takes; the list is force-refreshed on open so a removal in Settings is seen. Test added.
Chat completions ran the local tool admission before resolving a linked model, so on a managed install a full-access request to a linked model was refused here although the linked server applies its own policy. It now resolves first, as responses and messages already do. Test added.
LeoBorcherding
marked this pull request as draft
November 20, 2026 08:15
This branch has not been deployed
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.
Builds on #12092 (linked instances); review that one first. The diff includes its commits until it merges.
A half-pill beside Recommended / On Device picks which machine the chat and Images pickers browse. Choose a linked instance and its catalogue, downloads and loads all happen there; this machine's disk and GPU are untouched.
What it adds
/v1as@name/model./api/linked-instances/{id}/proxy/{path}relays an allowlisted set of calls (model lists, hub downloads, inference load/unload/status, image routes) with the instance's key. Settings, keys, accounts and training are not on the list. Gallery URLs in responses are rewritten to come back through the proxy.Screenshots
Chat picker, before (main) and after:
Image picker, before and after (browsing @colab):
Machine switch from chat and from Images (the 4, 8 and 16 GPU entries are fake local servers, there to check the layout):
Recommended and On Device on @rx6500:
A download on @wsl:
Chat served by @rx6500:
Qwen-Image generated on @colab:
Where it was run
Measured at
810655de03.Not run:
Known gaps
Tests
test_linked_instances.pyon this branch: 40 pass, including the proxy allowlist, key injection, URL rewrite, query and binary streaming.