fix providers issue

This commit is contained in:
Prasang Prajapati 2025-08-26 12:39:28 -04:00
parent 2129d11634
commit dd2eb49e11

View file

@ -18,6 +18,7 @@ import { GetModelsOptions } from "../../../shared/api"
import { getOllamaModels } from "./ollama"
import { getLMStudioModels } from "./lmstudio"
import { getIOIntelligenceModels } from "./io-intelligence"
import { getWatsonxModels } from "./watsonx"
const memoryCache = new NodeCache({ stdTTL: 5 * 60, checkperiod: 5 * 60 })
async function writeModels(router: RouterName, data: ModelRecord) {
@ -81,6 +82,9 @@ export const getModels = async (options: GetModelsOptions): Promise<ModelRecord>
case "io-intelligence":
models = await getIOIntelligenceModels(options.apiKey)
break
case "watsonx":
models = await getWatsonxModels(options.apiKey)
break
default: {
// Ensures router is exhaustively checked if RouterName is a strict union
const exhaustiveCheck: never = provider