Bug Description
When agents.defaults.model.primary is set to a model (e.g., minimax/MiniMax-M3) but the current session is actually running a different model (due to prior fallback, steering, or manual override), executing /model <default-model> silently fails — the model does not switch and no error is shown.
Root Cause
In applyModelOverrideToSessionEntry (dist/model-overrides-D5WaLvcp.js):
if (selection.isDefault) {
// Clears overrides because "we're already on the default"
delete entry.providerOverride;
delete entry.modelOverride;
}
The isDefault flag is evaluated against the configured default model (agents.defaults.model.primary), NOT against the currently running model. When the default model differs from the currently-active model, selecting the default via /model clears the override instead of forcing a switch.
Steps to Reproduce
- Configure
agents.defaults.model.primary: "minimax/MiniMax-M3"
- Have the session running on a different model (e.g.,
tencent-token-plan/glm-5.1) — due to prior /model switch, fallback, or routing
- Execute
/model minimax/MiniMax-M3
- Observe:
/status still shows old model, no switch occurred
- Check session store:
modelOverride and providerOverride are absent (cleared by isDefault=true path)
Expected Behavior
When switching to the default model via /model, the override should still be written if the currently running model differs from the target. The isDefault check should compare against the current model (or the override should always be set when explicitly requested).
Impact
- Users cannot switch back to their configured default model after switching away
- Silent failure — no error message or feedback
- Workaround: switch to a third model first, then switch to the target (which escapes the
isDefault trap)
Environment
- OpenClaw version: 2026.6.9 (c645ec4)
- OS: macOS 25.3.0 (arm64)
- Channel: webchat
Bug Description
When
agents.defaults.model.primaryis set to a model (e.g.,minimax/MiniMax-M3) but the current session is actually running a different model (due to prior fallback, steering, or manual override), executing/model <default-model>silently fails — the model does not switch and no error is shown.Root Cause
In
applyModelOverrideToSessionEntry(dist/model-overrides-D5WaLvcp.js):The
isDefaultflag is evaluated against the configured default model (agents.defaults.model.primary), NOT against the currently running model. When the default model differs from the currently-active model, selecting the default via/modelclears the override instead of forcing a switch.Steps to Reproduce
agents.defaults.model.primary: "minimax/MiniMax-M3"tencent-token-plan/glm-5.1) — due to prior/modelswitch, fallback, or routing/model minimax/MiniMax-M3/statusstill shows old model, no switch occurredmodelOverrideandproviderOverrideare absent (cleared byisDefault=truepath)Expected Behavior
When switching to the default model via
/model, the override should still be written if the currently running model differs from the target. TheisDefaultcheck should compare against the current model (or the override should always be set when explicitly requested).Impact
isDefaulttrap)Environment