Repository navigation
Studio: keep Switch Back visible for a snapshot-path chat - #10511
danielhanchen merged 11 commits into
Conversation
residentModelIdMatches lowercases opaque external ids, so a case-distinct connection looked already resident. Two HF snapshots of the same repo also never matched, so Switch Back still loaded a deleted path. Exact picker match is unchanged; aliases now return the selectable id and skip externals. Hub labels keep a trailing .gguf. cd studio/frontend && node --experimental-strip-types --test tests/chat-remembers-its-model.test.ts 31 passed. Reverting both notice files to 47d40f5: 6 failed.
|
Addressed the three notes on 47d40f5. External ids stay exact. residentModelIdMatches is skipped when either side starts with external::::, so Vendor/Qwen3.8-27B and vendor/qwen3.8-27b no longer collapse. Switch Back now loads chatModelSelectableId: the exact picker id if it is still present, otherwise the live HF cache row for the same repo (matched through publicModelId). A deleted path is never passed to handleCheckpointChange. The notice label uses externalModelLabel ?? modelDisplayName, so org/model.gguf keeps its suffix. publicModelId still strips it. Ran cd studio/frontend && node --experimental-strip-types --test tests/chat-remembers-its-model.test.ts: 31 passed. With both notice files reverted to 47d40f5, 6 of those fail. |
ollama-manifest: references are opaque. residentModelIdMatches lowercases them, so two manifests that differ only by case looked like one model. Exact picker match is unchanged. cd studio/frontend && node --experimental-strip-types --test tests/chat-remembers-its-model.test.ts 32 passed. Reverting chat-model-notice-switch.ts to eddf860: 1 failed.
|
Addressed the ollama-manifest note on eddf860. sameHfCacheIdentity now skips isOllamaLinkPath the same way it skips external ids. Exact picker match is unchanged. Two manifests that differ only by case are not treated as one model. Ran cd studio/frontend && node --experimental-strip-types --test tests/chat-remembers-its-model.test.ts: 32 passed. Reverting chat-model-notice-switch.ts to eddf860 fails the new ollama-manifest test. |
|
#10447 covers the load half of #10338: |
|
Review record for #10511, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#403. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
Fixes #10338 (with #10447, which restored the saved context on Switch Back; the token count in that report is #10337).
A chat whose model was loaded from its HF cache folder is stamped with
.../models--org--name/snapshots/<sha>, while the model picker lists the same model asorg/name.ChatModelNoticecompared the raw ids, so:org/nameshowed the bar while the same model was resident under its snapshot path.Changes:
chatModelIsResidentandchatModelSelectableIdtreat a snapshot path, its repo id and another snapshot of the same repo as one model (exact picker id first). Externalexternal::<provider>::<id>andollama-manifest:ids stay exact and case-sensitive.modelDisplayName).Tests:
cd studio/frontend && node --experimental-strip-types --test tests/chat-remembers-its-model.test.ts: 30 pass;tsc --noEmitclean.unsloth/Qwen3.5-0.8B-MTP-GGUF(Q4_K_M), no model loaded. The bar reads "This chat was started on Qwen3.5-0.8B-MTP-GGUF."; clicking Switch back loadsunsloth/Qwen3.5-0.8B-MTP-GGUFQ4_K_M from that snapshot and the bar then hides.Before / after
A saved chat stamped with an HF cache snapshot path of a model the picker lists by repo id, no model loaded. Before: no bar. After: "This chat was started on Qwen3.6-27B-MTP-GGUF." with Switch back (repo name, not the snapshot sha).