Bug
Clicking Dashboard causes a crash with:
Something went wrong
Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bprimary%2C%20fallbacks%7D
React error #31 = "Objects are not valid as a React child" — the Dashboard tries to render {primary, fallbacks} directly as JSX text.
Cause
Since OpenClaw added support for model fallbacks, agents.defaults.model in openclaw.json can now be an object:
{
"agents": {
"defaults": {
"model": {
"primary": "openai-codex/gpt-5.4",
"fallbacks": ["openrouter/minimax/minimax-m2.7"]
}
}
}
}
The Dashboard likely renders the model value expecting a string, but receives an object. This also affects imageModel and imageGenerationModel which follow the same {primary, fallbacks} pattern.
Expected
Dashboard should display the model name (e.g. the .primary value) instead of crashing.
Suggested Fix
const modelDisplay = typeof model === "string" ? model : model?.primary ?? "unknown";
Environment
- OpenClaw config with model object format (
{primary, fallbacks})
- ClawControl (latest)
Bug
Clicking Dashboard causes a crash with:
React error #31 = "Objects are not valid as a React child" — the Dashboard tries to render
{primary, fallbacks}directly as JSX text.Cause
Since OpenClaw added support for model fallbacks,
agents.defaults.modelinopenclaw.jsoncan now be an object:{ "agents": { "defaults": { "model": { "primary": "openai-codex/gpt-5.4", "fallbacks": ["openrouter/minimax/minimax-m2.7"] } } } }The Dashboard likely renders the model value expecting a string, but receives an object. This also affects
imageModelandimageGenerationModelwhich follow the same{primary, fallbacks}pattern.Expected
Dashboard should display the model name (e.g. the
.primaryvalue) instead of crashing.Suggested Fix
Environment
{primary, fallbacks})