openclaw - 💡(How to fix) Fix [Bug]: If two types of api methods are used (API_KEY + localhost LLM) UI does not allow switching over. [1 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#49992Fetched 2026-04-08 01:00:24
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

If two types of api methods are used (API_KEY + localhost LLM) UI does not allow switching over. It will only allow the type of connection used set in primary methods. example, if it was set to use openai api key, selecting any lm-studio endpoints for API call will fail.

Error Message

Error: Failed to set model: GatewayRequestError: model not allowed: openai/deepseek-v3.2-lite-q6_k

Root Cause

If two types of api methods are used (API_KEY + localhost LLM) UI does not allow switching over. It will only allow the type of connection used set in primary methods. example, if it was set to use openai api key, selecting any lm-studio endpoints for API call will fail.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

If two types of api methods are used (API_KEY + localhost LLM) UI does not allow switching over. It will only allow the type of connection used set in primary methods. example, if it was set to use openai api key, selecting any lm-studio endpoints for API call will fail.

Steps to reproduce

  1. configure openclaw.json with multiple LM and API endpoints.
  2. openclaw daemon restart
  3. connect to gateway
  4. type a prompt
  5. switch endpoints
  6. type in the same prompt session

Expected behavior

it should allow user to choose which endpoints/models to be used.

Actual behavior

Error: Failed to set model: GatewayRequestError: model not allowed: openai/deepseek-v3.2-lite-q6_k

OpenClaw version

2026.3.13-1

Operating system

Windows 11

Install method

iwr -useb https://openclaw.ai/install.ps1 | iex

Model

openai/gpt-5.1-codex and openai/deepseek-v3.2-lite-q6_k

Provider / routing chain

openclaw -> local gateway -> localhost

Config file / key location

~/.openclaw/openclaw.json

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the issue of the UI not allowing switching between API methods, we need to update the openclaw.json configuration file to properly handle multiple LM and API endpoints.

Step-by-Step Solution

  1. Edit openclaw.json: Open the openclaw.json file located at ~/.openclaw/ in a text editor.
  2. Add Endpoint Configuration: Ensure that each endpoint is configured with a unique id and type. For example:
{
  "endpoints": [
    {
      "id": "openai-api",
      "type": "api",
      "apiKey": "YOUR_OPENAI_API_KEY",
      "models": ["openai/gpt-5.1-codex"]
    },
    {
      "id": "lm-studio",
      "type": "llm",
      "url": "http://localhost:8080",
      "models": ["openai/deepseek-v3.2-lite-q6_k"]
    }
  ]
}
  1. Update Gateway Configuration: Verify that the gateway is configured to use the openclaw.json file. You can do this by checking the openclaw daemon configuration.
  2. Restart OpenClaw Daemon: Restart the openclaw daemon to apply the changes.
  3. Test Endpoint Switching: Connect to the gateway and test switching between endpoints.

Verification

To verify that the fix worked, try switching between the configured endpoints and verify that the UI allows you to choose which endpoint to use.

Extra Tips

  • Ensure that the openclaw.json file is properly formatted and valid JSON.
  • Verify that the API keys and URLs are correct for each endpoint.
  • If issues persist, check the openclaw daemon logs for errors.

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

it should allow user to choose which endpoints/models to be used.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING