diff --git a/app/utils/constants.ts b/app/utils/constants.ts index 32bc816..75c8d00 100644 --- a/app/utils/constants.ts +++ b/app/utils/constants.ts @@ -234,7 +234,10 @@ async function getLMStudioModels(): Promise { async function initializeModelList(): Promise { MODEL_LIST = [...(await Promise.all( - PROVIDER_LIST.filter(p => !!p.getDynamicModels).map(p => p.getDynamicModels()))).flat(), ...staticModels]; + PROVIDER_LIST + .filter((p): p is ProviderInfo & { getDynamicModels: () => Promise } => !!p.getDynamicModels) + .map(p => p.getDynamicModels()))) + .flat(), ...staticModels]; return MODEL_LIST; }