Skip to content

[Bug]: Control UI Model Picker Sends Wrong Provider Prefix for All Models #51608

@wang8673152

Description

@wang8673152

Bug type

Regression (worked before, now fails)

Summary

When using the Control UI model picker to switch models, all model switch requests are incorrectly routed to the primary provider instead of the correct provider for each model. This causes model not allowed errors for any model that does not belong to the primary provider. The /model slash command works correctly.

Steps to reproduce

  1. Configure at least two providers via models.providers (e.g., minimax-cn as primary, and custom-dashscope-aliyuncs-com as secondary for Bailian/Qwen)
  2. Set agents.defaults.model.primary to the primary provider (e.g., minimax-cn/MiniMax-M2.7)
  3. Add the secondary model to agents.defaults.models with an alias (e.g., custom-dashscope-aliyuncs-com/qwen3.5-flash with alias bailian)
  4. Open Control UI and use the model picker to select bailian
  5. Observe the request is sent as minimax-cn/bailian, resulting in errorMessage=model not allowed: minimax-cn/bailian

Expected behavior

Selecting bailian (which maps to custom-dashscope-aliyuncs-com/qwen3.5-flash) should route the request to custom-dashscope-aliyuncs-com

Actual behavior

The request is sent to minimax-cn/bailian, which fails validation since bailian does not exist under minimax-cn

Image

OpenClaw version

2026.3.13

Operating system

docker

Install method

No response

Model

all model

Provider / routing chain

all

Additional provider/model setup details

No response

Logs, screenshots, and evidence

# Switching to "flash" (google/gemini-3-flash-preview) via Control UI:
errorMessage=model not allowed: minimax-cn/gemini-3-flash-preview

# Switching to "bailian" (custom-dashscope-aliyuncs-com/qwen3.5-flash) via Control UI:
errorMessage=model not allowed: minimax-cn/qwen3.5-flash

# Switching to google/MiniMax-M2.7 via Control UI:
errorMessage=model not allowed: google/MiniMax-M2.7

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    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