Skip to content

Commit 10b26ee

Browse files
authored
WebUI hide models in router mode (ggml-org#19374)
1 parent 3dadc88 commit 10b26ee

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

tools/server/public/index.html.gz

-1.15 KB
Binary file not shown.

tools/server/webui/src/lib/components/app/models/ModelsSelector.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
useGlobalSelection = false
4343
}: Props = $props();
4444
45-
let options = $derived(modelOptions());
45+
let options = $derived(
46+
modelOptions().filter((option) => {
47+
const modelProps = modelsStore.getModelProps(option.model);
48+
49+
return modelProps?.webui !== false;
50+
})
51+
);
4652
let loading = $derived(modelsLoading());
4753
let updating = $derived(modelsUpdating());
4854
let activeId = $derived(selectedModelId());
@@ -245,6 +251,9 @@
245251
return options.find((option) => option.id === activeId);
246252
}
247253
254+
if (options.length === 1) {
255+
return options[0];
256+
}
248257
// No selection - return undefined to show "Select model"
249258
return undefined;
250259
}

0 commit comments

Comments
 (0)