feat(provider): add none reasoning variant for DeepSeek V4 - #41955
feat(provider): add none reasoning variant for DeepSeek V4#41955huynq55-v3 wants to merge 1 commit into
Conversation
|
Confirmed your payload works on zen: api.deepseek.com looks different though — its docs list I opened #46181, which patches the same function you did and branches the payload per provider, plus fixes the early return that drops the declared toggle in the first place. You picked the right function — happy to close mine if you'd rather extend yours. |
|
Thanks for digging into the root cause and covering the provider-specific payload differences in #46181! Your PR addresses the underlying early return and handles both Zen and api.deepseek.com cleanly, so I'm closing this one in favor of #46181 to keep things consolidated. Appreciate the thorough follow-up! |

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