Sfoglia il codice sorgente

feat(deepseek): update DeepSeek models to V3.2 with new pricing (#9962)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Hannes Rudolph 3 settimane fa
parent
commit
1898848d95

+ 15 - 12
packages/types/src/providers/deepseek.ts

@@ -12,24 +12,27 @@ export const deepSeekModels = {
 		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
-		cacheReadsPrice: 0.07, // $0.07 per million tokens (cache hit) - Updated Sept 5, 2025
-		description: `DeepSeek-V3 achieves a significant breakthrough in inference speed over previous models. It tops the leaderboard among open-source models and rivals the most advanced closed-source models globally.`,
+		defaultToolProtocol: "native",
+		inputPrice: 0.28, // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
+		outputPrice: 0.42, // $0.42 per million tokens - Updated Dec 9, 2025
+		cacheWritesPrice: 0.28, // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
+		cacheReadsPrice: 0.028, // $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
+		description: `DeepSeek-V3.2 (Non-thinking Mode) achieves a significant breakthrough in inference speed over previous models. It tops the leaderboard among open-source models and rivals the most advanced closed-source models globally. Supports JSON output, tool calls, chat prefix completion (beta), and FIM completion (beta).`,
 	},
 	"deepseek-reasoner": {
-		maxTokens: 65536, // 64K max output for reasoning mode
+		maxTokens: 8192, // 8K max output
 		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
-		cacheReadsPrice: 0.07, // $0.07 per million tokens (cache hit) - Updated Sept 5, 2025
-		description: `DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 64K output tokens.`,
+		defaultToolProtocol: "native",
+		inputPrice: 0.28, // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
+		outputPrice: 0.42, // $0.42 per million tokens - Updated Dec 9, 2025
+		cacheWritesPrice: 0.28, // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
+		cacheReadsPrice: 0.028, // $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
+		description: `DeepSeek-V3.2 (Thinking Mode) achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 8K output tokens. Supports JSON output, tool calls, and chat prefix completion (beta).`,
 	},
 } as const satisfies Record<string, ModelInfo>
 
-export const DEEP_SEEK_DEFAULT_TEMPERATURE = 0.6
+// https://api-docs.deepseek.com/quick_start/parameter_settings
+export const DEEP_SEEK_DEFAULT_TEMPERATURE = 0

+ 1 - 1
src/api/providers/__tests__/deepseek.spec.ts

@@ -168,7 +168,7 @@ describe("DeepSeekHandler", () => {
 			const model = handlerWithReasoner.getModel()
 			expect(model.id).toBe("deepseek-reasoner")
 			expect(model.info).toBeDefined()
-			expect(model.info.maxTokens).toBe(65536) // deepseek-reasoner has 64K max
+			expect(model.info.maxTokens).toBe(8192) // deepseek-reasoner has 8K max
 			expect(model.info.contextWindow).toBe(128_000)
 			expect(model.info.supportsImages).toBe(false)
 			expect(model.info.supportsPromptCache).toBe(true)