openclaw - 💡(How to fix) Fix Control UI: invalid config key agents.defaultId in Set Default Model [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#73544Fetched 2026-04-29 06:18:28
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
closed ×1commented ×1

Error Message

Error seen in Gateway logs:

Fix Action

Fix / Workaround

When using the Control UI's "设置默认大模型" (Agents > Set Default Model) page and attempting to save, the UI sends a config patch containing agents.defaultId as the field name. However, OpenClaw's config schema does not recognize defaultId as a valid key under the agents section.

Code Example

invalid config: agents: Unrecognized key: "defaultId"
RAW_BUFFERClick to expand / collapse

Bug Description

When using the Control UI's "设置默认大模型" (Agents > Set Default Model) page and attempting to save, the UI sends a config patch containing agents.defaultId as the field name. However, OpenClaw's config schema does not recognize defaultId as a valid key under the agents section.

Error seen in Gateway logs:

invalid config: agents: Unrecognized key: "defaultId"

Expected Behavior

The correct way to mark a default agent is via agents.list[].default: true (which is already correctly configured). The Control UI should either:

  1. Use the existing agents.list[].default mechanism, or
  2. Not send an invalid agents.defaultId field

Actual Behavior

  • The OpenClaw schema validator rejects the config update with INVALID_REQUEST
  • The actual agent configuration (main with default: true) works correctly
  • Only the Control UI save operation fails

Environment

  • OpenClaw version: 2026.4.26
  • Channel: Control UI (openclaw-control-ui)
  • Affected page: 代理 > 设置默认大模型

Suggested Fix

Update the Control UI's "Set Default Model" submit handler to use the correct schema field (agents.list[].default) instead of constructing an invalid agents.defaultId field.

extent analysis

TL;DR

Update the Control UI's submit handler to use the correct agents.list[].default schema field instead of agents.defaultId.

Guidance

  • Verify the Control UI's submit handler is constructing the agents.defaultId field and update it to use agents.list[].default as per the OpenClaw config schema.
  • Check the OpenClaw version (2026.4.26) to ensure the agents.list[].default mechanism is supported.
  • Review the Gateway logs to confirm the error message invalid config: agents: Unrecognized key: "defaultId" is resolved after applying the fix.
  • Test the "Set Default Model" page after updating the submit handler to ensure the correct configuration is sent and saved.

Example

// Before
const configPatch = { agents: { defaultId: 'main' } };

// After
const configPatch = { agents: { list: [{ id: 'main', default: true }] } };

Notes

This fix assumes the Control UI has the capability to update the submit handler and that the agents.list[].default mechanism is correctly implemented in the OpenClaw version being used.

Recommendation

Apply workaround: Update the Control UI's submit handler to use the correct agents.list[].default schema field, as this is a more targeted fix and does not require upgrading the OpenClaw version.

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: invalid config key agents.defaultId in Set Default Model [1 comments, 2 participants]