mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 13:41:24 +00:00
When a prompt submission fails with quota or rate limit errors, throw FailoverError instead of the raw promptError. This enables the model fallback system to try alternative models. Previously, rate limit errors during the prompt phase (before streaming) were thrown directly, bypassing fallback. Only response-phase errors triggered model fallback. Now checks if fallback models are configured and the error is failover- eligible. If so, wraps in FailoverError to trigger the fallback chain.