Skip to content
This repository was archived by the owner on Jun 9, 2026. It is now read-only.
This repository was archived by the owner on Jun 9, 2026. It is now read-only.

Changing agent doesn't change model and shows a warning #177

@jurgenhaas

Description

@jurgenhaas

I've successfully changed the provider with bun run .opencode/tools/switch-provider.ts anthropic and my opencode.json shows the different models now:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4-5",
  "snapshot": true,
  "username": "redacted",
  "permission": {
    "*": "allow",
    "websearch": "allow",
    "codesearch": "allow",
    "webfetch": "allow",
    "doom_loop": "ask",
    "external_directory": "ask"
  },
  "mode": {
    "build": {
      "prompt": "You are a Personal AI assistant powered by PAI-OpenCode infrastructure."
    },
    "plan": {
      "prompt": "You are a Personal AI assistant powered by PAI-OpenCode infrastructure."
    }
  },
  "agent": {
    "Algorithm": {
      "model": "anthropic/claude-opus-4-7"
    },
    "Architect": {
      "model": "anthropic/claude-sonnet-4-5"
    },
    "Engineer": {
      "model": "anthropic/claude-sonnet-4-5"
    },
...
}

But when I switch to a different agent, OpenCode shows a warning in the top right corner: "Agent Architect's configured model opus/ is not valid". And it always seems to be using anthropic/claude-sonnet-4-5.

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions