You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
agents: debug agents does not surface the resolved model variant #48700
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.
opencode2 debug config → agents.build.model is {"providerID":"opencode-go","model":"deepseek-v4.1-flash","variant":"high"}.
opencode2 debug agents → build is {"model":{"id":"deepseek-v4.1-flash","providerID":"opencode-go"},"variant":null}.
The same holds for worker, debugger, implementer, and reviewer.
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.
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:
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.
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.
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report!
You're on a pre-release beta build (
@opencode-ai/[email protected], run asopencode2). In current v2 code, the variant is stored as part of the agent's model, and config resolution copies it frommodel: provider/model#variantonto the agent. Sodebug agentsshould print something like:The separate top-level
"variant": nullin 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,opencodecommand) and runopencode debug agentsagain with the sameopencode.json? Please share:opencode --versionbuildentry fromopencode debug agentsYou 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:
debug agentsshows the agent variant insidemodel, but the variant isn't applied to provider requests. This is the "does it reach the provider" question you left open.model: provider/model#variant.opencodejr commentedon Oct 31, 2026
Closing this for now, since we haven't heard back. We were waiting to see whether
opencode debug agentsstill shows"variant": nullon a current stable v2 release (@opencode/cli). In current v2 code the variant is stored inside each agent'smodel, so the output from0.0.0-beta-19271looks like it comes from an older pre-release build.If you still see the variant missing after upgrading, please reply with your
opencode --versionand thebuildentry fromopencode debug agents, and we can reopen this. Whether the agent variant actually reaches provider requests is tracked in #51326.