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

Error Message

Gateway receives openai/claude-sonnet-4-6, resulting in a "model not allowed" error.

Fix Action

Fix / Workaround

Workaround: Use the slash command to switch models directly instead of the dropdown.

RAW_BUFFERClick to expand / collapse

Bug Report

Description: 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.

Steps to Reproduce:

  1. Set active model to openai/gpt-4o
  2. Open the model switcher dropdown
  3. Select a model from a different provider (e.g. Claude/Anthropic)

Expected Behavior: Gateway receives anthropic/claude-sonnet-4-6

Actual Behavior: Gateway receives openai/claude-sonnet-4-6, resulting in a "model not allowed" error.

Workaround: Use the slash command to switch models directly instead of the dropdown.

Environment:

  • OpenClaw 2026.3.13

extent analysis

Fix Plan

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

Code Changes

To implement the fix, update the getModelIdentifier function in the model switcher dropdown component:

// Before
const getModelIdentifier = (model) => {
  const activeProvider = getActiveProvider();
  return `${activeProvider}/${model.id}`;
};

// After
const getModelIdentifier = (model) => {
  return model.id; // assuming model.id is in the format "provider/model"
};

Alternatively, if model.id is not in the fully-qualified format, you can update the function to:

const getModelIdentifier = (model) => {
  return `${model.provider}/${model.name}`;
};

Configuration Changes

No configuration changes are required for this fix.

Verification

To verify the fix, follow the steps to reproduce the issue and check that the gateway receives the correct model identifier in the fully-qualified provider/model format.

Extra Tips

  • Ensure that the model.id or model.provider and model.name properties are correctly populated in the model data.
  • Test the fix with different providers and models to ensure the issue is fully resolved.

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 wrong provider to model ID [1 comments, 2 participants]