Skip to content

models: V2 model metadata has no reasoning flag, so the picker always shows "No reasoning" #50279

Closed as not planned

Description

@wxy940910

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

  1. 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.reasoningField set:

    {
      "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" }
            }
          }
        }
      }
    }
  2. Open the model picker and highlight the model. The info panel shows 推理: 不支持推理 (reasoning: not supported), while 上下文: 1,000,000 renders correctly.

  3. 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":"..."
  4. 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.Info has no reasoning field. 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 capabilities object without reasoning, 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": true on 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 "不支持推理".
  • References:

Activity

  1. wxy940910 commented on Sep 21, 2026

    @wxy940910
    Author

    Looks like this duplicates #50257, and a fix is already in review: #50283 — the catalog reasoning flag is dropped when building V2 Model.Capabilities, and the desktop mapper hardcodes reasoning: false.

    Keeping this open and linked as an extra data point: GET /api/model returns 45 models and none expose a reasoning flag, including opencode-go/deepseek-v4.1-flash, which models.dev marks as reasoning: true.

  2. wxy940910 commented on Sep 21, 2026

    @wxy940910
    Author

    Closing as duplicate of #50257 (fix in review: #50283).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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