Bug type
Regression (worked before, now fails)
Summary
Selecting a non-default provider model from the webchat UI model dropdown fails with (with a default provider of anthropic) GatewayRequestError: model not allowed: anthropic/<model-id>. The UI appears to strip the provider prefix from the model ID (e.g. openai-codex/gpt-5.4 becomes gpt-5.4) before sending it to the gateway. The gateway then incorrectly prepends the default provider (anthropic/), producing an invalid ID.
Config excerpt (sanitized):
"agents": {
"defaults": {
"model": { "primary": "anthropic/claude-sonnet-4-6" },
"models": {
"openai-codex/gpt-5.4": {},
"openrouter/xiaomi/mimo-v2-omni": {}
}
}
}
Steps to reproduce
- Configure a non-Anthropic model in
agents.defaults.models, e.g. openai-codex/gpt-5.4
- Open webchat UI
- Click the model dropdown
- Select the non-Anthropic model (shows correctly as
gpt-5.4 · openai-codex)
- Error:
Failed to set model: GatewayRequestError: model not allowed: anthropic/gpt-5.4
Expected behavior
Gateway receives openai-codex/gpt-5.4
Actual behavior
Gateway receives anthropic/gpt-5.4
OpenClaw version
2026.3.13
Operating system
macOS 26.4
Install method
npm global
Model
gpt-5.4
Provider / routing chain
openai-codex
Additional provider/model setup details
Default provider is anthropic in my case
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Note: Anthropic models work fine because stripping anthropic/ and re-prepending it is a no-op. The bug only surfaces for models on other providers.
Bug type
Regression (worked before, now fails)
Summary
Selecting a non-default provider model from the webchat UI model dropdown fails with (with a default provider of anthropic)
GatewayRequestError: model not allowed: anthropic/<model-id>. The UI appears to strip the provider prefix from the model ID (e.g.openai-codex/gpt-5.4becomesgpt-5.4) before sending it to the gateway. The gateway then incorrectly prepends the default provider (anthropic/), producing an invalid ID.Config excerpt (sanitized):
Steps to reproduce
agents.defaults.models, e.g.openai-codex/gpt-5.4gpt-5.4 · openai-codex)Failed to set model: GatewayRequestError: model not allowed: anthropic/gpt-5.4Expected behavior
Gateway receives
openai-codex/gpt-5.4Actual behavior
Gateway receives
anthropic/gpt-5.4OpenClaw version
2026.3.13
Operating system
macOS 26.4
Install method
npm global
Model
gpt-5.4
Provider / routing chain
openai-codex
Additional provider/model setup details
Default provider is anthropic in my case
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Note: Anthropic models work fine because stripping
anthropic/and re-prepending it is a no-op. The bug only surfaces for models on other providers.