You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Studio: raw external:: model id shown in the UI when a connected provider drops the selected model #8405
When a connected provider stops offering a model that is currently selected, the UI shows the raw internal model id instead of a name:
external::6235be0905af4221::kimi-k2.5
Repro from the reporter: select a model from a connection, go to Connections, pick the loaded provider (Ollama in this case), Fetch Models, where that model is no longer available.
with parseExternalModelId at :281 decoding it back. The display paths I checked all use the parsed modelId rather than the raw string, for example features/chat/runtime-provider.tsx:196, features/chat/shared-composer.tsx:663 and features/chat/api/chat-adapter.ts:4224.
So this is not a format problem. Some render path prints checkpoint verbatim, and it is reached exactly when the model has disappeared from provider.models, so the friendly-name lookup misses and falls through to the raw value.
I have not pinned the component; it needs a UI repro rather than a grep, which is why there is no file:line for the offending render below.
Two things worth fixing together
Parse before displaying, so the fallback reads kimi-k2.5 rather than the internal id.
Say what happened. A model vanishing from a provider's list is the expected trigger here, not an edge case, so "this model is no longer offered by " is more useful than any name on its own.
constcurrentModel=useMemo(()=>{if(!selected)returnundefined;constfound=optionById.get(selected);// No catalog entry (yet, or ever); a cached GGUF's checkpoint is a snapshot path.constfallbackName=modelDisplayName(selected);
...
returnfound??{id: selected,name: fallbackName};},[selected,optionById,activeGgufVariant]);
rendered verbatim at model-selector.tsx:257 as {currentModel?.name ?? placeholder}.
Why the fallback prints the raw id rather than shortening it
modelDisplayName (studio/frontend/src/features/hub/lib/model-identity.ts:146-153) is an exact identity function for this input. Running its predicate chain against the reported id:
id : external::6235be0905af4221::kimi-k2.5
id[1] : "x" (a ":" here is what marks a drive-letter path)
looksLikeModelPath : false no .gguf, no / ~ ./ prefix, fewer than two slashes, no backslash
isHubRepoId : false slash count is 0, not 1
modelDisplayName -> : external::6235be0905af4221::kimi-k2.5
publicModelId returns the string untouched because it is not path-shaped, then clean.slice(clean.lastIndexOf("/") + 1) with no slash present returns the whole string. So the helper cannot shorten this id, and model-selector.tsx does not import parseExternalModelId at all.
Why the lookup misses in the first place
optionById (model-selector.tsx:724-769) is keyed from models, loraModels and externalModels, and the external entries are built in chat-page.tsx:3026-3066 from provider.models only. Once Fetch Models refreshes the provider and drops kimi-k2.5, that id leaves externalModels and the lookup misses.
Nothing prunes the stale selection: chat-page.tsx:2015-2025 clears the checkpoint only when connections are disabled, and sync-external-providers.ts:160-210 replaces models wholesale with no reconciliation against the active checkpoint. So the id survives in params.checkpoint with no catalog entry behind it, which is exactly the state the fallback was written for.
Fix
Two parts, and the second is the one that actually matters to a user.
In model-selector.tsx:773-785, derive the label via parseExternalModelId(selected)?.modelId before falling back to modelDisplayName(selected). message-response-details-sheet.tsx:241-254 already does this well and is worth copying: it parses first, then falls through a label chain.
Say the model is gone. A provider dropping a model is the expected trigger here, so "kimi-k2.5 is no longer offered by " beats any name on its own.
Related, same helper, not this repro
shared-composer.tsx:1166-1169 has a local modelDisplayName that splits on / only, so compare-mode load-error toasts (:1403, :1422) would leak the raw id the same way. Worth fixing alongside.
Two others use the unsafe helper but are not reachable with an external:: id: apply-inference-status-to-store.ts:118 is fed from backend /api/inference/status, which never holds one, and loaded-models-api.ts:192 explicitly bails on isExternalModelId first.
Activity
danielhanchen commentedon Aug 11, 2026
Pinned it. The renderer is the
ModelSelectorfallback, i.e. the chat header model pill.studio/frontend/src/features/model-picker/components/model-selector.tsx:773-785:rendered verbatim at
model-selector.tsx:257as{currentModel?.name ?? placeholder}.Why the fallback prints the raw id rather than shortening it
modelDisplayName(studio/frontend/src/features/hub/lib/model-identity.ts:146-153) is an exact identity function for this input. Running its predicate chain against the reported id:publicModelIdreturns the string untouched because it is not path-shaped, thenclean.slice(clean.lastIndexOf("/") + 1)with no slash present returns the whole string. So the helper cannot shorten this id, andmodel-selector.tsxdoes not importparseExternalModelIdat all.Why the lookup misses in the first place
optionById(model-selector.tsx:724-769) is keyed frommodels,loraModelsandexternalModels, and the external entries are built inchat-page.tsx:3026-3066fromprovider.modelsonly. Once Fetch Models refreshes the provider and dropskimi-k2.5, that id leavesexternalModelsand the lookup misses.Nothing prunes the stale selection:
chat-page.tsx:2015-2025clears the checkpoint only when connections are disabled, andsync-external-providers.ts:160-210replacesmodelswholesale with no reconciliation against the active checkpoint. So the id survives inparams.checkpointwith no catalog entry behind it, which is exactly the state the fallback was written for.Fix
Two parts, and the second is the one that actually matters to a user.
model-selector.tsx:773-785, derive the label viaparseExternalModelId(selected)?.modelIdbefore falling back tomodelDisplayName(selected).message-response-details-sheet.tsx:241-254already does this well and is worth copying: it parses first, then falls through a label chain.Related, same helper, not this repro
shared-composer.tsx:1166-1169has a localmodelDisplayNamethat splits on/only, so compare-mode load-error toasts (:1403,:1422) would leak the raw id the same way. Worth fixing alongside.Two others use the unsafe helper but are not reachable with an
external::id:apply-inference-status-to-store.ts:118is fed from backend/api/inference/status, which never holds one, andloaded-models-api.ts:192explicitly bails onisExternalModelIdfirst.Studio: name a connected model the provider dropped instead of its ra…
Studio: name a connected model the provider dropped instead of its ra…