anomalyco / anomalyco/opencode

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

Open
#46,178 0 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 29, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.