[Feature Request] Native "LiteLLM-style" Key Management: Multi-Key Pooling & Automatic Failover #400
ThomasOnTraining
started this conversation in
Ideas
Replies: 1 comment
|
This is a good feature idea. The maintainer tradeoff here is that native key-pooling/failover sounds great from a resilience perspective, but it also adds a lot of complexity around:
So I do think it is valuable, but I would probably frame it as a staged feature instead of one big jump:
If someone picks this up, a minimal first version with:
would already be useful without overcomplicating the config too early. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Concept Overview
To make OpenClaude the most resilient open-source coding agent, I suggest implementing a native Key Management & Load Balancing system inspired by LiteLLM.
The goal is to allow users to define a "Pool" of API keys for the same provider/model. If one key hits a Rate Limit (429) or a Provider Error (5xx), OpenClaude should automatically switch to the next available key without interrupting the agent's current task or losing conversation context.
Why this is a game-changer?
Proposed Architecture
Instead of a single
stringfor API keys, the configuration could support anObjectorArray:{ "provider": "openrouter", "model": "anthropic/claude-3.5-sonnet", "key_pool": { "strategy": "round-robin", // Options: round-robin, random, priority "keys": [ "sk-or-v1-key_01...", "sk-or-v1-key_02...", "sk-or-v1-key_10..." ], "retry_on_429": true, "cooldown_time": 60 // Seconds to wait before retrying a failed key } }All reactions