Skip to content

Fallback not triggered for ZenMux 'subscription quota limit' errors #11164

@JoKer1257

Description

@JoKer1257

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions