Multi-account token pooling (packages/proxy) — transparently pool multiple Anthropic API keys / Claude Max OAT tokens and select the best available one per request.
- Auto-detect incoming tokens: tokens sent by Claude Code, Cursor, or any client via
Authorization: Bearerare registered in the pool automatically (priority 10). Zero config change required for single-account users. - Explicit config accounts: add additional tokens under
providers.anthropic.accounts[]in~/.relayplane/config.json(priority 0 by default = tried first). Perfect for users with 2+ Claude Max subscriptions. - Smart selection: pool skips rate-limited tokens and proactively throttles at 90% of the known upstream RPM limit. Ties broken by fewest requests this minute.
- Transparent 429 retry: if the selected token receives a 429, the proxy immediately retries with the next available token. Accurate
retry-afteris returned to the client only when all tokens are exhausted. - Learn from headers:
anthropic-ratelimit-requests-limit,anthropic-ratelimit-requests-remaining, andretry-afterheaders are observed on every response to keep per-token rate-limit state fresh. - Status endpoint:
GET /v1/token-pool/statusreturns per-account label, priority, requests-this-minute, known RPM limit, and rate-limit expiry. - Dashboard widget: new "Token Pool" collapsible section in the embedded dashboard shows live per-token status and a utilisation bar.
{
"providers": {
"anthropic": {
"accounts": [
{ "label": "newmax", "apiKey": "sk-ant-oat01-...", "priority": 0 },
{ "label": "default", "apiKey": "sk-ant-oat01-...", "priority": 1 }
]
}
}
}Backward compatible: single-token users (env var ANTHROPIC_API_KEY or incoming auth passthrough) see no behaviour change.
See git log for prior release notes.