Skip to content

fix(models): add DeepSeek V3.1 and remove deprecated entries - #623

Merged
steebchen merged 2 commits into
mainfrom
fix/ds
Aug 22, 2025
Merged

steebchen merged 2 commits into
mainfrom
fix/ds

Conversation

@steebchen

@steebchen steebchen commented Aug 22, 2025

Copy link
Copy Markdown
Member

Added a new model definition for DeepSeek V3.1 and removed the outdated DeepSeek configuration. Updated context size and enabled additional features like vision and tools for testing purposes.

Summary by CodeRabbit

  • New Features

    • Introduced DeepSeek V3.1 model with a larger 128k context window.
    • Enables vision and streaming, with tools support for richer interactions.
  • Chores

    • Updated model catalog: added DeepSeek V3.1 with current pricing and capabilities.
    • Adjusted provider routing for DeepSeek V3; removed a legacy provider entry.

Added a new model definition for DeepSeek V3.1 and removed the outdated
DeepSeek configuration. Updated context size and enabled additional
features like vision and tools for testing purposes.
@coderabbitai

coderabbitai Bot commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Introduces a new DeepSeek V3.1 model definition with vision, tools, and larger context. Removes the deepseek-chat provider from the existing DeepSeek V3 definition, leaving only cloudrift and nebius providers. Updates pricing and context size metadata for the newly added V3.1 entry.

Changes

Cohort / File(s) Summary
DeepSeek model definitions
packages/models/src/models/deepseek.ts
- Removed provider { providerId: "deepseek", modelName: "deepseek-chat" } from deepseek-v3 providers
- Added new deepseek-v3.1 model with provider { providerId: "deepseek", modelName: "deepseek-chat" }, contextSize 128000, streaming true, vision true, tools true, jsonOutput false, pricing (input 0.27/1e6, output 1.1/1e6)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ds

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/models/src/models/deepseek.ts (2)

185-185: Confirm jsonOutput setting is intentional.

jsonOutput: false differs from some other entries (e.g., R1 Distill with true). If V3.1 can reliably emit JSON, consider setting this to true to unlock structured output features; otherwise leaving it false is fine.


166-166: Rename the model ID to use hyphens instead of dots

A quick search confirms the only occurrence of "deepseek-v3.1" is on line 166 of packages/models/src/models/deepseek.ts, so updating it won’t break any cross-repo references.

• File: packages/models/src/models/deepseek.ts
Line: 166

Apply this diff:

-    id: "deepseek-v3.1",
+    id: "deepseek-v3-1",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3f304a3 and fa1a5ce.

📒 Files selected for processing (1)
  • packages/models/src/models/deepseek.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use localStorage instead of cookies for client-side data persistence

Files:

  • packages/models/src/models/deepseek.ts
**/*.{js,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{js,ts}: Use drizzle with the latest object syntax for database operations
For read queries, always use db().query.<table>.findMany() or db().query.<table>.findFirst()

Files:

  • packages/models/src/models/deepseek.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use as any or : any in TypeScript files.

Files:

  • packages/models/src/models/deepseek.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build / run
  • GitHub Check: e2e / run
🔇 Additional comments (4)
packages/models/src/models/deepseek.ts (4)

165-186: LGTM on structure and typing for the new model entry.

The new V3.1 block conforms to the ModelDefinition shape, uses the existing pricing-per-1e6 convention, and keeps consistency with other providers (requestPrice, maxOutput, streaming, jsonOutput fields). Looks clean.


165-186: No Removal Detected – No Backward-Compatibility Risk
Based on the grep output you shared, the deepseek-v3 entry remains in packages/models/src/models/deepseek.ts alongside the new deepseek-v3.1 entry. No existing “deepseek-v3” model/provider pairing was removed, so clients pinning “deepseek-v3” will continue to work as before.

• If you do intend to retire deepseek-v3 in a future release, consider adding an alias (v3 → v3.1) or a formal deprecation window at that time.
• No immediate migration or documentation updates are required for the current change.

Likely an incorrect or invalid review comment.


175-179: Confirm authoritative context window for deepseek-chat V3.1
We’ve validated that the pricing in code (inputPrice = $0.27 / 1M tokens, outputPrice = $1.10 / 1M tokens) matches DeepSeek’s official Model & Pricing page, which also lists a 128K-token context window. However, the alternate pricing-details page still shows 64K. Please verify which value (64K vs. 128K) is authoritative for deepseek-chat (DeepSeek V3.1) by pasting the exact snippet from the official docs below before we merge.

  • File: packages/models/src/models/deepseek.ts
  • Lines: 175–179

173-175: Confirm DeepSeek provider modelName mapping ("deepseek-chat") targets V3.1

I inspected the repo: packages/models/src/models/deepseek.ts defines id "deepseek-v3.1" (line 166) but the provider entry uses modelName "deepseek-chat" (lines 173–175). I couldn't find any adapter/alias mapping in the search output that guarantees "deepseek-chat" is routed to the v3.1 backend.

  • File to review: packages/models/src/models/deepseek.ts
    • id: "deepseek-v3.1" (line 166)
    • provider entry: providerId: "deepseek", modelName: "deepseek-chat" (lines 173–175)

Please verify the DeepSeek provider adapter translates "deepseek-chat" → v3.1. If it does not, either:

  • update modelName to "deepseek-v3.1", or
  • add an explicit alias/normalization in the provider adapter.

Comment on lines +181 to +183
vision: true,
tools: true,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Ensure the DeepSeek adapter actually supports vision input and tool calls for this model.

Setting vision: true and tools: true will enable UI paths and request construction; if the adapter lacks multipart/image handling or tool-call schema mapping, calls will fail at runtime.

Run these checks:

If missing, either disable the flags here or add adapter support before enabling.


🏁 Script executed:

#!/bin/bash
# Vision support: look for image/multipart handling in DeepSeek provider
rg -nP -C3 '(image_url|multipart/form-data|attachments|vision)' --type=ts
# Tools support: look for function/tool call plumbing in DeepSeek provider
rg -nP -C3 '(tool_calls?|function_call|tools:\s*true|function_calling)' --type=ts

Length of output: 88662


DeepSeek adapter missing vision & tool-call handling — implement support or disable flags

Our repository search didn’t uncover any DeepSeek-specific code that handles image inputs (e.g. multipart/form-data upload, base64 conversion, attachments) nor any special mapping of tool calls/schema for DeepSeek. As a result, the flags enabled at lines 181–183 in packages/models/src/models/deepseek.ts will lead to runtime failures.

packages/models/src/models/deepseek.ts:181–183

 vision: true,
 tools: true,

These should be reverted or gated until the adapter is extended to:

  • construct and send multipart/form-data (or base64) payloads for vision inputs
  • inject and serialize tool_calls according to DeepSeek’s expected API schema

packages/models/src/provider-api.ts
Lacks any DeepSeek-specific branch for handling vision inputs or tool calls beyond the generic requestBody.tools = tools;. You’ll need to:

  • add a DeepSeek case that transforms image attachments into the correct payload
  • ensure tool call parameters are formatted per DeepSeek’s API

Please either disable vision/tools for DeepSeek now or implement the above adapter support before merging.

Committable suggestion skipped: line range outside the PR's diff.

@steebchen
steebchen added this pull request to the merge queue Aug 22, 2025
Merged via the queue into main with commit 4d0eb10 Aug 22, 2025
10 checks passed
@steebchen
steebchen deleted the fix/ds branch August 22, 2025 01:35
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.

1 participant