ui : keep the selector list open on provider backends

The active backend of an external provider has no /props, so its role
degrades to MODEL while the selector still has a list to show. The
trigger opened the manager instead of the list.

Gate the trigger on the selectable list instead of the router role.

Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash
This commit is contained in:
Aleksander Grygier
2026-10-09 11:09:40 +02:00
committed by GitHub
parent 6af36dd8f3
commit ed800336fa
@@ -223,9 +223,11 @@ export function useModelsSelector(opts: UseModelsSelectorOptions): UseModelsSele
function handleOpenChange(open: boolean) {
if (loading || updating) return;
// a single-model desktop server has no list: the trigger opens the manager
// instead. a phone has no manager, so its drawer opens with the one model
if (!isRouter && !deviceStore.isMobile) {
// a lone llama.cpp server without a router has no list: the trigger opens
// the manager instead. router mode and external backends both expose a
// selectable list, so their role does not decide here, and a phone has no
// manager at all: its drawer opens either way
if (!isMultiModel && !deviceStore.isMobile) {
if (open) uiStore.openModelsManager();
return;