Skip to content

Model-level authProfileId override not respected when switching models via /model command #5733

@jaceyang2026-droid

Description

@jaceyang2026-droid

Description

When switching models using the /model command, the per-model authProfileId configuration is not being respected. Instead, the first profile in auth.order is always used.

Configuration

{
  "auth": {
    "order": {
      "google-antigravity": [
        "google-antigravity:[email protected]",
        "google-antigravity:[email protected]",
        "google-antigravity:manual"
      ]
    }
  },
  "agents": {
    "defaults": {
      "models": {
        "google-antigravity/gemini-3-flash": {
          "alias": "flash",
          "params": {
            "authProfileId": "google-antigravity:[email protected]"
          }
        },
        "google-antigravity/claude-opus-4-5-thinking": {
          "alias": "opus",
          "params": {
            "authProfileId": "google-antigravity:[email protected]"
          }
        }
      }
    }
  }
}

Expected Behavior

When using /model flash or /model opus, the model should use [email protected] as specified in the model's params.authProfileId.

Actual Behavior

The model uses [email protected] (the first profile in auth.order) instead of the explicitly configured authProfileId.

Verified via /status:

🧠 Model: google-antigravity/claude-opus-4-5-thinking · 🔑 oauth (google-antigravity:[email protected])

Environment

  • OpenClaw: 2026.1.30 (76b5208)
  • OS: macOS (Darwin 25.1.0, arm64)
  • Node: v25.5.0

Steps to Reproduce

  1. Configure multiple auth profiles for google-antigravity
  2. Set auth.order with profile A first
  3. Configure a model with params.authProfileId pointing to profile B
  4. Use /model <alias> to switch to that model
  5. Check /status - it shows profile A instead of profile B

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions