Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 24, 2025

This PR fixes the reasoning/thinking section visibility issue for DeepSeek V3.1 and GLM-4.5 models when used through OpenAI Compatible provider.

Problem

  • DeepSeek V3.1 and GLM-4.5 models' reasoning sections were not appearing when reasoning effort was enabled
  • Both models support thinking/reasoning features but lacked the necessary configuration flags

Solution

  • Added supportsReasoningEffort: true flag to DeepSeek chat and reasoner models
  • Added supportsReasoningEffort: true flag to all GLM-4.5 model variants (standard and Air versions)
  • Applied to both international and mainland configurations for GLM models

Testing

  • All existing tests pass
  • Type checking passes
  • Linting passes

Impact

This change enables users to see the reasoning/thinking process for:

  • DeepSeek V3.1 (deepseek-chat)
  • DeepSeek R1 (deepseek-reasoner)
  • GLM-4.5 (all variants)
  • GLM-4.5-Air (all variants)

Fixes #7370

cc @AykhanUV - Yes, this fix addresses both DeepSeek V3.1 and GLM-4.5 models as requested.


Important

Adds supportsReasoningEffort: true to enable reasoning visibility for DeepSeek V3.1, DeepSeek R1, GLM-4.5, and GLM-4.5-Air models.

  • Behavior:
    • Adds supportsReasoningEffort: true to deepSeekModels in deepseek.ts for DeepSeek V3.1 and DeepSeek R1 models.
    • Adds supportsReasoningEffort: true to internationalZAiModels and mainlandZAiModels in zai.ts for GLM-4.5 and GLM-4.5-Air models.
  • Impact:
    • Enables reasoning/thinking visibility for DeepSeek V3.1, DeepSeek R1, GLM-4.5, and GLM-4.5-Air models.
    • Applies to both international and mainland configurations for GLM models.

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

- Add supportsReasoningEffort flag to DeepSeek chat and reasoner models
- Add supportsReasoningEffort flag to GLM-4.5 and GLM-4.5-air models (both international and mainland)
- This enables the reasoning/thinking section visibility for these models when used through OpenAI Compatible provider

Fixes #7370
@roomote roomote bot requested review from cte, jr and mrubens as code owners August 24, 2025 14:40
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Aug 24, 2025
Copy link
Contributor Author

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

Reviewing my own code because apparently I trust no one, not even myself.

contextWindow: 128_000,
supportsImages: false,
supportsPromptCache: true,
supportsReasoningEffort: true, // DeepSeek V3.1 supports thinking/reasoning
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The implementation looks correct and follows the existing pattern. However, would it be helpful to add test coverage for the supportsReasoningEffort flag? The existing tests in src/api/providers/__tests__/deepseek.spec.ts could verify this capability is properly set.

contextWindow: 128_000,
supportsImages: false,
supportsPromptCache: true,
supportsReasoningEffort: true, // DeepSeek-R1 supports thinking/reasoning
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Minor suggestion: For consistency, consider standardizing the comment wording across all models. Currently using "DeepSeek V3.1 supports thinking/reasoning" here and "DeepSeek-R1 supports thinking/reasoning" below. Perhaps just "supports reasoning" would be cleaner?

contextWindow: 131_072,
supportsImages: false,
supportsPromptCache: true,
supportsReasoningEffort: true, // GLM-4.5 supports thinking/reasoning
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to see both international and mainland configurations updated consistently. Similar to the DeepSeek models, consider adding test assertions in src/api/providers/__tests__/zai.spec.ts to verify the supportsReasoningEffort flag is properly set for these models.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 24, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Aug 26, 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 Aug 26, 2025
@daniel-lxs
Copy link
Member

Issue needs scoping

@daniel-lxs daniel-lxs closed this Aug 27, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Aug 27, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working PR - Needs Preliminary Review size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

DeepSeek V3.1 reasoning section does not appear

4 participants