Repository navigation
Studio: read the local model cache locally, and keep host paths off the API - #11026
Conversation
…phase The local model inventory is a filesystem listing, so its rows carried the directory each copy was found in. A browser session is the operator looking at their own machine, and the UI renders that path and hands it back to the delete endpoint. An sk-unsloth API key is not: it is denied the ambient Hugging Face credential, and the absolute cache root, the home directory above it and the account name inside it are host detail it never needed in order to enumerate what is downloaded. The inventory keeps answering every authenticated caller with the same repo ids, sizes, capabilities and partial state. For an API key, every host path in the payload is now replaced by an opaque reference that is stable for the life of the server, so rows can still be compared and de-duplicated, and the scan roots are dropped rather than referenced. The same hygiene is applied to the inventory log lines, which interpolated raw exceptions and raw cache directories. Separately, a load that begins believing the weights are cached can still turn into a download when the backend re-fetches a blob it will not resume. The chat load toast said "Loading cached model into memory" throughout, so the transfer was invisible. It is now watched for, and once bytes are seen to grow the phase, the progress and the wording change to name it.
The cache-read gate put a live /auth-check round trip in front of every read of the host's own Hugging Face disk cache, and collapsed "could not ask" into "denied". A purely local question -- is this repo on my disk, what can it do, load it -- then depended on reaching huggingface.co, so HF_HUB_OFFLINE=1, an air-gapped host, a Hub outage, a rate limit, or an HF_ENDPOINT mirror that never implemented the undocumented /auth-check route all reported a fully downloaded model as unavailable and refused to load it. The probe now answers three ways instead of two: the Hub confirmed it, the Hub answered no, or the Hub could not be asked. Only an answered no denies. An unaskable Hub resolves against the disk instead: present in one of this host's caches means authorized, because the bytes are already here and nothing new is fetched by saying so; absent still means refused, because there is nothing to serve and the caller would only be asking the backend to go and fetch it. Classification is measured against the live endpoint rather than assumed. A public repo answers 200, a gated one 401 with X-Error-Code: GatedRepo, a private or missing one a bare 401; /auth-check on a path that is not a route answers 404 with generic HTML. So 401, 403, 410 and 451, plus a 404 carrying an HF error code, are answers; a bare 404, a 405, a 429, a 5xx, a redirect away from the repo that was asked about, a timeout and a refused connection are not. An unreachable probe is memoized as unknown rather than as a denial, so the window no longer hands every caller a refusal the Hub never gave and a download finishing inside it takes effect at once. The presence check is a disk walk that never dials out, and requires a readable listing to have actually found a cache directory for the repo, so one unreadable cache root cannot declare every repo present. A probe that raises is a failure to ask, not a 500 on the route. load_model_config's anonymous branch refused every cache-only read outright, which cost an API client its own public downloaded models on exactly the host where the cache is the only answer there is. It now asks the shared rule, which also closes the reverse hole: online, that branch served a cached private config.json with no gate at all. The boundary is unchanged where it matters. A UI session keeps its ambient entitlement, an API key still cannot borrow it for a network fetch, and online an API key that cannot reach a private repo is still refused the operator's cached copy of it. tests/test_hub_token_caller_identity.py: the unreachable-probe memo assertion asserted the stored value was False, which is the behaviour being removed; it now asserts None, with the reason in place. (cherry picked from commit f9907415f50af57aa782caccac6d865756fa58e8)
The offline precondition in utils.utils.anonymous_and_offline was a blanket: an API client with no Hub token, on an offline host, was refused every cached model before any per-reader gate ran, public repositories included. Fixing the gates alone therefore left the operator with the same 404. Given the repository the caller named, it now asks the shared cached-read rule, which offline resolves against the disk: a repository that is present is served, one that is not is still refused, because then there is nothing local to decide with and saying yes would only authorize a new network fetch. Online behaviour is unchanged, deliberately, since this guard has always been the offline precondition and the per-reader gates own the online question. The two refusal messages now name the cache as well as the credential. With a local read no longer decided by reaching the Hub, "cannot be authorized" on its own sent operators looking for a credential problem that was not there.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebfe28b3f6
ℹ️ 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".
| online, an API key that cannot reach a private repo is still refused the operator's | ||
| cached copy of it. | ||
| """ | ||
| return _repo_present_on_disk(repo_id, repo_type) |
There was a problem hiding this comment.
Require caller authorization before trusting local presence
When /auth-check is unavailable because the host is offline, rate-limited, behind an incompatible mirror, or experiencing an outage, this authorizes any usable on-disk repository without establishing that the API caller may access it. Consequently, an sk-unsloth caller with no Hugging Face token or an invalid token can name a cached private/gated model or dataset and reach cache-only readers that return its configuration, templates, source snippets, or preview data. Disk presence proves availability to the operator, not authorization for a remote API caller; retain a prior affirmative authorization or fail closed for non-UI callers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not taking this one: the authorization check you are asking for is already the gate on this branch, in _caller_populated_the_cache, and _resolve_unaskable consults it before it ever looks at disk.
Drove the matrix rather than reading it:
host HAS a token, caller sends none -> authorized: False
host HAS a token, caller sends a wrong one -> authorized: False
host HAS a token, caller sends empty -> authorized: False
host HAS a token, caller sends the same -> authorized: True
host has NO token, caller sends none -> authorized: True
host has NO token, caller sends one -> authorized: False
ambient UNKNOWN, caller sends none -> authorized: False
ambient UNKNOWN, caller sends one -> authorized: False
The exact case named, an sk-unsloth caller with no Hugging Face token or an invalid one naming a cached private or gated repo, is rows 1 to 3, and all three refuse. The token comparison is hmac.compare_digest rather than ==, since it is a compare on a secret over a repeatable request.
The single True for a credential-less caller is the case where it cannot leak anything: the host has no ambient credential either, so nothing in that cache can have been fetched under a credential this caller lacks. That is the ordinary install this PR exists for, and it is why the check is "the caller that fact is about" rather than "any caller".
It also fails closed on the third state: an ambient token that cannot be established authorizes nobody, on both branches, rather than guessing.
A Hub that ANSWERS no never reaches this function at all, so an online API key with no access to a private repo is still refused the operator's cached copy.
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. |
Before and after, from two isolated installsTwo Studios built from this PR's merge base ( The picture is the parity half, and for a change that touches the inventory it is the important Footage of each side, offline, opening On Device on the seeded cache:
What did move, read from the same servers that were photographedAn
The first four rows are the disclosure in item 2 of #10147, closed without emptying the listing: The one path an API key still receives is Not shown here: the load toast naming a download phase. Staging it faithfully needs a cache that |
Two of the predicate tests asserted str(cache_dir) == "/studio/cache", where the value travels from the test's own Path through the production code and back through str(). On Windows that round trip spells it with backslashes, so four tests failed on a runner the backend suite has never been run on. Comparing Path to Path keeps the claim, which is which cache root was asked about.
Cross-platform CI, off the org queueRun on owned staging (
Counts are read out of each leg's log rather than taken from the green tick, since the generated Windows is the reason this was worth doing. On the first green-on-Linux pass it reported 4 failed, Those tests stub Before that, all three per-OS legs failed at collection with |
…ubber An unaskable Hub resolves the cached read against the disk, which is right for an offline operator. A 429 or a 5xx is unaskable while the Hub is still reachable from outside, and the verdict cache only holds a minute, so a caller the Hub had already refused could be handed the operator's cached copy of a private repo by an outage. Remember an answered no for longer than the verdict is cached and let it stand while the Hub cannot be asked; an answer of yes drops it, and a repo that was never refused is unaffected, so air-gapped hosts, outages and mirrors without the route behave as before. Also scrub a Windows UNC path in log lines, which kept the server and share name in full, and rebuild a NamedTuple in a redacted payload instead of raising.
|
Second pass over this one. Three things found and fixed on the branch, one of them on the boundary this PR exists to keep.
Fixed in 1e573dd, with six tests, including one pinning that the test reset drops the denial memory so it cannot leak between tests. Also checked:
One note unrelated to this PR: the |
|
Cross-platform run, head vs base, on the staging repo rather than the org queue. Head arm (PR merged onto main): macOS 15 882 passed / 3 failed, Windows 881 passed / 2 failed. Base arm (main alone, same generated jobs, same dependency set): macOS 1324 passed / 4 failed, Windows 1319 passed / 7 failed. Every failure the head arm shows is reproduced by the base arm:
The macOS three are the Apple Silicon refusal for minimax-h3 answering 400 where the test expects a quant verdict, which has nothing to do with this branch; they fail identically without it. The base arm also fails five tests the head arm does not, four in test_hub_token_caller_identity and one in test_openai_auto_switch, which is the base version of those files on Windows: the arms run each side's own tests, so that column is not a regression in either direction. The Linux leg has since finished green: ubuntu-latest 885 passed, 1 skipped, 0 failed. |
The status route took neither the api-key dependency nor the redactor, so polling a started run handed back the model path the inventory hides: the worker quotes what it is loading, and for a local model that is an absolute path. Scrubbing the message alone was not enough either, since a run's warnings quote the file they are about and no singular text field reaches a list.
The dataset preview recorded above list_repo_files, so a 404 or an outage left a record for a fetch that never happened and the first record stands; it now writes at each load_dataset call, the only place rows can materialise. Separately, the rule that keeps https:// intact refuses the leading slash of file:///home/..., so an exception formatting its filename as a URI went out whole through the retained error text an API-key caller reads.
…hing The anonymous config gate carried a second clause that discarded the very verdict the unaskable fallback produces: online but unable to ask, transformers serves the cached config.json after its own metadata request fails, which is the private read the gate is for. A public repo on disk is not the cost, since the provenance rule underneath refuses only where a credential could have filled that cache. The three call sites that fetch under a request token now wrap the call instead of writing beside it. The record still precedes the fetch, because a download that dies half way has filled the cache anyway, but a call that raised having left nothing on disk takes its record back, and only while the record is still its own.
|
Codex Review: Didn't find any major issues. Another round soon, please! 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 one-off-token contract was a 106-line test that failed as a single opaque assertion; it is now three tables (present, absent, ordered) of 25 named cases, so a broken rule says which rule. Four route tests that differed only in client or stub become two parametrized ones, which also gains the compat mirrors the browser-session leg they did not have. Coverage is unchanged, measured rather than assumed: four mutations (redaction off, provenance off, an unaskable probe denying again, text scrubbing off) kill exactly 32, 8, 25 and 27 tests before and after. Cases go 264 to 284, functions 121 to 120, lines 3355 to 3421: the tables cost about as much as the duplication they remove, which is the honest state of these two files.
The ledger of credentials this host has ever held was written only where an unaskable probe happened to consult it, so on an upgraded install an operator who replaced or cleared the saved token before any such probe left no trace of the old one, and a later outage handed a tokenless caller everything it had downloaded. The save and delete paths now record it while Studio still has it, and a row that exists but cannot be decrypted records a sentinel identity no caller can match, since an unreadable credential is still one this host held.
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
Removing the online clause from the anonymous config gate left its import unused, which the import-hoist gate blocks, and left `hub_answered_no` itself with no caller anywhere. It exists only to express the reasoning that clause got wrong, so it goes with it rather than sitting there for someone to reach for.
|
pre-commit.ci run |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
|
Both red checks on this head were investigated and neither reproduces against this branch's code. (Python 3.13, rest) failed 2 of 13073:
The head arm is the same tree that failed here, and it passed the whole shard. Both tests also pass in isolation on this head, and locally the full shard produces an identical failure set on both arms with nothing unique to either side. That matches what Composer (macos-latest, safari) failed in Neither run can be re-run through the API from here, so the two checks stay red on this commit until something else pushes the branch. |



Summary
Three connected things about the local model cache in Studio.
in Studio: verify Hub credentials before cache-backed reads #10264 put a live
/auth-checkround trip in front of every read of the host's own HuggingFace disk cache and collapsed "the Hub could not be asked" into "the Hub said no", so an operator
offline with a fully downloaded model, an air-gapped install, a Hub outage, a rate limit, or a
self-hosted
HF_ENDPOINTmirror that never implemented that undocumented route was told the modelwas unavailable.
under "Covered".
GET /api/hub/cached-modelsanswered ansk-unslothAPI key with the absolutecache directory of every cached repo, and
GET /api/hub/models-folderwith the absolute hub cacheroot. The listing still answers, with the same repo ids, sizes, capabilities and partial state;
the paths become an opaque reference. The dataset router and three routes that answer a path only
through
HTTPException.detailare outside this scope and unchanged.cached can still turn into a download, and it said "Loading cached model into memory" the whole
time, which is what [Studio Bug] Cached Qwen3.5-9B is re-downloaded, stalls on Xet, then fails after 14 minutes #9094's reporter watched for fourteen minutes.
Root cause
The local question was asked remotely.
hub/utils/hf_tokens.pyanswered a two-valued question,so every way of failing to reach the Hub became a denial: one blanket
except Exception: return Falseover a refused connection, a 5xx, a 429 and a bare 404 from a mirror with no route, and atimeout memoized as a denial for 30 seconds.
utils/utils.py::anonymous_and_offlinethen refusedevery non-local model at the route entry, before any of those gates ran.
The inventory is a filesystem listing, and it said so. Its rows carry the directory each copy was
found in. That is the right answer for the browser session, which is the operator looking at their
own machine and which hands the path back to the delete endpoint. It is not the right answer for an
API key, which is explicitly denied the operator's ambient Hugging Face credential in the first
place and never needed the cache root, the home directory above it or the account name inside it in
order to enumerate what is downloaded.
The load UI stopped asking.
let downloadComplete = isDownloaded || isCachedLora;sent a cachedload straight to the mmap poller, so a transfer starting afterwards was never polled for.
Changes
A Hub that cannot be asked is not a Hub that said no
hub/utils/hf_tokens.py._probe_repo_accessand_explicit_token_reaches_repobecomethree-valued:
Trueconfirmed,Falseanswered no,Nonecould not be asked. Denials are{401, 403, 410, 451}, a 404 carrying an HF error code, and hub's ownRepositoryNotFoundError,GatedRepoError,DisabledRepoErrorandRevisionNotFoundError. A bare 404, 405, 429, 5xx, a 3xx,a recorded redirect, a final URL that is not the repo asked about, a timeout and a refused
connection are not answers.
An unanswerable probe resolves against the disk, and only for the caller whose own credential
filled that cache. Presence reuses
hf_cache_state.repo_cache_has_usable_snapshot, so aninterrupted download is not presence, and it requires a readable listing to have actually found the
repo's cache directory. Provenance is recorded per repo at download time, carrying the identity of
the credential the fetch went out under, so a repo fetched under a one-off
X-Unsloth-HF-Tokenisnot later handed to the host's own credential, which cannot reach it on the Hub. An answered no is
remembered for longer than it is cached and stands while the Hub cannot be asked, since 429 and 5xx
are unaskable while the Hub is still reachable from outside.
utils/models/model_config.py,utils/utils.pyandroutes/models.pyask that same shared ruleinstead of refusing everything; online behaviour is deliberately unchanged.
What is deliberately unchanged: a UI session was never behind the probe and still is not; the
anonymous sentinel still cannot authorize itself; a local path is still never probed; and online, an
API key that cannot reach a private repo is still refused the operator's cached copy of it.
Host paths stay on the host
hub/utils/host_paths.pyis new and holds the whole decision. The caller class comes fromauth.authentication.authenticated_via_api_key, the dependency the ambient token boundary isalready drawn with. A redacted
cache_pathbecomes an opaqueref:<32 hex>, an HMAC under aper-process key: stable for the life of the server, so a client can compare two rows, group a
companion asset with its model and de-duplicate a repo cached under two roots, and not reversible
into a path.
nullstaysnull, because the download manager readscache_pathas a three-statediscriminator. Scan-root lists are emptied rather than referenced. Anything that is not a bool for
the caller class means no HTTP request was classified, which is an in-process call by the operator's
own process.
Covered:
/api/hub/cached-models,/api/hub/cached-gguf,/api/hub/models-folder,/api/hub/scan-folders(both verbs),/api/hub/local,/api/hub/hidden-models,/api/hub/orphan-companions,/api/hub/download-progress,/api/hub/gguf-download-progress,/api/hub/transport-status,/api/models/cached-modelsand/api/models/cached-gguf. Routes onthat router which answer no host path are listed with their reason in the new test, and a drift test
fails if a new route neither takes the caller class nor appears in that list.
scrub_pathsandshort_path_for_logshorten an absolute path in a log line to the two componentsthat identify it, beside
download_registry.scrub_secretswhich does the same for credentials.One path an API key still receives, deliberately:
load_id. It is the repo id in the ordinary caseand becomes a snapshot directory exactly when the bare repo id cannot reach that copy. It is then
the handle the load and train endpoints take, so blanking it would leave a caller able to see a model
and unable to load it, and substituting the repo id would load a different revision. The decision is
recorded in the module docstring, and
response_leaks_host_pathtakes an explicitignoreargumentso every test that tolerates it says so at the call site.
The download phase has a name
studio/frontend/src/features/chat/lib/cache-miss-download.tsis new and holds the decision as apure function. A byte count below the expected total proves nothing, since that is the ordinary state
of a partially fetched revision; only a count that grew between two readings is a transfer. A
complete reading resets the watch, and an unmeasurable cache is not evidence either way. Local paths,
Ollama manifests and cached LoRAs are never watched.
Compatibility
Three behaviour changes on inputs that previously succeeded.
A cached-model listing made with a Studio API key returns different JSON. String path fields come
back as
""and list path fields as[], for API-key callers only; an operator session isunaffected. So that a client can still tell "this row has no file" from "this row's path is
withheld",
cache_refis present exactly when the row had a path, and that equivalence is pinned bytests.
Cache reads are authorized more narrowly when the Hub cannot answer. Where a repository's status
is unaskable, presence on disk authorizes only the caller whose own credential populated that cache,
established from the per-repo provenance record rather than from what the host happens to hold now.
A caller with a valid Studio API key but a different HF token, or no HF token, is refused; so is a
host holding two different credentials, since either could have filled the cache. Where the
credential store cannot be read the outcome is "unknown", which authorizes nobody. What remains
uncovered is a cache filled before that record existed: those entries read as never recorded, which
authorizes. Failing closed on them would refuse the tokenless offline install its own cache on first
upgrade, which is the case this whole path exists for.
Measured over the gate's full input space, 1260 cells per predicate: 1250 and 1245 identical to the
merge base, 15 newly authorized, 0 newly refused. Every newly authorized cell is the tokenless
offline install, the operator's own credential on a repo recorded as fetched by it, or a repo never
recorded at all.
Four compatibility routes redact host paths for an API-key caller.
GET /api/models/local,/scan-folders,/download-progressand/gguf-download-progressnow answer ansk-unslothcallerwith the same redaction their
/api/hubtwins use. Both routers are mounted in one app and reachablewith one key, so a boundary on one of them was not a boundary. A browser session sees exactly what it
saw.
Tests
Studio backend and frontend only, no core library surface. Python 3.13.12, torch 2.10.0+cpu,
transformers 5.4.0, huggingface_hub 1.31.0, mirroring
studio-backend-ci.yml.The two new modules are behavioural: real cache directory trees, only the list of cache roots
redirected so the presence walk runs for real, real consumers driven rather than the helper alone,
and every path assertion made on the serialised HTTP response body rather than on the helper, because
the response model is where a field survives or is dropped.
Coverage is measured rather than asserted. A mutant that disables the redaction kills 48 of the 140
boundary cases; one that makes an unaskable probe deny again, the defect this PR exists for, kills 24
of the 105 discovery cases; nine further mutants, one per file this PR touches, each still die.
Each fix is paired with the boundary it must not move, so the change cannot be loosened later without
a test arguing back: a Hub that answered no still refuses a cached copy, a repo not on disk is still
refused, an interrupted download is not presence, one unreadable cache root does not make every repo
present, a UI session still sees its own paths, and an incomplete cache that is not moving is a load
rather than a download.
Two existing tests changed, both stated rather than quietly adjusted:
tests/test_hub_token_caller_identity.py, one assertion intest_an_unreachable_probe_takes_the_short_ttl_and_spans_the_next_request: the memo for anunreachable probe holds unknown rather than a denial. That line asserted the defect.
tests/test_export_absolute_paths.pygainsauthenticated_via_api_keyin the import surface itpins, which its own comment predicted would be needed.
Cross-platform
Run on owned staging, counts read from the run logs rather than the green tick.
Every failure has a base arm at the merge base, same OS, same tests, and each fails there
identically, so the five are pre-existing and platform-specific. None is in this PR's own modules,
which pass on all three.
Notes
This addresses item 2 of #10147 and the load-UI half of #9094; the download scoping half of #9094 is
unslothai/unsloth-zoo#1231. No
Fixesline: #10147 is a tracker with other slices still open, and#9094 needs both halves.
#10265 answers the same item of #10147 by returning an empty list to API keys. This takes the other
route on purpose, because the issue itself records that restricting the listing "would break API and
CLI consumers whose purpose is enumerating locally available models". Removing the paths removes the
disclosure without removing the feature. The two overlap textually in
hub/routes/inventory.pyonly.Log scrubbing also covers a Windows UNC path, which previously kept the server and share name in
full, and the redaction walk rebuilds a NamedTuple rather than raising on one.
What this looks like in Studio
Two isolated installs, built from this PR's merge base and from
432175c41, driven offline by onescene against the same seeded cache, as a declared parity plan: matching halves are the passing
condition, a moved fact is a failure, and a scene that read nothing off the page is also a failure.
Two of the three changes here are deliberately invisible in the browser, so the screenshot is the
parity control, and for a PR that touches the inventory it is the load-bearing one: a UI session was
never behind the Hub probe and keeps its paths on purpose. Read from the same two servers, as a UI
session:
row_count2 and 2,rows_with_cache_path2 and 2,rows_with_cache_ref0 and 0,models_folder_non_emptytrue and true.FACTS DIFF: (none).rows_with_cache_ref = 0is theload-bearing figure: it is the redaction's own discriminator, read from the side that must NOT be
redacted, so a 1 there would mean the API-key boundary had swallowed the operator too.
The change lives one layer out, in what the same photographed server tells a different caller class.
Read over HTTP from that server with an
sk-unslothkey:apikey_rows1 and 1,apikey_rows_with_cache_path1 and 0,apikey_rows_with_cache_ref0 and 1,apikey_models_folder<host path>/huband"".Two things the shot does not show, stated rather than left to be assumed. The absolute cache path is
not rendered at this zoom, so
rows_with_cache_pathis a measured API reading rather than somethingyou can confirm by eye. And
row_countis 2 becauseHuggingFaceTB/SmolLM2-1.7B-Instructalsoappears from the real
~/.cache/huggingface/hub, whichhf_cache_roots()scans even withHF_HOME,HF_HUB_CACHE,HF_XET_CACHEandXDG_CACHE_HOMEall pointed at the seeded directory; it ispresent identically on both sides.
The composite predates the commits that followed it. Both later redactors are identity functions for
a UI session, each with a boundary test asserting exactly that equality, and the credential ledger
sits behind a gate a UI or ambient caller never reaches, so the picture still describes the head that
ships.
The one thing that does change on screen: the load toast
Two isolated installs again, merge base
353e38d41on the left and head9a678c04don the right,each serving its own
install.sh --localbuild. The model really is in the cache (Qwen2.5-0.5B-Instruct,seeded into an isolated
HF_HOMEthe two Studios share), the row really is that cached repo under thepicker's On Device tab, and the click is real. What is scripted, identically on both sides, is the
transport: a fetch shim answers
/api/models/download-progresswith a sequence whose byte count growsand carries no expected total, answers
/api/inference/load-progresswith "no phase", and holds/api/inference/loadopen so neither half races a real load to the shot. That is #9094's shape withoutneeding a multi-gigabyte re-fetch to happen on a CI host, and both halves are handed the same readings,
so the only thing that can move the picture is the code under test.
Beside the picture, read out of the live page:
names_cache_missfalse to true, anddownload_progress_reads0 to 3 -- the base never asks the download endpoint at all during a cachedload, which is exactly why it had nothing to notice.
load_progress_readsmoves the other way, 20 to1, which is the same finding seen from the other side: the head stops polling the load the moment it
decides a transfer is running. No weights are loaded and no GPU is touched.