Skip to content

v3.2.0

Choose a tag to compare

@vitobotta vitobotta released this 05 Oct 19:56
· 1 commit to main since this release
e92ff70

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, and api_keys: wins when both are set. Per-key pause state is in-memory and resets on restart.

Code organisation

  • New lib/key_rotator.rb owns per-provider key ordering, cooldown, and exhaustion state. config/config.yaml.example and AGENTS.md document headers: and api_keys:.