diff --git a/src/api/providers/fetchers/__tests__/litellm.spec.ts b/src/api/providers/fetchers/__tests__/litellm.spec.ts index bf36f3e456..fe6424e673 100644 --- a/src/api/providers/fetchers/__tests__/litellm.spec.ts +++ b/src/api/providers/fetchers/__tests__/litellm.spec.ts @@ -222,7 +222,7 @@ describe("getLiteLLMModels", () => { contextWindow: 200000, supportsImages: true, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: 3, outputPrice: 15, cacheWritesPrice: undefined, @@ -234,7 +234,7 @@ describe("getLiteLLMModels", () => { contextWindow: 128000, supportsImages: false, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: 10, outputPrice: 30, cacheWritesPrice: undefined, @@ -305,7 +305,7 @@ describe("getLiteLLMModels", () => { contextWindow: 200000, supportsImages: true, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -318,7 +318,7 @@ describe("getLiteLLMModels", () => { contextWindow: 200000, supportsImages: false, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -455,7 +455,7 @@ describe("getLiteLLMModels", () => { contextWindow: 200000, supportsImages: true, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -468,7 +468,7 @@ describe("getLiteLLMModels", () => { contextWindow: 128000, supportsImages: false, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -533,7 +533,7 @@ describe("getLiteLLMModels", () => { contextWindow: 200000, supportsImages: true, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -546,7 +546,7 @@ describe("getLiteLLMModels", () => { contextWindow: 128000, supportsImages: false, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -559,7 +559,7 @@ describe("getLiteLLMModels", () => { contextWindow: 128000, supportsImages: false, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -673,7 +673,7 @@ describe("getLiteLLMModels", () => { contextWindow: 200000, supportsImages: true, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -687,7 +687,7 @@ describe("getLiteLLMModels", () => { contextWindow: 128000, supportsImages: false, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, @@ -701,7 +701,7 @@ describe("getLiteLLMModels", () => { contextWindow: 100000, supportsImages: false, supportsPromptCache: false, - supportsNativeTools: false, + supportsNativeTools: true, inputPrice: undefined, outputPrice: undefined, cacheWritesPrice: undefined, diff --git a/src/api/providers/fetchers/litellm.ts b/src/api/providers/fetchers/litellm.ts index f1a3a1ae93..4c68569805 100644 --- a/src/api/providers/fetchers/litellm.ts +++ b/src/api/providers/fetchers/litellm.ts @@ -45,11 +45,7 @@ export async function getLiteLLMModels(apiKey: string, baseUrl: string): Promise contextWindow: modelInfo.max_input_tokens || 200000, supportsImages: Boolean(modelInfo.supports_vision), supportsPromptCache: Boolean(modelInfo.supports_prompt_caching), - supportsNativeTools: Boolean( - modelInfo.supports_function_calling || - modelInfo.supports_tool_choice || - modelInfo.supports_tool_use, - ), + supportsNativeTools: true, inputPrice: modelInfo.input_cost_per_token ? modelInfo.input_cost_per_token * 1000000 : undefined, outputPrice: modelInfo.output_cost_per_token ? modelInfo.output_cost_per_token * 1000000