Description
models.dev declares both a thinking toggle and effort values for deepseek-v4-*, but reasoningVariants() in packages/opencode/src/provider/transform.ts returns as soon as it finds the effort entry, so the toggle is dropped and only low|high|max are offered. --variant none is accepted on the CLI today and silently does nothing — the model still returns reasoning.
Because that early return is non-undefined, the reasoningVariants(model, base) ?? ProviderTransform.variants(base) fallback at provider.ts:1310 never runs for these models either.
The switch differs by provider. Zen accepts reasoning_effort: "none" and ignores thinking entirely — thinking: "nonsense" also returns 200, and its validator reports literal['none','minimal','low','medium','high','xhigh','max']. api.deepseek.com is the other way round: thinking is disabled with {"thinking": {"type": "disabled"}} and reasoning_effort is documented as low|high|max only (https://api-docs.deepseek.com/guides/thinking_mode).
Related: #41955 patches this same function but sends reasoning_effort: "none", which is correct for zen; #31795 sends thinking.type=disabled, correct for api.deepseek.com, but patches variants(), which isn't reached for models that declare reasoning_options. Happy to open a PR.
OpenCode version
1.18.25
Steps to reproduce
opencode run --model opencode/deepseek-v4-flash --variant none --format json --thinking -- "What is 17*23? Answer with just the number."
- A
{"type":"reasoning", ...} part is still emitted, so thinking was never disabled.
Operating System
macOS 26.0
Description
models.dev declares both a thinking toggle and effort values for
deepseek-v4-*, butreasoningVariants()inpackages/opencode/src/provider/transform.tsreturns as soon as it finds the effort entry, so the toggle is dropped and onlylow|high|maxare offered.--variant noneis accepted on the CLI today and silently does nothing — the model still returns reasoning.Because that early return is non-undefined, the
reasoningVariants(model, base) ?? ProviderTransform.variants(base)fallback atprovider.ts:1310never runs for these models either.The switch differs by provider. Zen accepts
reasoning_effort: "none"and ignoresthinkingentirely —thinking: "nonsense"also returns 200, and its validator reportsliteral['none','minimal','low','medium','high','xhigh','max']. api.deepseek.com is the other way round: thinking is disabled with{"thinking": {"type": "disabled"}}andreasoning_effortis documented aslow|high|maxonly (https://api-docs.deepseek.com/guides/thinking_mode).Related: #41955 patches this same function but sends
reasoning_effort: "none", which is correct for zen; #31795 sendsthinking.type=disabled, correct for api.deepseek.com, but patchesvariants(), which isn't reached for models that declarereasoning_options. Happy to open a PR.OpenCode version
1.18.25
Steps to reproduce
opencode run --model opencode/deepseek-v4-flash --variant none --format json --thinking -- "What is 17*23? Answer with just the number."{"type":"reasoning", ...}part is still emitted, so thinking was never disabled.Operating System
macOS 26.0