openclaw - ✅(Solved) Fix [Bug]: Control UI dropdown uses wrong value for OpenRouter models [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62405Fetched 2026-04-08 03:04:47
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
commented ×2labeled ×2mentioned ×1subscribed ×1

There is a bug in the Control UI model selector for OpenRouter models. The label shown in the dropdown looks like an OpenRouter model, but the underlying option value uses the wrong model ID, missing the openrouter/ prefix. As a result, selecting the model can fail with errors like model not allowed, even though the model is allowed in config.

Error Message

Endup with error:

Root Cause

There is a bug in the Control UI model selector for OpenRouter models. The label shown in the dropdown looks like an OpenRouter model, but the underlying option value uses the wrong model ID, missing the openrouter/ prefix. As a result, selecting the model can fail with errors like model not allowed, even though the model is allowed in config.

PR fix notes

PR #63070: fix(ui): preserve OpenRouter model prefix in dropdown values

Description (problem / solution / changelog)

Summary

  • Fix the Control UI model option builder so dropdown option values keep provider-qualified model IDs for namespaced models.
  • Ensure OpenRouter entries like meta-llama/llama-3.3-70b-instruct are submitted as openrouter/meta-llama/llama-3.3-70b-instruct.

Root Cause

  • buildChatModelOption delegated to a helper that treated any slash in a model ID as already provider-qualified.
  • OpenRouter catalog IDs are often namespaced (meta-llama/...) but not provider-prefixed, so the dropdown value was emitted without openrouter/.

Changes

  • ui/src/ui/chat-model-ref.ts: build option values by prefixing provider/ unless the ID already starts with that provider prefix.
  • ui/src/ui/chat-model-ref.test.ts: add regression coverage for namespaced OpenRouter model IDs.

Test

  • pnpm test ui/src/ui/chat-model-ref.test.ts
    • 11 passed

Closes #62405

Changed files

  • ui/src/ui/chat-model-ref.test.ts (modified, +13/-0)
  • ui/src/ui/chat-model-ref.ts (modified, +5/-2)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

There is a bug in the Control UI model selector for OpenRouter models. The label shown in the dropdown looks like an OpenRouter model, but the underlying option value uses the wrong model ID, missing the openrouter/ prefix. As a result, selecting the model can fail with errors like model not allowed, even though the model is allowed in config.

Steps to reproduce

Steps to reproduce

Open Control UI
Go to a model selector for an agent/session
Select an OpenRouter model, for example: anthropic/claude-haiku-4.5 · openrouter
Save/apply the model

Actual behavior The UI uses this value:

anthropic/claude-haiku-4.5

Instead of the correct OpenRouter value:

openrouter/anthropic/claude-haiku-4.5

This appears to affect other OpenRouter models as well.

Expected behavior

Expected behavior For OpenRouter models, the dropdown should use the full provider-prefixed model ID in the value, including openrouter/.

Example

wrong: anthropic/claude-haiku-4.5
correct: openrouter/anthropic/claude-haiku-4.5

Impact

the model appears selectable in UI, but cannot be applied correctly
user gets model not allowed or similar validation errors
it only works when entering the correct full model ID manually

Notes This looks like a frontend mapping bug in the Control UI dropdown, not a provider or allowlist problem.

Actual behavior

Endup with error: Failed to set model: GatewayRequestError: model not allowed: anthropic/claude-haiku-4.5

OpenClaw version

v2026.4.5

Operating system

linux debian

Install method

npm global

Model

openrouter/anthropic/claude-haiku-4.5

Provider / routing chain

openrouter/anthropic/claude-haiku-4.5

Additional provider/model setup details

"openrouter/anthropic/claude-sonnet-4.6": { "alias": "openrouter-sonnet46" }, "openrouter/anthropic/claude-haiku-4.5": { "alias": "openrouter-haiku45" }, "openrouter/minimax/minimax-m2.5": { "alias": "openrouter-minimax" }, "openrouter/qwen/qwen3-235b-a22b-2507": { "alias": "openrouter-qwen" }, "openrouter/qwen/qwen3.6-plus:free": { "alias": "openrouter-qwen36" },

Logs, screenshots, and evidence

Impact and severity

Affected Control web UI

Additional information

<img width="484" height="287" alt="Image" src="https://github.com/user-attachments/assets/26e41c22-a884-4fb9-9be2-dc28519e756f" />

extent analysis

TL;DR

The most likely fix is to update the Control UI model selector to use the full provider-prefixed model ID, including the "openrouter/" prefix, in the dropdown option values.

Guidance

  • Verify that the issue is indeed caused by the missing "openrouter/" prefix in the model ID by checking the network requests or logs when selecting an OpenRouter model.
  • Check the frontend code responsible for populating the model selector dropdown to ensure it correctly constructs the model IDs with the "openrouter/" prefix.
  • Update the model selector code to use the correct model IDs, for example, by concatenating the "openrouter/" prefix with the model name.
  • Test the updated model selector with different OpenRouter models to ensure the issue is resolved.

Example

No specific code example can be provided without access to the actual frontend code, but the fix would involve updating the code that populates the model selector dropdown to include the "openrouter/" prefix in the option values.

Notes

The issue appears to be specific to the Control UI and OpenRouter models, so the fix should be targeted at the frontend code responsible for the model selector.

Recommendation

Apply a workaround by manually entering the correct full model ID, including the "openrouter/" prefix, until the frontend code can be updated to correctly construct the model IDs.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Expected behavior For OpenRouter models, the dropdown should use the full provider-prefixed model ID in the value, including openrouter/.

Example

wrong: anthropic/claude-haiku-4.5
correct: openrouter/anthropic/claude-haiku-4.5

Impact

the model appears selectable in UI, but cannot be applied correctly
user gets model not allowed or similar validation errors
it only works when entering the correct full model ID manually

Notes This looks like a frontend mapping bug in the Control UI dropdown, not a provider or allowlist problem.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Control UI dropdown uses wrong value for OpenRouter models [1 pull requests, 2 comments, 2 participants]