TypeCheck fix
Browse files- app/utils/constants.ts +4 -1
app/utils/constants.ts
CHANGED
|
@@ -234,7 +234,10 @@ async function getLMStudioModels(): Promise<ModelInfo[]> {
|
|
| 234 |
|
| 235 |
async function initializeModelList(): Promise<ModelInfo[]> {
|
| 236 |
MODEL_LIST = [...(await Promise.all(
|
| 237 |
-
PROVIDER_LIST
|
|
|
|
|
|
|
|
|
|
| 238 |
return MODEL_LIST;
|
| 239 |
}
|
| 240 |
|
|
|
|
| 234 |
|
| 235 |
async function initializeModelList(): Promise<ModelInfo[]> {
|
| 236 |
MODEL_LIST = [...(await Promise.all(
|
| 237 |
+
PROVIDER_LIST
|
| 238 |
+
.filter((p): p is ProviderInfo & { getDynamicModels: () => Promise<ModelInfo[]> } => !!p.getDynamicModels)
|
| 239 |
+
.map(p => p.getDynamicModels())))
|
| 240 |
+
.flat(), ...staticModels];
|
| 241 |
return MODEL_LIST;
|
| 242 |
}
|
| 243 |
|