-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix: add deepseek-coder model to DeepSeek provider #7774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,17 @@ export const deepSeekModels = { | |
| 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.`, | ||
| }, | ||
| "deepseek-coder": { | ||
| maxTokens: 8192, // 8K max output | ||
| contextWindow: 128_000, | ||
| supportsImages: false, | ||
| supportsPromptCache: 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-Coder-V3 is specifically optimized for code generation, completion, and understanding tasks. It excels at programming challenges across multiple languages.`, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description mentions "DeepSeek-Coder-V3" but the model ID is just "deepseek-coder". Should we verify if V3 is the actual version being accessed via the API? This could be important for users to know which specific version they're using. |
||
| }, | ||
| "deepseek-reasoner": { | ||
| maxTokens: 65536, // 64K max output for reasoning mode | ||
| contextWindow: 128_000, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,6 +160,20 @@ describe("DeepSeekHandler", () => { | |
| expect(model.info.supportsPromptCache).toBe(true) // Should be true now | ||
| }) | ||
|
|
||
| it("should return correct model info for deepseek-coder", () => { | ||
| const handlerWithCoder = new DeepSeekHandler({ | ||
| ...mockOptions, | ||
| apiModelId: "deepseek-coder", | ||
| }) | ||
| const model = handlerWithCoder.getModel() | ||
| expect(model.id).toBe("deepseek-coder") | ||
| expect(model.info).toBeDefined() | ||
| expect(model.info.maxTokens).toBe(8192) // deepseek-coder has 8K max | ||
| expect(model.info.contextWindow).toBe(128_000) | ||
| expect(model.info.supportsImages).toBe(false) | ||
| expect(model.info.supportsPromptCache).toBe(true) | ||
| }) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good test coverage for the model configuration! Consider also adding an integration test that verifies the actual API handler behavior with the deepseek-coder model to ensure end-to-end functionality works as expected. |
||
|
|
||
| it("should return correct model info for deepseek-reasoner", () => { | ||
| const handlerWithReasoner = new DeepSeekHandler({ | ||
| ...mockOptions, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this pricing accurate for the coder model? The comment says "Updated Sept 5, 2025" which seems to be a future date, and I'm using the same pricing as deepseek-chat. Should we verify the actual pricing from DeepSeek's platform to ensure billing accuracy?