fix providers issue

This commit is contained in:
Prasang Prajapati 2025-08-26 12:38:04 -04:00
parent 408b554e84
commit 2129d11634
4 changed files with 6 additions and 0 deletions

View file

@ -436,6 +436,7 @@ export const MODEL_ID_KEYS: Partial<keyof ProviderSettings>[] = [
"litellmModelId",
"huggingFaceModelId",
"ioIntelligenceModelId",
"watsonxModelId",
]
export const getModelId = (settings: ProviderSettings): string | undefined => {
@ -566,6 +567,7 @@ export const dynamicProviders = [
"openrouter",
"requesty",
"unbound",
"watsonx",
] as const satisfies readonly ProviderName[]
export type DynamicProvider = (typeof dynamicProviders)[number]

View file

@ -27,6 +27,7 @@ const routerNames = [
"ollama",
"lmstudio",
"io-intelligence",
"watsonx",
] as const
export type RouterName = (typeof routerNames)[number]
@ -151,3 +152,4 @@ export type GetModelsOptions =
| { provider: "ollama"; baseUrl?: string }
| { provider: "lmstudio"; baseUrl?: string }
| { provider: "io-intelligence"; apiKey: string }
| { provider: "watsonx"; apiKey: string }

View file

@ -159,6 +159,7 @@ describe("ApiOptions Provider Filtering", () => {
expect(providerValues).toContain("unbound")
expect(providerValues).toContain("requesty")
expect(providerValues).toContain("io-intelligence")
expect(providerValues).toContain("watsonx")
})
it("should filter static providers based on organization allow list", () => {

View file

@ -41,6 +41,7 @@ describe("Model Validation Functions", () => {
ollama: {},
lmstudio: {},
"io-intelligence": {},
watsonx: {},
}
const allowAllOrganization: OrganizationAllowList = {