fix(models): filter out non-webui models and handle single option selection

This commit is contained in:
Caleb Sawyer 2026-02-05 14:09:18 -06:00
parent 22cae83218
commit 40388cf8dd
2 changed files with 9 additions and 1 deletions

Binary file not shown.

View File

@ -47,7 +47,11 @@
upToMessageId
}: Props = $props();
let options = $derived(modelOptions());
let options = $derived(modelOptions().filter((option) => {
// Exclude models that are marked as not for webui use
const modelProps = modelsStore.getModelProps(option.model);
return modelProps?.webui !== false;
}));
let loading = $derived(modelsLoading());
let updating = $derived(modelsUpdating());
let activeId = $derived(selectedModelId());
@ -330,6 +334,10 @@
return options.find((option) => option.id === activeId);
}
if (options.length === 1) {
// Only one option - show it
return options[0];
}
// No selection - return undefined to show "Select model"
return undefined;
}