Skip to content

[Bug]: WebChat model selector shows global default instead of agent-specific default model #77440

Description

@jwong-art

Bug Description

When an agent has its own model.primary configured, the WebChat / dashboard model selector displays the wrong model name for the default option.

The backend appears to resolve and run the correct agent-specific default model, but the UI label for default is resolved from agents.defaults.model.primary instead of the currently selected agent's effective default model.


Example Configuration

Assume the global default model is Model A:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "model-a"
      }
    },
    "list": [
      {
        "id": "agent-b",
        "model": {
          "primary": "model-b"
        }
      }
    ]
  }
}

In this setup:

  • agents.defaults.model.primary = Model A
  • agent-b.model.primary = Model B

Steps to Reproduce

  1. Configure agents.defaults.model.primary to one model, e.g. Model A.
  2. Configure a non-main agent with its own model.primary, e.g. Model B.
  3. Open WebChat / dashboard.
  4. Select or open a session for that non-main agent.
  5. Look at the model selector at the top of the chat UI.
  6. Keep or select the default model option.
  7. Send a message and inspect the actual model used by the run.

Observed Behavior

In the WebChat model selector, the default option is displayed as if it points to the global default model:

default (Model A)

However, when that default option is selected, the actual run correctly uses the agent-specific model:

Model B

So the execution behavior is correct, but the UI display is misleading.


Expected Behavior

When viewing a session for an agent that defines its own model.primary, the model selector should show the agent's effective default model:

default (Model B)

The default label should be resolved relative to the currently selected session / agent, not always relative to agents.defaults.model.primary.


Impact

This is confusing because the UI suggests that the session is using the global default model, even though the backend is correctly using the agent-specific model.

Users may incorrectly believe that:

  • the per-agent model configuration is not working;
  • selecting default will switch the agent back to the global model;
  • the session is running on a different model than it actually is.

This can lead to incorrect debugging and unnecessary configuration changes.


Environment

  • OpenClaw version: 2026.5.3-1
  • Channel/UI: WebChat / dashboard
  • Configuration pattern:
    • agents.defaults.model.primary is set to one model
    • a separate non-main agent has its own model.primary set to another model

Potential Root Cause

The WebChat model selector likely resolves the display text for the default option using only the global default model from agents.defaults.model.primary.

Instead, it should resolve the default label through the same effective model resolution path used by agent execution, taking into account:

  1. the current session's agent;
  2. that agent's own model.primary, if configured;
  3. fallback to agents.defaults.model.primary only when the agent does not override the model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions