openclaw - 💡(How to fix) Fix MLX routing fails: model_not_found + fallback despite direct MLX API success [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#63463Fetched 2026-04-09 07:53:27
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants
RAW_BUFFERClick to expand / collapse

MLX provider model routing fails in OpenClaw (falls back to OpenAI) even though direct MLX API works.

Environment:

Config:

  • models.providers.mlx.baseUrl = http://127.0.0.1:8080
  • models.providers.mlx.models[].id = mlx-community/Qwen3-30B-A3B-6bit
  • agent primary tested: mlx/mlx-community/Qwen3-30B-A3B-6bit and alias QWEN_MLX

Expected:

  • OpenClaw uses MLX model for assistant responses.

Actual:

  • OpenClaw logs show model_not_found on MLX candidate then fallback to GPT-5.3.
  • Examples:
    • reason=model_not_found
    • requested=mlx/mlx-community/Qwen3-30B-A3B-6bit
    • Model "mlx/mlx-community/Qwen3-30B-A3B-6bit" not found. Fell back to "openai/gpt-5.3-codex".
    • FailoverError: HTTP 404: Not Found

Direct MLX works: curl -s http://127.0.0.1:8080/v1/models | jq -r '.data[]?.id'

includes mlx-community/Qwen3-30B-A3B-6bit

curl -s http://127.0.0.1:8080/v1/chat/completions
-H "Content-Type: application/json"
-d '{ "model":"mlx-community/Qwen3-30B-A3B-6bit", "messages":[{"role":"user","content":"say ok"}], "max_tokens":8 }'

returns valid completion JSON

Likely issue:

  • provider/model normalization mismatch in MLX adapter path (mlx/<id> vs <id>) or lane-specific resolver inconsistency.

extent analysis

TL;DR

Verify the MLX model ID formatting in the OpenClaw configuration to ensure consistency with the direct MLX API calls.

Guidance

  • Check the models.providers.mlx.models[].id configuration value to ensure it matches the format expected by the MLX API, which seems to use mlx-community/Qwen3-30B-A3B-6bit directly.
  • Compare the model ID used in the curl tests with the one configured in OpenClaw to identify any discrepancies.
  • Test the MLX API with the model ID formatted as mlx/mlx-community/Qwen3-30B-A3B-6bit to see if it returns a valid response, indicating a potential normalization issue.
  • Review the OpenClaw logs for any hints about model ID normalization or resolution errors that might point to a specific fix.

Example

No explicit code example is provided due to the lack of specific code details in the issue, but ensuring the model ID is correctly formatted in the OpenClaw configuration (e.g., mlx-community/Qwen3-30B-A3B-6bit vs mlx/mlx-community/Qwen3-30B-A3B-6bit) is crucial.

Notes

The exact fix depends on how OpenClaw normalizes or expects model IDs to be formatted. The provided curl tests indicate that the direct MLX API call works with the model ID mlx-community/Qwen3-30B-A3B-6bit, suggesting a potential mismatch in how OpenClaw resolves or formats model IDs.

Recommendation

Apply a workaround by adjusting the models.providers.mlx.models[].id configuration to match the format that works with direct MLX API calls, which is likely mlx-community/Qwen3-30B-A3B-6bit, to test if this resolves the model not found issue.

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