diff --git a/packages/types/src/providers/deepseek.ts b/packages/types/src/providers/deepseek.ts index 5ef757ffdf..8ce5ef87b2 100644 --- a/packages/types/src/providers/deepseek.ts +++ b/packages/types/src/providers/deepseek.ts @@ -7,8 +7,8 @@ export const deepSeekDefaultModelId: DeepSeekModelId = "deepseek-chat" export const deepSeekModels = { "deepseek-chat": { - maxTokens: 8192, - contextWindow: 64_000, + maxTokens: 8192, // 8K max output + contextWindow: 128_000, supportsImages: false, supportsPromptCache: true, inputPrice: 0.27, // $0.27 per million tokens (cache miss) @@ -18,15 +18,15 @@ export const deepSeekModels = { 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.`, }, "deepseek-reasoner": { - maxTokens: 8192, - contextWindow: 64_000, + maxTokens: 65536, // 64K max output for reasoning mode + contextWindow: 128_000, supportsImages: false, supportsPromptCache: true, inputPrice: 0.55, // $0.55 per million tokens (cache miss) outputPrice: 2.19, // $2.19 per million tokens cacheWritesPrice: 0.55, // $0.55 per million tokens (cache miss) cacheReadsPrice: 0.14, // $0.14 per million tokens (cache hit) - description: `DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 32K tokens.`, + 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.`, }, } as const satisfies Record diff --git a/src/api/providers/__tests__/deepseek.spec.ts b/src/api/providers/__tests__/deepseek.spec.ts index 175a5bc44b..50cabfa922 100644 --- a/src/api/providers/__tests__/deepseek.spec.ts +++ b/src/api/providers/__tests__/deepseek.spec.ts @@ -154,12 +154,26 @@ describe("DeepSeekHandler", () => { const model = handler.getModel() expect(model.id).toBe(mockOptions.apiModelId) expect(model.info).toBeDefined() - expect(model.info.maxTokens).toBe(8192) - expect(model.info.contextWindow).toBe(64_000) + expect(model.info.maxTokens).toBe(8192) // deepseek-chat has 8K max + expect(model.info.contextWindow).toBe(128_000) expect(model.info.supportsImages).toBe(false) expect(model.info.supportsPromptCache).toBe(true) // Should be true now }) + it("should return correct model info for deepseek-reasoner", () => { + const handlerWithReasoner = new DeepSeekHandler({ + ...mockOptions, + apiModelId: "deepseek-reasoner", + }) + 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.contextWindow).toBe(128_000) + expect(model.info.supportsImages).toBe(false) + expect(model.info.supportsPromptCache).toBe(true) + }) + it("should return provided model ID with default model info if model does not exist", () => { const handlerWithInvalidModel = new DeepSeekHandler({ ...mockOptions,