Skip to content

Same-model agents do not preserve agent-local variant at runtime #27790

@daifeiya

Description

@daifeiya

Description

When multiple agents share the same model but configure different variant values, the effective runtime variant does not match the agent-local config.

In my setup, I configured:

  • dubhe-orchlumenmodel/gpt-5.4 + low
  • buildlumenmodel/gpt-5.4 + medium

But exported sessions/messages and local runtime DB records show other values (especially high) instead. This suggests the problem is not only UI-related: the runtime effective variant itself appears wrong.

opencode agent list also does not expose model/variant, which makes this harder to detect.

Plugins

No response

OpenCode version

OpenCode Terminal 1.15.0

Steps to reproduce

Minimal repro config

{
  "agent": {
    "dubhe-orch": {
      "model": "lumenmodel/gpt-5.4",
      "variant": "low"
    },
    "build": {
      "model": "lumenmodel/gpt-5.4",
      "variant": "medium"
    },
    "dubhe-arc": {
      "model": "lumenmodel/gpt-5.4",
      "variant": "high"
    }
  }
}

These agents intentionally share the same model but use different variants.

Expected
The runtime should preserve the per-agent configured variant:

dubhe-orch → low
build → medium
dubhe-arc → high
Actual
Runtime records do not match config:

dubhe-orch (configured low) shows high, max, or default
build (configured medium) shows high or default
I did not observe the configured low / medium values for the tested agents in runtime data.

This suggests the effective variant may be bleeding across same-model agents, being cached at model level, or being overwritten during session/message creation.

Evidence
Config truth: my config defines different variants for same-model agents, e.g. dubhe-orch = lumenmodel/gpt-5.4 + low and build = lumenmodel/gpt-5.4 + medium.
Exported runtime truth: opencode export <session-id> shows those sessions/messages resolving to other values (especially high) instead of the configured low / medium.
Local runtime DB truth: records in C:\Users\daifeiya\.local\share\opencode\opencode.db also show mismatched runtime values, and I did not observe the configured low / medium values for the tested agents.
So this does not appear to be only a display/UI bug.

Observability gap
opencode agent list does not show model or variant, so the CLI does not provide an easy way to confirm the effective runtime model/variant per agent.

Repro note
The issue is easiest to reproduce with at least 3 agents that share the same model but use different variants, for example:

agent A → lumenmodel/gpt-5.4 + low
agent B → lumenmodel/gpt-5.4 + medium
agent C → lumenmodel/gpt-5.4 + high
The runtime should preserve the per-agent variant, but in my local runtime artifacts it does not.

### Screenshot and/or share link

_No response_

### Operating System

windows11 23h2

### Terminal

Codenomad '0.16.0'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions