Skip to content

feat(provider): add none reasoning variant for DeepSeek V4 - #41955

Open
huynq55-v3 wants to merge 1 commit into
anomalyco:devfrom
huynq55-v3:deepseekv4-none-reasoning
Open

feat(provider): add none reasoning variant for DeepSeek V4#41955
huynq55-v3 wants to merge 1 commit into
anomalyco:devfrom
huynq55-v3:deepseekv4-none-reasoning

Conversation

@huynq55-v3

Copy link
Copy Markdown

Issue for this PR

Closes #N/A

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

DeepSeek V4 exposes a thinking toggle, and its model variants menu currently only surfaced reasoning_effort tiers (low/high/max). This left no way to disable thinking entirely from the variants menu, even though the provider supports reasoning_effort: "none".

This PR adds a none variant alongside DeepSeek V4's existing effort tiers. In packages/opencode/src/provider/transform.ts:1656, reasoningVariants now short-circuits for DeepSeek V4 (deepseek-v4 in the API id) and returns none: { reasoningEffort: "none" } combined with the existing effort variants. Because it only triggers when the target API matches deepseek-v4, behavior for all other providers is unchanged.

How did you verify your code works?

Added a unit test in packages/opencode/test/provider/transform.test.ts asserting that a DeepSeek V4 target with a toggle + effort option produces none, low, high, and max variants, while the rest of the reasoning-variants test suite (Claude extended thinking, etc.) continues to pass.

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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