openclaw - 💡(How to fix) Fix agents.list[].model.primary per-agent override is honored by CLI but ignored by runtime LLM router [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#81297Fetched 2026-05-14 03:33:34
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
3
Author
Timeline (top)
labeled ×2closed ×1commented ×1

The per-agent override agents.list[<id>].model.primary is displayed correctly by openclaw agents list, but the runtime LLM router uses agents.defaults.model.primary instead. The per-agent value is silently ignored. No model_fallback_decision log entry is produced, so the discrepancy is invisible from the logs.

Root Cause

Setting agents.defaults.model.primary to the desired model is the only way to get the intended runtime model. Every other agent then needs an explicit agents.list[<id>].model.primary pinning the model that agent should keep, because relying on the defaults-inherits-to-each-agent semantic is no longer safe — the per-agent override is effectively write-only documentation otherwise.

Fix Action

Fix / Workaround

Workaround

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

The per-agent override agents.list[<id>].model.primary is displayed correctly by openclaw agents list, but the runtime LLM router uses agents.defaults.model.primary instead. The per-agent value is silently ignored. No model_fallback_decision log entry is produced, so the discrepancy is invisible from the logs.

Steps to reproduce

Configure openclaw.json with a defaults model and a per-agent override that points to a different provider/model:

agents.defaults.model.primary  = "deepseek/deepseek-v4-pro"
agents.list[test-assistant].model.primary = "qwen/qwen3.6-plus"

The qwen provider is fully configured: defined under models.providers, the model id is present in providers.qwen.models[], and the API key is set both in models.json and as an api_key profile in auth-profiles.json. A direct curl against the qwen endpoint with that key and that model id returns 200 with the expected content, so the credential and model id are both valid at the upstream endpoint.

Invoke the agent through any path that goes through the gateway runtime, for example a WeCom message or openclaw agent --agent test-assistant --message "...". Then ask the agent which model it is running on, and/or check the gateway logs for fallback decisions.

Expected behavior

The runtime LLM call is routed to qwen/qwen3.6-plus. If qwen fails for any reason, a model_fallback_decision entry is logged, and the router falls back to defaults.

Actual behavior

The LLM call is routed to deepseek/deepseek-v4-pro (the defaults value). No fallback decision is ever logged, indicating the router does not even attempt qwen/qwen3.6-plus. The agent self-reports its current model as deepseek/deepseek-v4-pro and explicitly notes the mismatch with the configured default.

The two CLI surfaces disagree about which model is active. openclaw agents list shows:

- test-assistant
  Model: qwen/qwen3.6-plus

openclaw models status --agent test-assistant shows:

Default: deepseek/deepseek-v4-pro

Runtime behavior sides with the latter.

OpenClaw version

2026.4.14 (323493f)

Operating system

Ubuntu 24.04 LTS, kernel 6.8.0

Install method

No response

Model

qwen/qwen3.6-plus (per-agent override) vs deepseek/deepseek-v4-pro (defaults)

Provider / routing chain

Expected: qwen → fallback deepseek. Observed: runtime goes directly to deepseek without ever attempting qwen (no model_fallback_decision log).

Additional provider/model setup details

Workaround

Setting agents.defaults.model.primary to the desired model is the only way to get the intended runtime model. Every other agent then needs an explicit agents.list[<id>].model.primary pinning the model that agent should keep, because relying on the defaults-inherits-to-each-agent semantic is no longer safe — the per-agent override is effectively write-only documentation otherwise.

Suspected area

openclaw models status reads agents.defaults.model.primary for the "Default" field even when given --agent <id>. The runtime LLM resolver probably uses the same code path and never consults agents.list[<id>].model. The fix likely lives in the model-resolution function that takes an agentId, ensuring it checks the per-agent entry before falling back to defaults.

Sandbox: Docker, mode=all, scope=agent. Node v22.22.1.

Logs, screenshots, and evidence

Impact and severity

Multi-agent deployments where different agents are expected to use different providers/models cannot rely on the per-agent override. Anyone reading the configuration will reasonably assume per-agent overrides win, which leads to silent model misrouting in production.

Additional information

No response

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

The runtime LLM call is routed to qwen/qwen3.6-plus. If qwen fails for any reason, a model_fallback_decision entry is logged, and the router falls back to defaults.

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 agents.list[].model.primary per-agent override is honored by CLI but ignored by runtime LLM router [1 comments, 2 participants]