Skip to content

Commit 47509bc

Browse files
committed
feat: add deepseek-coder model to DeepSeek provider
- Added deepseek-coder model configuration with 8K max output tokens - Added test coverage for the new model - Fixes issue where users could not select deepseek-coder model Fixes #7773
1 parent 2571781 commit 47509bc

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

packages/types/src/providers/deepseek.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ export const deepSeekModels = {
1717
cacheReadsPrice: 0.07, // $0.07 per million tokens (cache hit) - Updated Sept 5, 2025
1818
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.`,
1919
},
20+
"deepseek-coder": {
21+
maxTokens: 8192, // 8K max output
22+
contextWindow: 128_000,
23+
supportsImages: false,
24+
supportsPromptCache: true,
25+
inputPrice: 0.56, // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
26+
outputPrice: 1.68, // $1.68 per million tokens - Updated Sept 5, 2025
27+
cacheWritesPrice: 0.56, // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
28+
cacheReadsPrice: 0.07, // $0.07 per million tokens (cache hit) - Updated Sept 5, 2025
29+
description: `DeepSeek-Coder-V3 is specifically optimized for code generation, completion, and understanding tasks. It excels at programming challenges across multiple languages.`,
30+
},
2031
"deepseek-reasoner": {
2132
maxTokens: 65536, // 64K max output for reasoning mode
2233
contextWindow: 128_000,

src/api/providers/__tests__/deepseek.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,20 @@ describe("DeepSeekHandler", () => {
160160
expect(model.info.supportsPromptCache).toBe(true) // Should be true now
161161
})
162162

163+
it("should return correct model info for deepseek-coder", () => {
164+
const handlerWithCoder = new DeepSeekHandler({
165+
...mockOptions,
166+
apiModelId: "deepseek-coder",
167+
})
168+
const model = handlerWithCoder.getModel()
169+
expect(model.id).toBe("deepseek-coder")
170+
expect(model.info).toBeDefined()
171+
expect(model.info.maxTokens).toBe(8192) // deepseek-coder has 8K max
172+
expect(model.info.contextWindow).toBe(128_000)
173+
expect(model.info.supportsImages).toBe(false)
174+
expect(model.info.supportsPromptCache).toBe(true)
175+
})
176+
163177
it("should return correct model info for deepseek-reasoner", () => {
164178
const handlerWithReasoner = new DeepSeekHandler({
165179
...mockOptions,

0 commit comments

Comments
 (0)