You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Support multiple API keys/credentials with round-robin rotation per provider #29085
Users managing multiple API keys for high availability, team-level key distribution, or gradual key rotation must use external tools, or custom rotation proxies. This adds unnecessary complexity and latency.
Proposed Solution
Allow apiKey (and auth-dir/auth files) to accept an array of credentials with built-in round-robin rotation and automatic failover.
Round-robin distribution: Requests are distributed across credentials in sequence (key1 → key2 → key3 → key1 → ...), spreading load evenly for high availability.
Automatic failover: When a credential returns 429/5xx, automatically retry with the next credential before failing the request.
Session affinity (optional): Option to pin a session to one credential to avoid inconsistent responses.
Cooldown: Temporarily skip credentials that have been rate-limited recently.
Use Cases
High availability: Redundant API keys so a single key revocation doesn't break workflows.
Team key management: Distribute requests across multiple team or department keys with separate billing.
Gradual key rotation: Roll over API keys without downtime by adding the new key first, then removing the old one.
Regional distribution: Use region-specific keys for better latency in multi-region deployments.
Related: #16038 (fallback only, does not cover round-robin or auth file arrays)
Please review these issues and consider whether your request adds enough differentiation (e.g., the round-robin rotation and auth file array specifics) to warrant a separate issue, or if it should be discussed in one of the existing threads.
Activity
github-actions commentedon May 24, 2026
This issue might be a duplicate of existing issues. Please check:
Please review these issues and consider whether your request adds enough differentiation (e.g., the round-robin rotation and auth file array specifics) to warrant a separate issue, or if it should be discussed in one of the existing threads.
github-actions commentedon Jul 24, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.