fix(model-picker): hide models from providers without auth configured

Previously, models from unconfigured providers were shown with an
"auth missing" hint, flooding the picker with 900+ unusable entries.

Now addModelSelectOption early-returns when the provider has no auth,
so only usable models appear in /models and the web chat dropdown.

Fixes #74423
This commit is contained in:
jindongfu
2026-04-30 00:33:18 +08:00
committed by Peter Steinberger
parent e3af6fb3c8
commit 2bb16f771b

View File

@@ -295,7 +295,7 @@ function addModelSelectOption(params: {
hints.push(routeHint);
}
if (!params.hasAuth(params.entry.provider)) {
hints.push("auth missing");
return;
}
const label = params.literalPrefixProviders.has(normalizeProviderId(params.entry.provider))
? `${params.entry.provider}/${params.entry.id}`