Skip to content

feat: add DeepSeek V4 Pro and Flash models with correct specs#12178

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
feat/deepseek-v4-correct-specs
Draft

feat: add DeepSeek V4 Pro and Flash models with correct specs#12178
roomote-v0[bot] wants to merge 1 commit intomainfrom
feat/deepseek-v4-correct-specs

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented Apr 24, 2026

Related GitHub Issue

Closes: #12174

Description

This PR attempts to address Issue #12174 per @dd00zz's feedback about correct model specs. Feedback and guidance are welcome.

Key changes:

  1. Added deepseek-v4-pro and deepseek-v4-flash models to the DeepSeek provider with correct specs:

    • Context window: 1,000,000 tokens (1M)
    • Max output: 384,000 tokens (384K)
    • Vision support enabled
    • Thinking mode (preserveReasoning) enabled
    • Prompt cache support enabled
  2. Improved thinking mode detection in the DeepSeek handler to use the preserveReasoning flag from ModelInfo instead of hardcoding modelId.includes("deepseek-reasoner"). This means V4 models (and any future thinking models) automatically get proper reasoning_content handling without code changes.

  3. Added comprehensive tests for both new models covering model info, thinking mode parameters, and streaming behavior.

Test Procedure

  • Ran cd src && npx vitest run api/providers/__tests__/deepseek.spec.ts -- all 27 tests pass
  • Type checking passes via turbo check-types
  • Linting passes via turbo lint

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue
  • Scope: Changes are focused on adding DeepSeek V4 models
  • Self-Review: Done
  • Testing: New tests added for V4 models
  • Documentation Impact: No documentation updates required
  • Contribution Guidelines: Read and agreed

Documentation Updates

  • No documentation updates are required.

Additional Notes

Pricing values for V4 models are estimates and may need adjustment once official pricing is confirmed. The context window (1M) and max output (384K) specs are per @dd00zz's feedback on the issue.

Interactively review PR in Roo Code Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] support deepseek v4 and new thinking mode

1 participant