-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat: Add DeepSeek V3.1 variants and GLM-4.6 with reasoning support (… #8479
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
base: main
Are you sure you want to change the base?
feat: Add DeepSeek V3.1 variants and GLM-4.6 with reasoning support (… #8479
Conversation
…for hybrid models - Added deepseek-ai/DeepSeek-V3.1-Terminus and deepseek-ai/DeepSeek-V3.1-Turbo model variants to ChutesModelId type - Enabled reasoning mode support for DeepSeek V3.1 and GLM-4.5 models when enableReasoningEffort is true - Updated ChutesHandler to parse <think> tags for reasoning content in supported hybrid models - Added tests for new model variants and reasoning mode functionality Fixes RooCodeInc#8256
…ooCodeInc#8256) - Add DeepSeek-V3.1-Terminus and DeepSeek-V3.1-turbo models - Add GLM-4.6-FP8 model with 200K context window - Fix reasoning implementation to use chat_template_kwargs with thinking parameter - Parse reasoning_content field for hybrid reasoning models (DeepSeek V3.1, GLM-4.5, GLM-4.6) - Update tests to verify reasoning mode functionality - Fix capitalization: DeepSeek-V3.1-Turbo -> DeepSeek-V3.1-turbo Fixes RooCodeInc#8256
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.
I found some issues that need attention. See inline comments for details.
| "deepseek-ai/DeepSeek-V3.1" | ||
| "deepseek-ai/DeepSeek-V3.1-Terminus" | ||
| "deepseek-ai/DeepSeek-V3.1-Turbo" | ||
| "deepseek-ai/DeepSeek-V3.1-turbo" |
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.
[P2] Potential breaking change: Renaming the model id from "DeepSeek-V3.1-Turbo" to "DeepSeek-V3.1-turbo" will break users who have existing configs referencing the old id. Consider adding a temporary alias/back-compat mapping (accept both ids) or a migration to remap the old value to the new one before lookup to avoid surprising failures.
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.
// Handle DeepSeek V3.1, GLM-4.5, and GLM-4.6 models with reasoning_content parsing | ||
const isHybridReasoningModel = | ||
model.id.includes("DeepSeek-V3.1") || model.id.includes("GLM-4.5") || model.id.includes("GLM-4.6") | ||
const reasoningEnabled = this.options.enableReasoningEffort === true |
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.
[P2] Consistency with reasoning toggle: This direct check (=== true) bypasses the shared helper and may diverge from global defaults or future logic. Prefer using the existing shouldUseReasoningEffort helper so provider behavior stays consistent across backends. Also remove the unused import if you decide to keep the direct check.
const temperature = this.options.modelTemperature ?? this.getModel().info.temperature | ||
|
||
return { | ||
const params: any = { |
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.
[P3] Typing: Avoid any here; you can return the exact type to improve maintainability and catch mistakes earlier.
const params: any = { | |
const params: OpenAI.Chat.Completions.ChatCompletionCreateParamsStreaming = { |
Closes #8256
Changes
chat_template_kwargs
withthinking: true
parameterreasoning_content
field for hybrid reasoning models (DeepSeek V3.1, GLM-4.5, GLM-4.6)Related GitHub issue
Roo Code task context (optional)
Description
This PR implements support for the DeepSeek V3.1 model variants (Terminus and turbo) and adds the GLM-4.6-FP8 model to Chutes
Key implementation details
chat_template_kwargs: { thinking: true }
to the API request whenenableReasoningEffort
is trueReview notes
reasoning_content
responses instead of XML tag parsingTest procedure
chat_template_kwargs
parameterPre-submission checklist
Screenshots / videos
Documentation updates
Alignment with roadmap
Additional notes
This is my first contribution to Roo Code
Get in touch
Important
Add DeepSeek V3.1 variants and GLM-4.6 with reasoning support to Chutes provider, updating models and tests.
DeepSeek-V3.1-Terminus
andDeepSeek-V3.1-turbo
toChutesModelId
inchutes.ts
.GLM-4.6-FP8
with 200K context window toChutesModelId
inchutes.ts
.chat_template_kwargs: { thinking: true }
inchutes.ts
.reasoning_content
forDeepSeek V3.1
,GLM-4.5
, andGLM-4.6
increateMessage()
inchutes.ts
.GLM-4.6-FP8
and reasoning mode inchutes.spec.ts
.reasoning_content
responses inchutes.spec.ts
.This description was created by
for be2ad23. You can customize this summary. It will automatically update as commits are pushed.