Skip to content

Conversation

yieldsurfer
Copy link

@yieldsurfer yieldsurfer commented Oct 2, 2025

Closes #8256

Changes

  • Added DeepSeek-V3.1-Terminus and DeepSeek-V3.1-turbo model variants to Chutes provider
  • Added GLM-4.6-FP8 model with 200K context window (204,800 tokens)
  • Fixed reasoning implementation to use chat_template_kwargs with thinking: true parameter
  • Parse reasoning_content field for hybrid reasoning models (DeepSeek V3.1, GLM-4.5, GLM-4.6)
  • Updated tests to verify reasoning mode functionality with proper API response parsing

Related GitHub issue

Roo Code task context (optional)

  • N/A — First contribution

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

  • Reasoning mode is triggered by adding chat_template_kwargs: { thinking: true } to the API request when enableReasoningEffort is true
  • Hybrid reasoning models (DeepSeek V3.1, GLM-4.5, GLM-4.6) are detected and handled separately from DeepSeek R1 models
  • GLM-4.6 uses the same reasoning mechanism as GLM-4.5

Review notes

  • The capitalization fix for "turbo" (lowercase 't') was necessary to match Chutes API requirements
  • Tests were updated to properly mock reasoning_content responses instead of XML tag parsing

Test procedure

  • Automated tests:
    • All 26 tests pass, including 2 new tests for reasoning mode with DeepSeek V3.1 and GLM models
    • Test coverage includes model configuration, reasoning parameter passing, and response parsing
  • Manual testing:
    • Tested all three new models (DeepSeek-V3.1-Terminus, DeepSeek-V3.1-turbo, GLM-4.6-FP8) with Chutes.ai API
    • Verified reasoning mode toggle correctly adds chat_template_kwargs parameter
    • Confirmed no errors with real API calls

Pre-submission checklist

Screenshots / videos

  • N/A

Documentation updates

  • No documentation updates are required.

Alignment with roadmap

  • ? (unclear to me)

Additional notes

This is my first contribution to Roo Code

Get in touch

  • Discord: paeperbag

Important

Add DeepSeek V3.1 variants and GLM-4.6 with reasoning support to Chutes provider, updating models and tests.

  • Models:
    • Add DeepSeek-V3.1-Terminus and DeepSeek-V3.1-turbo to ChutesModelId in chutes.ts.
    • Add GLM-4.6-FP8 with 200K context window to ChutesModelId in chutes.ts.
  • Reasoning:
    • Implement reasoning support using chat_template_kwargs: { thinking: true } in chutes.ts.
    • Parse reasoning_content for DeepSeek V3.1, GLM-4.5, and GLM-4.6 in createMessage() in chutes.ts.
  • Tests:
    • Add tests for GLM-4.6-FP8 and reasoning mode in chutes.spec.ts.
    • Update tests to mock reasoning_content responses in chutes.spec.ts.

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

roomote and others added 2 commits September 23, 2025 13:14
…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
@yieldsurfer yieldsurfer requested review from cte, jr and mrubens as code owners October 2, 2025 22:28
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Oct 2, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 2, 2025
Copy link

@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.

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"
Copy link

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.

Copy link
Author

Choose a reason for hiding this comment

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

the correct model id for chutes for the model is "deepseek-ai/DeepSeek-V3.1-turbo"
image

// 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
Copy link

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 = {
Copy link

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.

Suggested change
const params: any = {
const params: OpenAI.Chat.Completions.ChatCompletionCreateParamsStreaming = {

@yieldsurfer yieldsurfer changed the base branch from feat/chutes-deepseek-v3-1-variants-reasoning to main October 2, 2025 22:43
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Oct 2, 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 Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Preliminary Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: PR [Needs Prelim Review]

Development

Successfully merging this pull request may close these issues.

Support for DeepSeek V3.1 Terminus/Turbo Variants and Hybrid Model Reasoning via Chutes.ai Provider

3 participants