Skip to content

Commit a94ca5d

Browse files
committed
Assume all LiteLLM models support native tools
1 parent 700fe42 commit a94ca5d

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

src/api/providers/fetchers/__tests__/litellm.spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ describe("getLiteLLMModels", () => {
222222
contextWindow: 200000,
223223
supportsImages: true,
224224
supportsPromptCache: false,
225-
supportsNativeTools: false,
225+
supportsNativeTools: true,
226226
inputPrice: 3,
227227
outputPrice: 15,
228228
cacheWritesPrice: undefined,
@@ -234,7 +234,7 @@ describe("getLiteLLMModels", () => {
234234
contextWindow: 128000,
235235
supportsImages: false,
236236
supportsPromptCache: false,
237-
supportsNativeTools: false,
237+
supportsNativeTools: true,
238238
inputPrice: 10,
239239
outputPrice: 30,
240240
cacheWritesPrice: undefined,
@@ -305,7 +305,7 @@ describe("getLiteLLMModels", () => {
305305
contextWindow: 200000,
306306
supportsImages: true,
307307
supportsPromptCache: false,
308-
supportsNativeTools: false,
308+
supportsNativeTools: true,
309309
inputPrice: undefined,
310310
outputPrice: undefined,
311311
cacheWritesPrice: undefined,
@@ -318,7 +318,7 @@ describe("getLiteLLMModels", () => {
318318
contextWindow: 200000,
319319
supportsImages: false,
320320
supportsPromptCache: false,
321-
supportsNativeTools: false,
321+
supportsNativeTools: true,
322322
inputPrice: undefined,
323323
outputPrice: undefined,
324324
cacheWritesPrice: undefined,
@@ -455,7 +455,7 @@ describe("getLiteLLMModels", () => {
455455
contextWindow: 200000,
456456
supportsImages: true,
457457
supportsPromptCache: false,
458-
supportsNativeTools: false,
458+
supportsNativeTools: true,
459459
inputPrice: undefined,
460460
outputPrice: undefined,
461461
cacheWritesPrice: undefined,
@@ -468,7 +468,7 @@ describe("getLiteLLMModels", () => {
468468
contextWindow: 128000,
469469
supportsImages: false,
470470
supportsPromptCache: false,
471-
supportsNativeTools: false,
471+
supportsNativeTools: true,
472472
inputPrice: undefined,
473473
outputPrice: undefined,
474474
cacheWritesPrice: undefined,
@@ -533,7 +533,7 @@ describe("getLiteLLMModels", () => {
533533
contextWindow: 200000,
534534
supportsImages: true,
535535
supportsPromptCache: false,
536-
supportsNativeTools: false,
536+
supportsNativeTools: true,
537537
inputPrice: undefined,
538538
outputPrice: undefined,
539539
cacheWritesPrice: undefined,
@@ -546,7 +546,7 @@ describe("getLiteLLMModels", () => {
546546
contextWindow: 128000,
547547
supportsImages: false,
548548
supportsPromptCache: false,
549-
supportsNativeTools: false,
549+
supportsNativeTools: true,
550550
inputPrice: undefined,
551551
outputPrice: undefined,
552552
cacheWritesPrice: undefined,
@@ -559,7 +559,7 @@ describe("getLiteLLMModels", () => {
559559
contextWindow: 128000,
560560
supportsImages: false,
561561
supportsPromptCache: false,
562-
supportsNativeTools: false,
562+
supportsNativeTools: true,
563563
inputPrice: undefined,
564564
outputPrice: undefined,
565565
cacheWritesPrice: undefined,
@@ -673,7 +673,7 @@ describe("getLiteLLMModels", () => {
673673
contextWindow: 200000,
674674
supportsImages: true,
675675
supportsPromptCache: false,
676-
supportsNativeTools: false,
676+
supportsNativeTools: true,
677677
inputPrice: undefined,
678678
outputPrice: undefined,
679679
cacheWritesPrice: undefined,
@@ -687,7 +687,7 @@ describe("getLiteLLMModels", () => {
687687
contextWindow: 128000,
688688
supportsImages: false,
689689
supportsPromptCache: false,
690-
supportsNativeTools: false,
690+
supportsNativeTools: true,
691691
inputPrice: undefined,
692692
outputPrice: undefined,
693693
cacheWritesPrice: undefined,
@@ -701,7 +701,7 @@ describe("getLiteLLMModels", () => {
701701
contextWindow: 100000,
702702
supportsImages: false,
703703
supportsPromptCache: false,
704-
supportsNativeTools: false,
704+
supportsNativeTools: true,
705705
inputPrice: undefined,
706706
outputPrice: undefined,
707707
cacheWritesPrice: undefined,

src/api/providers/fetchers/litellm.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ export async function getLiteLLMModels(apiKey: string, baseUrl: string): Promise
4545
contextWindow: modelInfo.max_input_tokens || 200000,
4646
supportsImages: Boolean(modelInfo.supports_vision),
4747
supportsPromptCache: Boolean(modelInfo.supports_prompt_caching),
48-
supportsNativeTools: Boolean(
49-
modelInfo.supports_function_calling ||
50-
modelInfo.supports_tool_choice ||
51-
modelInfo.supports_tool_use,
52-
),
48+
supportsNativeTools: true,
5349
inputPrice: modelInfo.input_cost_per_token ? modelInfo.input_cost_per_token * 1000000 : undefined,
5450
outputPrice: modelInfo.output_cost_per_token
5551
? modelInfo.output_cost_per_token * 1000000

0 commit comments

Comments
 (0)