Skip to content

agents: debug agents does not surface the resolved model variant #48700

Closed as not planned

Description

@sainzs

Summary

opencode2 debug config reports the resolved reasoning-effort variant for an
agent, while opencode2 debug agents reports variant: null for that same
agent — the registry view omits the one field that decides model effort.
Request: have debug agents surface the resolved variant per agent.

Environment

  • opencode version: 0.0.0-beta-19271
  • OS: Darwin 25.5.0 (darwin arm64)
  • Terminal: TERM=xterm-256color, COLORTERM=truecolor (Herdr 0.8.2 pane)
  • Shell: /bin/zsh
  • Install/channel: beta (bun add -g @opencode-ai/[email protected])
  • Active plugins: none (opencode2 plugin list → "No plugins found")

Reproduction

Config state:

// opencode.json
{ "agents": { "build": { "model": "opencode-go/deepseek-v4.1-flash#high" } } }
  1. opencode2 debug config → agents.build.model is
    {"providerID":"opencode-go","model":"deepseek-v4.1-flash","variant":"high"}.
  2. opencode2 debug agents → build is
    {"model":{"id":"deepseek-v4.1-flash","providerID":"opencode-go"},"variant":null}.
  3. The same holds for worker, debugger, implementer, and reviewer.
  4. The hidden built-ins keep theirs: compaction and summary report
    "variant":"low" in both commands.

Expected Behavior

debug agents should surface the resolved model + variant per agent — the same
variant config resolution applied — so reasoning effort can be verified from the
CLI without inspecting provider request payloads.

Actual Behavior

debug agents reports "variant": null for agents whose resolved config
carries a variant, while debug config shows it. The two commands disagree on
the one field that determines reasoning effort.

Additional Context

  • Discovered while verifying a V1→V2 config migration where reasoning effort is
    expressed as model: provider/model#variant in opencode.json.
  • Whether the variant still reaches the provider request is unverified here —
    the install pins OPENCODE_LOG_LEVEL=ERROR, so request bodies are not logged.
    If the runner applies it, this is a diagnostic gap; if not, agents silently
    run at default effort.

Proposed Solution

Carry the resolved variant from config resolution into the agent registry so
debug agents reports model + variant per agent, matching debug config.

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report!

    You're on a pre-release beta build (@opencode-ai/[email protected], run as opencode2). In current v2 code, the variant is stored as part of the agent's model, and config resolution copies it from model: provider/model#variant onto the agent. So debug agents should print something like:

    "model": { "id": "deepseek-v4.1-flash", "providerID": "opencode-go", "variant": "high" }

    The separate top-level "variant": null in your output doesn't match the current agent schema, so your build is probably older than this code.

    Could you upgrade to the current stable v2 release (@opencode/cli, opencode command) and run opencode debug agents again with the same opencode.json? Please share:

    • the output of opencode --version
    • the build entry from opencode debug agents

    You can reply here or edit the issue. If you edit it, please also leave a comment saying you've updated it, so we know you're done.

    Related issues, ordered by likelihood:

  2. opencodejr commented on Oct 31, 2026

    @opencodejr
    Contributor

    Closing this for now, since we haven't heard back. We were waiting to see whether opencode debug agents still shows "variant": null on a current stable v2 release (@opencode/cli). In current v2 code the variant is stored inside each agent's model, so the output from 0.0.0-beta-19271 looks like it comes from an older pre-release build.

    If you still see the variant missing after upgrading, please reply with your opencode --version and the build entry from opencode debug agents, and we can reopen this. Whether the agent variant actually reaches provider requests is tracked in #51326.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions