openclaw - 💡(How to fix) Fix Control UI model switcher prepends active provider to new model ID on provider change [1 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#49432Fetched 2026-04-08 00:55:21
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Timeline (top)
commented ×1

Error Message

The model switcher dropdown in the Control UI incorrectly constructs the model identifier when switching providers. Instead of using the selected model's fully-qualified provider/model format from the configured model list, it prepends the currently active provider to the new model's ID. So if you're on openai/gpt-4o and select Claude from the dropdown, it sends openai/claude-sonnet-4-6 to the gateway instead of anthropic/claude-sonnet-4-6, resulting in a 'model not allowed' error. Workaround is to use the command directly.

Fix Action

Fix / Workaround

The model switcher dropdown in the Control UI incorrectly constructs the model identifier when switching providers. Instead of using the selected model's fully-qualified provider/model format from the configured model list, it prepends the currently active provider to the new model's ID. So if you're on openai/gpt-4o and select Claude from the dropdown, it sends openai/claude-sonnet-4-6 to the gateway instead of anthropic/claude-sonnet-4-6, resulting in a 'model not allowed' error. Workaround is to use the command directly.

RAW_BUFFERClick to expand / collapse

The model switcher dropdown in the Control UI incorrectly constructs the model identifier when switching providers. Instead of using the selected model's fully-qualified provider/model format from the configured model list, it prepends the currently active provider to the new model's ID. So if you're on openai/gpt-4o and select Claude from the dropdown, it sends openai/claude-sonnet-4-6 to the gateway instead of anthropic/claude-sonnet-4-6, resulting in a 'model not allowed' error. Workaround is to use the command directly.

extent analysis

Fix Plan

The fix involves updating the model switcher dropdown logic to use the fully-qualified provider/model format.

  • Update the dropdown selection handler to extract the selected model's fully-qualified ID from the configured model list.
  • Use the extracted ID to construct the request to the gateway.

Example code snippet:

# Assuming 'models' is a list of dictionaries with 'provider' and 'model' keys
selected_model = models[dropdown_selected_index]
fully_qualified_id = f"{selected_model['provider']}/{selected_model['model']}"

# Use the fully_qualified_id to construct the request
request_data = {'model_id': fully_qualified_id}
  • Replace the existing logic that prepends the currently active provider to the new model's ID with the updated code.

Verification

To verify the fix, test the model switcher dropdown by selecting a different provider and model, and check that the request sent to the gateway contains the correct fully-qualified model ID.

Extra Tips

  • Ensure that the models list is correctly populated with the fully-qualified IDs for each model.
  • Consider adding logging or debugging statements to verify that the correct ID is being extracted and used in the request.

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…

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 - 💡(How to fix) Fix Control UI model switcher prepends active provider to new model ID on provider change [1 comments, 2 participants]