Repository navigation
v3.2.0
What's New
-
Custom per-provider request headers. A
headers:mapping on a provider — or on a model's provider entry — is merged into every upstream request to that provider; model-level entries override provider-level ones. Auth and host headers (authorization,host,x-api-key,api-key) are stripped, so a misconfigured header can't override the auth strategy. -
Multiple API keys per provider.
api_keys:takes an ordered list of keys so a single provider entry can drive several subscriptions without duplicating the provider. Each request starts on the first key in order and advances to the next only when the current key hits its rate limit — the same fallback behaviour as providers. A rate-limited key is paused until its reset and skipped; the request falls through to the next provider only once every key is exhausted.api_key:stays the single-key shorthand, andapi_keys:wins when both are set. Per-key pause state is in-memory and resets on restart.
Code organisation
- New
lib/key_rotator.rbowns per-provider key ordering, cooldown, and exhaustion state.config/config.yaml.exampleand AGENTS.md documentheaders:andapi_keys:.