Skip to content

Control UI: model selector sends wrong provider prefix for cross-provider models #46453

@erkcet

Description

@erkcet

Bug

When selecting a model from the Control UI chat model dropdown, models that belong to one provider (e.g. anthropic/claude-haiku-4-5) are sent with the wrong provider prefix (e.g. openrouter/claude-haiku-4-5), resulting in:

Failed to set model: GatewayRequestError: model not allowed: openrouter/claude-haiku-4-5

Steps to Reproduce

  1. Open Control UI chat (/chat)
  2. Open model selector dropdown
  3. Select claude-haiku-4-5 (which is registered as anthropic/claude-haiku-4-5 in config with alias haiku)
  4. Error: model not allowed: openrouter/claude-haiku-4-5

Expected Behavior

The model selector should send the full qualified model ID including the correct provider prefix (anthropic/claude-haiku-4-5), or resolve the alias (haiku) before sending to sessions.patch.

Root Cause

The Control UI dropdown appears to strip the provider from the model catalog entry and then the gateway's resolveModelRefFromString falls back to the default provider (in this case openrouter) when constructing the full model key, since the bare model name claude-haiku-4-5 doesn't match any registered alias.

Workaround

Using /model haiku (the alias) from chat works correctly. The dropdown is the issue.

Environment

  • OpenClaw version: 2026.3.13
  • Config: agents.defaults.models has anthropic/claude-haiku-4-5 with alias haiku
  • Default provider resolves to openrouter (first configured provider)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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