Skip to content

OpenRouter Claude Opus 4.6: xhigh variant ignored, defaults to high #22038

@khaledfouad0

Description

@khaledfouad0

Bug Description

When configuring Claude Opus 4.6 via OpenRouter (openrouter/anthropic/claude-opus-4.6) with variant: "xhigh" in oh-my-openagent config, the variant is downgraded to high at startup. Manually selecting xhigh from the variant picker (Ctrl+T) works — it just doesn't persist as the default.

Environment

  • OpenCode: 1.4.3
  • oh-my-openagent: 3.16.0
  • Provider: OpenRouter
  • Model: anthropic/claude-opus-4.6
  • OS: WSL2 Ubuntu on Windows

Steps to Reproduce

  1. Set variant: "xhigh" in oh-my-openagent.json:
{
  "agents": {
    "sisyphus": {
      "model": "openrouter/anthropic/claude-opus-4.6",
      "variant": "xhigh"
    }
  }
}
  1. Run bunx oh-my-openagent doctor --verbose — confirms sisyphus: openrouter/anthropic/claude-opus-4.6 (xhigh) [capabilities: snapshot-backed]
  2. Start opencode — status bar shows high, not xhigh
  3. Open variant picker — xhigh IS available and selectable, but not the default
  4. Selecting xhigh manually works fine

Root Cause

The plugin's model capability heuristic for claude-opus family only includes ["low", "medium", "high", "max"] — no xhigh. The variant picker shows the REASONING_LADDER (none, minimal, low, medium, high, xhigh) which does include xhigh. The downgradeWithinLadder function downgrades xhigh to high because it's not in the heuristic's allowed list.

However, patching the heuristic to include xhigh does not fix it either — opencode core applies its own validation after the plugin resolves the variant.

Expected Behavior

variant: "xhigh" in config should be respected as the default on startup, same as it works when selected manually from the picker.

Related

Same class of issue as #11307 (OpenRouter GPT-5.2-Codex missing xhigh variant).

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

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