Conversation
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.
WalkthroughIntroduces 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
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 unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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 dotsA quick search confirms the only occurrence of
"deepseek-v3.1"is on line 166 ofpackages/models/src/models/deepseek.ts, so updating it won’t break any cross-repo references.• File:
packages/models/src/models/deepseek.ts
Line: 166Apply 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.
📒 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 usedb().query.<table>.findMany()ordb().query.<table>.findFirst()
Files:
packages/models/src/models/deepseek.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Never use
as anyor: anyin 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.1I 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.
| vision: true, | ||
| tools: true, | ||
| }, |
There was a problem hiding this comment.
💡 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=tsLength 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_callsaccording 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.
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
Chores