mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-01 10:43:36 +00:00
When a session's model comes from steering/fallback runtime fields (entry.modelProvider/entry.model) rather than explicit override fields, switching back to the default model via /model default would not set liveModelSwitchPending. The isDefault branch in applyModelOverrideToSessionEntry only sets selectionUpdated when it deletes override fields — but when no override fields exist, selectionUpdated stays false, preventing the liveModelSwitchPending flag from being set at the gate condition. Fix: after the runtime alignment check, set selectionUpdated when selection.isDefault and runtime fields are misaligned, so that liveModelSwitchPending is properly set for the pending live switch. Adds test coverage for this previously untested scenario. Related to #96269 Co-authored-by: Claude <noreply@anthropic.com>