Skip to content

ACP fresh sessions ignore the default agent variant #41628

Closed as not planned
Closed as not planned

Description

@apcooley

Description

Fresh ACP sessions select the first available model variant instead of the default primary agent variant configured in opencode.json, even when the agent model matches the configured default model.

For example:

{
  "model": "openai/gpt-5.4",
  "agent": {
    "build": {
      "model": "openai/gpt-5.4",
      "variant": "high"
    }
  }
}

If the model variants are ordered low, medium, high, a new ACP session reports low as its current effort instead of high. The configured model itself is selected correctly.

The current ACP directory snapshot retains the default model but not the matching default agent variant. Initial variant selection therefore falls through to variants.default or Object.keys(variants)[0].

This appears to be a regression of #21556, which reported the same ACP model/variant behavior and was closed after #25663. Related ACP configuration issues include #4001 and #18620. The broader TUI/Desktop agent-default-variant work is tracked in #7138 and #7156; this report is limited to fresh ACP session initialization.

Plugins

None required.

OpenCode version

Reproduced on current dev at 3a90639 (packages/opencode version 1.18.16).

Steps to reproduce

  1. Configure a default model and matching agent.build.model with agent.build.variant as shown above.
  2. Start a fresh session through an ACP client such as Zed or Emacs agent-shell.
  3. Inspect the initial model and effort configuration.
  4. The model matches the configuration, but effort uses the first model variant instead of agent.build.variant.

Screenshot and/or share link

Not applicable. The behavior is reproducible in the ACP session service test harness.

Operating System

macOS 26.5.1, Apple Silicon.

Terminal

ACP via Emacs agent-shell.

Activity

  1. rgyph commented on Aug 29, 2026

    @rgyph

    As a temporary workaround, you can disable the "unnecessary" variants for a specific model :)

    Something like this in opencode.json file (tested in opencode 1.18.25):

    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "opencode-go": {
          "models": {
            "glm-5.3-flash": {
              "variants": {
                "low": {
                  "disabled": true
                },
                "high": {
                  "disabled": true
                }
              }
            }
          }
        }
      }
    }
    
  2. Tarquinen commented on Oct 20, 2026

    @Tarquinen
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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

Metadata

Metadata

Assignees

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