|
|
|
Show HN: key-carousel - Key rotation for LLM agents
(github.com)
|
|
5 points
by EmptyDrum
108 days ago
|
|
I think in-process key management is the right abstraction for multi-key LLM setups. Not LiteLLM, not a Redis queue, not a custom load balancer. The failure modes are well-understood: a key gets rate-limited, you wait, you try the next one. Billing errors need a longer cooldown than rate limits. This is not a distributed systems problem — it's a state machine that fits in a library.
The problem is everyone keeps solving it with infrastructure instead. Spin up LiteLLM, now you have a Python service to maintain. Reach for Redis, now you have a database for a problem that doesn't need one.
key-carousel manages a pool of API key profiles with exponential-backoff cooldowns: 1min → 5min → 25min → 1hr for rate limits, 5hr → 24hr for billing. Falls back to OpenAI or Gemini when Anthropic keys are exhausted. Optional file persistence. Zero dependencies. |
|