Repository navigation
Unsloth Studio / Desktop: link other Unsloth instances and serve their models through one API as @name/model - #12092
Draft
LeoBorcherding wants to merge 32 commits into
Draft
LeoBorcherding wants to merge 32 commits into
LeoBorcherding wants to merge 32 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.
/v1/models only flags chat models, so an instance running an image model read as idle.
…soning A thinking model streams reasoning_content first, so TTFT waited for the answer and the monitor showed a 46 s first token and a four-figure tok/s.
…instances # Conflicts: # studio/frontend/src/features/api-monitor/api-monitor-page.tsx
This was referenced Oct 1, 2026
Main's contrast-slider scan covers the rail: its bar tracks now use the contrast-wash gain.
/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.
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.
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.
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.
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.
Link other Unsloth Studio instances (a Colab runtime, a WSL session, another PC on the LAN) to this one, and every model they serve shows up in this instance's
/v1/modelsas@name/model. One base URL and one API key reach every GPU; requests for an@name/model are forwarded to that instance with its own key, which stays server-side.What it adds
/v1/chat/completions,/v1/completions,/v1/messages,/v1/responses,/v1/embeddingsand image generations route by the@name/prefix. Streaming passes through, and usage is requested and counted even when the caller didn't ask for it.Only the installation owner, from a UI session, can manage links. API-key callers can use linked models but cannot list or change the links.
Screenshots
API page, before (main) and after:
Settings → API, before and after (the Colab tunnel URL is blurred):
Row menu, details for a 2-GPU machine, and the Add form:
A forwarded request in the API monitor:
2, 4, 8 and 16 GPU cards. The 4, 8 and 16 are fake local servers returning spoofed
/api/systemdata, there only to check the layout:Where it was run
Every row is the real app, not a mock, measured at
e1c01abdcc./v1, pooled VRAM, per-card rowsNot run:
/api/systemfields. Every field is treated as optional, but nothing that old was linked.Tests
studio/backend/tests/test_linked_instances.py: 27 pass.studio/frontend/tests/linked-instance-gpu-pool.test.ts: 4 pass.