mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix providers issue
This commit is contained in:
parent
94017b452e
commit
411cf01e7f
4 changed files with 6 additions and 0 deletions
|
|
@ -466,6 +466,7 @@ export const MODEL_ID_KEYS: Partial<keyof ProviderSettings>[] = [
|
|||
"ioIntelligenceModelId",
|
||||
"vercelAiGatewayModelId",
|
||||
"deepInfraModelId",
|
||||
"watsonxModelId",
|
||||
]
|
||||
|
||||
export const getModelId = (settings: ProviderSettings): string | undefined => {
|
||||
|
|
@ -605,6 +606,7 @@ export const dynamicProviders = [
|
|||
"unbound",
|
||||
"deepinfra",
|
||||
"vercel-ai-gateway",
|
||||
"watsonx",
|
||||
] as const satisfies readonly ProviderName[]
|
||||
|
||||
export type DynamicProvider = (typeof dynamicProviders)[number]
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ const routerNames = [
|
|||
"io-intelligence",
|
||||
"deepinfra",
|
||||
"vercel-ai-gateway",
|
||||
"watsonx",
|
||||
] as const
|
||||
|
||||
export type RouterName = (typeof routerNames)[number]
|
||||
|
|
@ -155,3 +156,4 @@ export type GetModelsOptions =
|
|||
| { provider: "deepinfra"; apiKey?: string; baseUrl?: string }
|
||||
| { provider: "io-intelligence"; apiKey: string }
|
||||
| { provider: "vercel-ai-gateway" }
|
||||
| { provider: "watsonx"; apiKey: string }
|
||||
|
|
|
|||
|
|
@ -160,6 +160,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", () => {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ describe("Model Validation Functions", () => {
|
|||
deepinfra: {},
|
||||
"io-intelligence": {},
|
||||
"vercel-ai-gateway": {},
|
||||
watsonx: {},
|
||||
}
|
||||
|
||||
const allowAllOrganization: OrganizationAllowList = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue