openclaw - ✅(Solved) Fix Control panel UI bug: Anthropic models incorrectly prefixed with 'ollama/' when selecting model [1 pull requests, 4 comments, 3 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#49288Fetched 2026-04-08 00:56:57
View on GitHub
Comments
4
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×4cross-referenced ×1referenced ×1

When attempting to select an Anthropic model (e.g. anthropic/claude-sonnet-4-6 or anthropic/claude-sonnet-4-5) from the web control panel model picker, the gateway returns:

Failed to set model: GatewayRequestError: model not allowed: ollama/claude-sonnet-4-6

The control panel is stripping the correct anthropic/ provider prefix from the model ID and replacing it with ollama/, resulting in an invalid model ID being sent to the gateway.

Error Message

Failed to set model: GatewayRequestError: model not allowed: ollama/claude-sonnet-4-6

Root Cause

When attempting to select an Anthropic model (e.g. anthropic/claude-sonnet-4-6 or anthropic/claude-sonnet-4-5) from the web control panel model picker, the gateway returns:

Failed to set model: GatewayRequestError: model not allowed: ollama/claude-sonnet-4-6

The control panel is stripping the correct anthropic/ provider prefix from the model ID and replacing it with ollama/, resulting in an invalid model ID being sent to the gateway.

Fix Action

Workaround

Using /model anthropic/claude-sonnet-4-6 in the TUI works correctly.

PR fix notes

PR #1: fix(ui): resolve wrong provider prefix in model picker

Description (problem / solution / changelog)

Problem

When a model (e.g., claude-sonnet-4-6) exists under multiple providers (ollama as local proxy + anthropic as real provider), the model picker in the web control panel would show the first match from the catalog, which could be the ollama proxy variant.

This caused model not allowed: ollama/claude-sonnet-4-6 errors when selecting an Anthropic model, because the gateway expected anthropic/claude-sonnet-4-6.

Root Cause

buildChatModelOptions() in ui/src/ui/app-render.helpers.ts deduplicated entries by the full provider/model value, not by model ID alone. When the catalog had both ollama/claude-sonnet-4-6 and anthropic/claude-sonnet-4-6, both would appear as separate options. Users could accidentally select the wrong provider.

Fix

  • Added resolveBestProvider() in ui/src/ui/chat-model-ref.ts that prefers real providers (anthropic, openai) over local proxies (ollama, vllm, sglang) when the same model ID appears multiple times
  • Updated buildChatModelOptions() to deduplicate by model ID and use the best provider for each entry

Testing

Tested with a config that has:

  • Ollama as default model provider
  • Anthropic as additional approved model provider
  • Same model IDs in both providers

The picker now correctly shows anthropic/claude-sonnet-4-6 instead of ollama/claude-sonnet-4-6.

Related Issue

Fixes #49288

Changed files

  • .agents/skills/parallels-discord-roundtrip/SKILL.md (added, +59/-0)
  • .github/workflows/ci.yml (modified, +90/-5)
  • .gitignore (modified, +1/-0)
  • .npmignore (modified, +1/-0)
  • AGENTS.md (modified, +5/-0)
  • CHANGELOG.md (modified, +86/-49)
  • CONTRIBUTING.md (modified, +5/-0)
  • README.md (modified, +7/-7)
  • apps/android/app/src/main/java/ai/openclaw/app/MainActivity.kt (modified, +16/-6)
  • apps/android/app/src/main/java/ai/openclaw/app/MainViewModel.kt (modified, +154/-95)
  • apps/android/app/src/main/java/ai/openclaw/app/NodeApp.kt (modified, +12/-1)
  • apps/android/app/src/main/java/ai/openclaw/app/NodeForegroundService.kt (modified, +6/-2)
  • apps/android/app/src/main/java/ai/openclaw/app/NodeRuntime.kt (modified, +4/-3)
  • apps/android/app/src/main/java/ai/openclaw/app/chat/ChatController.kt (modified, +54/-4)
  • apps/android/app/src/main/java/ai/openclaw/app/ui/chat/Base64ImageState.kt (modified, +1/-4)
  • apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatImageCodec.kt (added, +150/-0)
  • apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatMessageListCard.kt (modified, +14/-6)
  • apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatSheetContent.kt (modified, +5/-27)
  • apps/android/app/src/test/java/ai/openclaw/app/chat/ChatControllerMessageIdentityTest.kt (added, +81/-0)
  • apps/android/app/src/test/java/ai/openclaw/app/ui/chat/ChatImageCodecTest.kt (added, +18/-0)
  • apps/macos/Sources/OpenClaw/CanvasA2UIActionMessageHandler.swift (modified, +37/-0)
  • apps/macos/Sources/OpenClaw/CronModels.swift (modified, +65/-0)
  • assets/chrome-extension/README.md (removed, +0/-23)
  • assets/chrome-extension/background-utils.js (removed, +0/-64)
  • assets/chrome-extension/background.js (removed, +0/-1025)
  • assets/chrome-extension/manifest.json (removed, +0/-25)
  • assets/chrome-extension/options-validation.js (removed, +0/-57)
  • assets/chrome-extension/options.html (removed, +0/-200)
  • assets/chrome-extension/options.js (removed, +0/-74)
  • docs/.generated/config-baseline.json (modified, +2852/-32)
  • docs/.generated/config-baseline.jsonl (modified, +235/-20)
  • docs/.i18n/glossary.zh-CN.json (modified, +12/-0)
  • docs/channels/bluebubbles.md (modified, +1/-1)
  • docs/channels/feishu.md (modified, +28/-4)
  • docs/channels/matrix.md (modified, +2/-2)
  • docs/channels/mattermost.md (modified, +1/-1)
  • docs/channels/msteams.md (modified, +1/-1)
  • docs/channels/nextcloud-talk.md (modified, +2/-2)
  • docs/channels/nostr.md (modified, +10/-1)
  • docs/channels/synology-chat.md (modified, +5/-1)
  • docs/channels/telegram.md (modified, +1/-1)
  • docs/channels/whatsapp.md (modified, +1/-1)
  • docs/channels/zalo.md (modified, +3/-3)
  • docs/channels/zalouser.md (modified, +2/-2)
  • docs/cli/browser.md (modified, +12/-14)
  • docs/cli/channels.md (modified, +2/-1)
  • docs/cli/daemon.md (modified, +3/-1)
  • docs/cli/docs.md (modified, +1/-1)
  • docs/cli/doctor.md (modified, +1/-0)
  • docs/cli/gateway.md (modified, +2/-1)
  • docs/cli/index.md (modified, +9/-7)
  • docs/cli/onboard.md (modified, +5/-5)
  • docs/cli/plugins.md (modified, +31/-2)
  • docs/cli/sandbox.md (modified, +62/-17)
  • docs/cli/security.md (modified, +8/-0)
  • docs/cli/setup.md (modified, +3/-3)
  • docs/cli/status.md (modified, +1/-0)
  • docs/concepts/model-providers.md (modified, +40/-14)
  • docs/concepts/models.md (modified, +2/-2)
  • docs/design/kilo-gateway-integration.md (modified, +2/-2)
  • docs/docs.json (modified, +0/-2)
  • docs/experiments/onboarding-config-protocol.md (modified, +2/-2)
  • docs/gateway/authentication.md (modified, +1/-1)
  • docs/gateway/configuration-reference.md (modified, +96/-4)
  • docs/gateway/configuration.md (modified, +1/-1)
  • docs/gateway/doctor.md (modified, +32/-0)
  • docs/gateway/multiple-gateways.md (modified, +1/-1)
  • docs/gateway/sandboxing.md (modified, +190/-3)
  • docs/gateway/secrets.md (modified, +34/-2)
  • docs/gateway/security/index.md (modified, +3/-4)
  • docs/gateway/troubleshooting.md (modified, +2/-3)
  • docs/help/faq.md (modified, +29/-29)
  • docs/help/testing.md (modified, +24/-2)
  • docs/help/troubleshooting.md (modified, +2/-3)
  • docs/index.md (modified, +1/-1)
  • docs/install/docker.md (modified, +2/-1)
  • docs/install/index.md (modified, +1/-1)
  • docs/install/northflank.mdx (modified, +2/-2)
  • docs/install/railway.mdx (modified, +3/-3)
  • docs/install/render.mdx (modified, +1/-1)
  • docs/install/updating.md (modified, +1/-1)
  • docs/nodes/media-understanding.md (modified, +12/-5)
  • docs/platforms/raspberry-pi.md (modified, +1/-1)
  • docs/plugins/bundles.md (modified, +7/-0)
  • docs/plugins/manifest.md (modified, +46/-0)
  • docs/plugins/voice-call.md (modified, +2/-2)
  • docs/providers/anthropic.md (modified, +1/-1)
  • docs/providers/huggingface.md (modified, +1/-1)
  • docs/providers/ollama.md (modified, +4/-4)
  • docs/providers/opencode.md (modified, +1/-1)
  • docs/refactor/cluster.md (modified, +11/-11)
  • docs/refactor/firecrawl-extension.md (added, +260/-0)
  • docs/refactor/plugin-sdk.md (modified, +24/-0)
  • docs/reference/wizard.md (modified, +22/-22)
  • docs/start/getting-started.md (modified, +5/-5)
  • docs/start/hubs.md (modified, +1/-1)
  • docs/start/onboarding-overview.md (modified, +6/-6)
  • docs/start/onboarding.md (modified, +2/-2)
  • docs/start/quickstart.md (modified, +2/-2)
  • docs/start/setup.md (modified, +1/-1)

Code Example

Failed to set model: GatewayRequestError: model not allowed: ollama/claude-sonnet-4-6
RAW_BUFFERClick to expand / collapse

Bug Report

OpenClaw Version: 2026.3.13 (61d171a) OS: Linux (WSL2 - Microsoft Standard)

Description

When attempting to select an Anthropic model (e.g. anthropic/claude-sonnet-4-6 or anthropic/claude-sonnet-4-5) from the web control panel model picker, the gateway returns:

Failed to set model: GatewayRequestError: model not allowed: ollama/claude-sonnet-4-6

The control panel is stripping the correct anthropic/ provider prefix from the model ID and replacing it with ollama/, resulting in an invalid model ID being sent to the gateway.

Steps to Reproduce

  1. Setup both ollama and anthropic models
  2. Define ollama as the default models with fall back
  3. Add anthropic as additional approved models
  4. Open the OpenClaw web control panel
  5. Navigate to the model picker/selector
  6. Select any Anthropic model (e.g. anthropic/claude-sonnet-4-6)
  7. Observe the error: model not allowed: ollama/claude-sonnet-4-6## Expected Behavior The model ID sent to the gateway should be anthropic/claude-sonnet-4-6 — preserving the correct provider prefix.

Actual Behavior

The model ID sent to the gateway is ollama/claude-sonnet-4-6 — the anthropic/ prefix is replaced with ollama/.

Config Context

  • models.mode: merge
  • Ollama provider explicitly defined at models.providers.ollama
  • Anthropic provider defined at models.providers.anthropic
  • Anthropic models correctly listed in agents.defaults.models as anthropic/claude-sonnet-4-6
  • The TUI works correctly — only the web control panel exhibits this bug

Workaround

Using /model anthropic/claude-sonnet-4-6 in the TUI works correctly.

extent analysis

Fix Plan

To fix the issue, we need to update the web control panel's model picker to preserve the correct provider prefix.

Here are the steps:

  • Update the model picker code to handle the provider prefix correctly.
  • Ensure that the anthropic/ prefix is not stripped or replaced with ollama/.

Example code snippet:

# models.py
def get_model_id(model_name):
    # Assuming model_name is in the format 'anthropic/claude-sonnet-4-6'
    provider, model = model_name.split('/')
    # Return the model ID with the correct provider prefix
    return f'{provider}/{model}'

# web_control_panel.py
def handle_model_selection(model_name):
    model_id = get_model_id(model_name)
    # Send the model ID to the gateway
    gateway_request(model_id)

Verification

To verify that the fix worked:

  • Open the web control panel and navigate to the model picker.
  • Select an Anthropic model (e.g. anthropic/claude-sonnet-4-6).
  • Check that the model ID sent to the gateway is correct (e.g. anthropic/claude-sonnet-4-6).
  • Ensure that the model is selected successfully without any errors.

Extra Tips

  • Double-check the configuration files to ensure that the anthropic provider is correctly defined and listed in agents.defaults.models.
  • Test the fix with different Anthropic models to ensure that the issue is fully resolved.
  • Consider adding additional logging or debugging statements to help identify any future issues with the model picker.

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