Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Label an unlisted loaded model with its public id, not its raw path (#7966)
Leo Borcherdinge3c73b09de5b
diff --git a/studio/frontend/src/features/model-picker/components/model-selector.tsx b/studio/frontend/src/features/model-picker/components/model-selector.tsxindex 4a891e0e193..43f8108b308 100644--- a/studio/frontend/src/features/model-picker/components/model-selector.tsx+++ b/studio/frontend/src/features/model-picker/components/model-selector.tsx@@ -36,7 +36,10 @@ import {useState,} from "react";import type { HfTaskFilter } from "@/features/hub/hooks/use-hub-model-search";-import { isOllamaLinkPath } from "../model-config/model-identity";+import {+ isOllamaLinkPath,+ publicModelId,+} from "../model-config/model-identity";import {type PerModelConfig,resolveInitialConfig,@@ -754,13 +757,16 @@ export function ModelSelector({const currentModel = useMemo(() => {if (!selected) return undefined;const found = optionById.get(selected);+ // A model loaded by path is absent from the list, and its raw id fills the+ // header; label it with the public id the backend reports as active_model.+ const name = publicModelId(selected);if (activeGgufVariant) {const desc = `GGUF · ${activeGgufVariant}`;return found? { ...found, description: desc }- : { id: selected, name: selected, description: desc };+ : { id: selected, name, description: desc };}- return found ?? { id: selected, name: selected };+ return found ?? { id: selected, name };}, [selected, optionById, activeGgufVariant]);function handleSelect(id: string, meta: ModelSelectorChangeMeta) {diff --git a/studio/frontend/tests/model-identity.test.ts b/studio/frontend/tests/model-identity.test.tsindex c1e6512f8a4..3412fe9e567 100644--- a/studio/frontend/tests/model-identity.test.ts+++ b/studio/frontend/tests/model-identity.test.ts@@ -75,6 +75,13 @@ test("publicModelId mirrors what /status reports for a path-loaded model", () =>"unsloth/Qwen3-8B-GGUF",);assert.equal(publicModelId("C:\\models\\Foo-Q4_K_M.gguf"), "Foo-Q4_K_M");+ // The selector's label for an unlisted model leans on the Windows cache path.+ assert.equal(+ publicModelId(+ "C:\\Users\\u\\.cache\\huggingface\\hub\\models--unsloth--gemma-4-12B-it-qat-GGUF\\snapshots\\7102bdea",+ ),+ "unsloth/gemma-4-12B-it-qat-GGUF",+ );assert.equal(publicModelId("~/models/Foo.gguf"), "Foo");assert.equal(publicModelId("/srv/models/repo/"), "repo");// A repo id and an already-clean name come back untouched.