Skip to content

Model failover: cooldown blocks different models on same provider (per-profile vs per-model) #44332

Description

@dgarf29

Bug

When a specific model (e.g. anthropic/claude-sonnet-4-6) hits a rate limit on Claude Max, the cooldown is applied to the auth profile (provider-level), not the specific model. This prevents automatic failover to a different model on the same provider (e.g. anthropic/claude-opus-4-6) even though that model is available and not rate-limited.

Steps to Reproduce

  1. Configure agents.defaults.model with primary anthropic/claude-sonnet-4-6 and fallback anthropic/claude-opus-4-6
  2. Use Claude Max (token auth) which has per-model rate limits
  3. Hit the Sonnet rate limit
  4. Expected: automatic failover to Opus (same provider, different model, not capped)
  5. Actual: entire Anthropic profile enters cooldown, Opus is also blocked

Workaround

Manually switching with /model anthropic/claude-opus-4-6 works because user overrides bypass cooldown logic.

Suggestion

Cooldowns should be tracked per provider + model, not just per auth profile, since providers like Anthropic (especially Claude Max) enforce rate limits per model, not per account.

Environment

  • OpenClaw 2026.3.8
  • Auth: Claude Max token (single profile)
  • macOS, local gateway

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions