Repository navigation
Description
Summary
The model picker's info panel always reports "不支持推理" / "No reasoning" for every model, including models that are known to support reasoning. V2 model metadata (GET /api/model) has no reasoning field at all, so the panel's capabilities.reasoning / model.reasoning check can never be true.
Environment
- opencode version: 2.0.11 (v2.0.11)
- OS: Linux 6.18.33.2-microsoft-standard-WSL2 (linux x64)
- Terminal: TERM=xterm-256color, TERM_PROGRAM=(unset), COLORTERM=(unset)
- Shell: /bin/bash
- Install/channel: npm global install of
@opencode/cli(release) - Active plugins: None
Reproduction
-
Configure a custom OpenAI-compatible provider whose model is known to support reasoning (this one is DeepSeek V4.1 Flash through an internal OpenAI-compatible gateway), with
compatibility.reasoningFieldset:{ "providers": { "turing": { "name": "Turing AI", "package": "@opencode/ai/providers/openai-compatible", "settings": { "baseURL": "https://<internal-gateway>/api/v1/" }, "models": { "deepseek-v4.1-flash": { "name": "Deepseek V4.1 Flash", "capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] }, "limit": { "context": 1000000, "output": 393216 }, "compatibility": { "reasoningField": "reasoning_content" } } } } } } -
Open the model picker and highlight the model. The info panel shows
推理: 不支持推理(reasoning: not supported), while上下文: 1,000,000renders correctly. -
Confirm the model actually reasons by calling it directly (streaming) and observing
reasoning_content:curl https://<internal-gateway>/api/v1/chat/completions \ -H "Content-Type: application/json" -H "Authorization: Bearer $KEY" \ -d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"1+1=?"}],"reasoning_effort":"high","stream":true}' # -> 35 chunks contain "reasoning_content":"..."
-
Inspect the model metadata served to the clients:
opencode api get /api/model
Expected Behavior
The panel should report reasoning as supported for a model that returns reasoning_content and accepts a reasoning effort setting. Either the metadata exposes a reasoning flag, or the configuration provides a way to declare it.
Actual Behavior
GET /api/model returns 45 models and none of them expose any reasoning field. Every entry has capabilities: { tools, input, output } only. This includes catalog reasoning models, e.g. opencode-go/deepseek-v4.1-flash:
{
"id": "deepseek-v4.1-flash",
"providerID": "opencode-go",
"compatibility": { "reasoningField": "reasoning_content" },
"capabilities": { "tools": true, "input": ["text", "image"], "output": ["text"] },
"variants": [{ "id": "low" }, { "id": "high" }, { "id": "max" }],
"limit": { "context": 1000000, "output": 384000 }
}models.dev marks this model as "reasoning": true, and the same panel therefore mislabels it as "No reasoning" too. There is no config field that changes this.
Additional Context
-
In the 2.0.11 binary, the V2 model schema for capabilities is:
Model.Capabilities = { tools: boolean, input: string[], output: string[] }
and
Model.Infohas noreasoningfield. Meanwhile the picker tooltip resolves the row as:model.capabilities ? (model.capabilities.reasoning ? "model.tooltip.reasoning.allowed" : "model.tooltip.reasoning.none") : (model.reasoning ? "model.tooltip.reasoning.allowed" : "model.tooltip.reasoning.none")
Since V2 always provides a
capabilitiesobject withoutreasoning, the first branch wins and the row is always "none". -
Frequency: always reproducible; affects all providers, including official catalog providers such as OpenCode Go / OpenCode Zen.
-
Workarounds tried:
- Adding
"reasoning": trueon the model: silently dropped by the V2 schema (still absent from/api/model). - Adding
"canonical": "opencode-go"to inherit catalog metadata: inherits family/variants/cost, but still no reasoning flag; the panel still shows "不支持推理".
- Adding
-
References:
- OpenCode docs, Models: https://opencode.ai/v2/docs/models/
- models.dev entry used for comparison: provider
opencode-go, modeldeepseek-v4.1-flash(reasoning: true).
Activity
wxy940910 commentedon Sep 21, 2026
Looks like this duplicates #50257, and a fix is already in review: #50283 — the catalog
reasoningflag is dropped when building V2Model.Capabilities, and the desktop mapper hardcodesreasoning: false.Keeping this open and linked as an extra data point:
GET /api/modelreturns 45 models and none expose a reasoning flag, includingopencode-go/deepseek-v4.1-flash, which models.dev marks asreasoning: true.wxy940910 commentedon Sep 21, 2026
Closing as duplicate of #50257 (fix in review: #50283).