Skip to content

DeepSeek V4 --variant none is accepted but does not disable thinking #46178

Description

@tanishqvec

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

  1. opencode run --model opencode/deepseek-v4-flash --variant none --format json --thinking -- "What is 17*23? Answer with just the number."
  2. A {"type":"reasoning", ...} part is still emitted, so thinking was never disabled.

Operating System

macOS 26.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions