ResilientModel wraps any model with automatic key rotation and provider failover. It handles rate limits (429) transparently.
Key Rotation
Distribute load across multiple API keys:Provider Failover
Fall back to alternative providers when one fails:Key Pool Options
List[str]
required
API keys to rotate between.
str
default:"round_robin"
Selection strategy:
round_robin or lru (least recently used).float
default:"60.0"
Base cooldown time for rate-limited keys.