Sfoglia il codice sorgente

feat: enable native tool support for DeepSeek and Doubao models (#9671)

Add supportsNativeTools: true to DeepSeek and Doubao model definitions,
enabling native OpenAI-compatible tool calling for these providers.

Both providers already extend OpenAiHandler which has built-in support
for native tools, so this change is all that's needed to enable the feature.
Daniel 1 mese fa
parent
commit
b111d125c0

+ 2 - 0
packages/types/src/providers/deepseek.ts

@@ -11,6 +11,7 @@ export const deepSeekModels = {
 		contextWindow: 128_000,
 		supportsImages: false,
 		supportsPromptCache: true,
+		supportsNativeTools: true,
 		inputPrice: 0.56, // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
 		outputPrice: 1.68, // $1.68 per million tokens - Updated Sept 5, 2025
 		cacheWritesPrice: 0.56, // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
@@ -22,6 +23,7 @@ export const deepSeekModels = {
 		contextWindow: 128_000,
 		supportsImages: false,
 		supportsPromptCache: true,
+		supportsNativeTools: true,
 		inputPrice: 0.56, // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
 		outputPrice: 1.68, // $1.68 per million tokens - Updated Sept 5, 2025
 		cacheWritesPrice: 0.56, // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025

+ 3 - 0
packages/types/src/providers/doubao.ts

@@ -8,6 +8,7 @@ export const doubaoModels = {
 		contextWindow: 128_000,
 		supportsImages: true,
 		supportsPromptCache: true,
+		supportsNativeTools: true,
 		inputPrice: 0.0001, // $0.0001 per million tokens (cache miss)
 		outputPrice: 0.0004, // $0.0004 per million tokens
 		cacheWritesPrice: 0.0001, // $0.0001 per million tokens (cache miss)
@@ -19,6 +20,7 @@ export const doubaoModels = {
 		contextWindow: 128_000,
 		supportsImages: true,
 		supportsPromptCache: true,
+		supportsNativeTools: true,
 		inputPrice: 0.0002, // $0.0002 per million tokens
 		outputPrice: 0.0008, // $0.0008 per million tokens
 		cacheWritesPrice: 0.0002, // $0.0002 per million
@@ -30,6 +32,7 @@ export const doubaoModels = {
 		contextWindow: 128_000,
 		supportsImages: true,
 		supportsPromptCache: true,
+		supportsNativeTools: true,
 		inputPrice: 0.00015, // $0.00015 per million tokens
 		outputPrice: 0.0006, // $0.0006 per million tokens
 		cacheWritesPrice: 0.00015, // $0.00015 per million