Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 21, 2025

This PR attempts to address Issue #7268. Feedback and guidance are welcome.

Summary

Updated DeepSeek models (deepseek-chat and deepseek-reasoner) context window from 64k to 128k tokens to align with the latest DeepSeek API capabilities.

Changes

  • Updated context window from 64_000 to 128_000 for both DeepSeek models in packages/types/src/providers/deepseek.ts
  • Updated corresponding test expectations in src/api/providers/__tests__/deepseek.spec.ts

Context

According to the DeepSeek API documentation (https://api-docs.deepseek.com/quick_start/pricing/), their models now support 128k context window.

Testing

  • ✅ All tests pass
  • ✅ Linting checks pass
  • ✅ Type checks pass

Fixes #7268


Important

Update DeepSeek models' context window to 128k tokens in deepseek.ts and adjust tests in deepseek.spec.ts.

  • Behavior:
    • Updated context window from 64_000 to 128_000 tokens for deepseek-chat and deepseek-reasoner in deepseek.ts.
    • Updated test expectations for context window in deepseek.spec.ts.
  • Testing:
    • All tests, linting, and type checks pass.

This description was created by Ellipsis for a57187b. You can customize this summary. It will automatically update as commits are pushed.

- Updated deepseek-chat and deepseek-reasoner models from 64k to 128k context window
- Updated corresponding test expectations
- Aligns with DeepSeek API documentation at https://api-docs.deepseek.com/quick_start/pricing/

Fixes #7268
@roomote roomote bot requested review from cte, jr and mrubens as code owners August 21, 2025 07:09
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Aug 21, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing my own code because apparently I trust no one, not even myself.

"deepseek-chat": {
maxTokens: 8192,
contextWindow: 64_000,
contextWindow: 128_000,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context window update to 128k looks correct and aligns with the DeepSeek API documentation. Consider adding a comment referencing the API docs URL (https://api-docs.deepseek.com/quick_start/pricing/) for future maintainers.

Also, this capability update might warrant a changelog entry so users know about the increased context window.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 21, 2025
@roomote roomote bot mentioned this pull request Aug 21, 2025
@NaccOll
Copy link
Contributor

NaccOll commented Aug 21, 2025

@roomote-agent read https://api-docs.deepseek.com/zh-cn/quick_start/pricing and update this pr.

@roomote
Copy link
Contributor Author

roomote bot commented Aug 21, 2025

Hi @NaccOll! I see your request to review the DeepSeek pricing documentation and update this PR accordingly. Let me check the documentation and make the necessary updates.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Aug 21, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Aug 21, 2025

Hi @NaccOll! I have reviewed the DeepSeek pricing documentation at https://api-docs.deepseek.com/zh-cn/quick_start/pricing and updated the PR accordingly.

Changes Made:

  1. ✅ Confirmed that both deepseek-chat and deepseek-reasoner models support 128K context window (already correctly updated in the PR)
  2. ✅ Updated deepseek-reasoner maxTokens from 8192 to 65536 (64K) to match the documentation which states max output is 64K
  3. ✅ Updated the description for deepseek-reasoner to reflect "up to 64K output tokens" instead of "up to 32K tokens"
  4. ✅ Added a new test case to verify the correct maxTokens value for deepseek-reasoner

Summary from Documentation:

  • deepseek-chat: 128K context, max 8K output ✅
  • deepseek-reasoner: 128K context, max 64K output ✅

All tests pass and CI checks are green. The PR now accurately reflects the latest DeepSeek API capabilities.

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Aug 21, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Aug 21, 2025
- deepseek-chat: 4096 (4K default) instead of 8192 (8K max)
- deepseek-reasoner: 32768 (32K default) instead of 65536 (64K max)
- Updated tests to match new default values
- Updated description to clarify default vs max output tokens
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 21, 2025
- deepseek-chat: 8192 (8K max)
- deepseek-reasoner: 65536 (64K max)
- Updated tests to match maximum values
- Updated description to reflect 64K max output
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Aug 21, 2025
@mrubens mrubens merged commit 9fe06db into main Aug 21, 2025
9 checks passed
@mrubens mrubens deleted the fix/deepseek-128k-context branch August 21, 2025 22:03
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 21, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Preliminary Review size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Deepseek has 128k context now

6 participants