diff --git a/ui/admin/app/lib/model/models.ts b/ui/admin/app/lib/model/models.ts index ea3c68458..a30560a01 100644 --- a/ui/admin/app/lib/model/models.ts +++ b/ui/admin/app/lib/model/models.ts @@ -83,10 +83,6 @@ const ModelToProviderMap = { }; export function getModelsForProvider(providerId: string) { - if (!providerId) return []; - - if (!(providerId in ModelToProviderMap)) - throw new Error(`Unknown provider: ${providerId}`); - + if (!providerId || !(providerId in ModelToProviderMap)) return []; return ModelToProviderMap[providerId as keyof typeof ModelToProviderMap]; }