fix: short-circuit live model switch fallback redirects (#72375)

This commit is contained in:
Vincent Koc
2026-04-26 14:45:02 -07:00
committed by GitHub
parent fa85e6c26e
commit 43a003b8a0
3 changed files with 40 additions and 13 deletions

View File

@@ -265,6 +265,7 @@ That means fallback retries have to coordinate with live model switching:
- System-driven model changes such as fallback rotation, heartbeat overrides, or compaction never mark a pending live switch on their own.
- Before a fallback retry starts, the reply runner persists the selected fallback override fields to the session entry.
- Live-session reconciliation prefers persisted session overrides over stale runtime model fields.
- If a live-switch error points at a later candidate in the active fallback chain, OpenClaw jumps directly to that selected model instead of walking unrelated candidates first.
- If the fallback attempt fails, the runner rolls back only the override fields it wrote, and only if they still match that failed candidate.
This prevents the classic race: