feat(provider): add none reasoning variant for DeepSeek V4 - #41955
Open
huynq55-v3 wants to merge 1 commit into
Open
feat(provider): add none reasoning variant for DeepSeek V4#41955huynq55-v3 wants to merge 1 commit into
huynq55-v3 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #N/A
Type of change
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
Checklist