Description
When using ZenMux as a provider, the model fallback mechanism does not trigger when hitting subscription quota limits. The error message returned by ZenMux is:
403 You have reached your subscription quota limit. Please wait for automatic quota refresh in the rolling time window, upgrade to a higher plan, or use a Pay-As-You-Go API Key for unlimited access.
Expected Behavior
This error should be classified as a rate_limit failover reason and trigger fallback to the next configured model.
Current Behavior
The error is not recognized by classifyFailoverReason() and no fallback occurs. The request fails with FailoverError.
Root Cause
In ERROR_PATTERNS.rateLimit (src/agents/pi-embedded-helpers/format-error.ts), the patterns only include:
quota exceeded
resource_exhausted
usage limit
But ZenMux uses quota limit and subscription quota, which do not match any pattern.
Suggested Fix
Add the following patterns to ERROR_PATTERNS.rateLimit:
"quota limit",
"subscription quota",
Environment
- OpenClaw version: 2026.2.3-1 (also verified in 2026.2.6)
- Provider: ZenMux
- OS: macOS
Description
When using ZenMux as a provider, the model fallback mechanism does not trigger when hitting subscription quota limits. The error message returned by ZenMux is:
Expected Behavior
This error should be classified as a
rate_limitfailover reason and trigger fallback to the next configured model.Current Behavior
The error is not recognized by
classifyFailoverReason()and no fallback occurs. The request fails withFailoverError.Root Cause
In
ERROR_PATTERNS.rateLimit(src/agents/pi-embedded-helpers/format-error.ts), the patterns only include:quota exceededresource_exhaustedusage limitBut ZenMux uses
quota limitandsubscription quota, which do not match any pattern.Suggested Fix
Add the following patterns to
ERROR_PATTERNS.rateLimit:Environment