-
-
Notifications
You must be signed in to change notification settings - Fork 69.7k
[Bug]: fix(failover): Add "abort" to timeout error patterns for fallback triggering #18453
Description
Summary
The GLM API returns "Unhandled stop reason: abort" when a stream is interrupted, but OpenClaw's failover mechanism does not recognize "abort" as a timeout error. This prevents fallback models from being triggered.
Steps to reproduce
- Configure GLM-5 as primary model with fallback models
- When GLM API returns "Unhandled stop reason: abort" (stream interrupted)
- Expected: Fallback to next model
- Actual: Error is passed through to user, no fallback triggered
Expected behavior
When the LLM returns "Unhandled stop reason: abort", it should be recognized as a timeout error and trigger fallback to the next configured model.
Actual behavior
The abort error is passed directly to the user without attempting fallback. The isFailoverErrorMessage() check fails because "abort" doesn't match any timeout pattern.
OpenClaw version
2026.2.12
Operating system
model: GLM-5 (zhipuai) • Node: v22.22.0 • OS: Linux
Install method
No response
Logs, screenshots, and evidence
Patched pi-embedded-helpers-DP9eeE_7.js locally and confirmed fallback now works correctly.Impact and severity
In pi-embedded-helpers-DP9eeE_7.js, ERROR_PATTERNS.timeout does not include "abort":
timeout: [
"timeout",
"timed out",
"deadline exceeded",
"context deadline exceeded"
]
Additional information
Add "abort" and "stop reason: abort" to the timeout patterns:
timeout: [
"timeout",
"timed out",
"deadline exceeded",
"context deadline exceeded",
"abort",
"stop reason: abort"
]