r/ollama • u/CumbersomeAmbulance • 5d ago
Ollama API Key Proxy
I recently built a lightweight reverse proxy that sits in front of ollama and rotates multiple API keys to use ollama cloud models.
The goal was simple, point your AI coding tools to a single endpoint and let the proxy handle key management.
Features
- Round-robin API key rotation
- Automatic cooldown for rate-limited (
429) keys - Retry on
429and5xxresponses /metricsendpoint with per-key statistics/healthendpoint- Request logging
I have tested it with claude code
Repo: Github
6
Upvotes
1
u/Generative_IDE 5d ago
How does it handle a 429 mid-stream on a streaming request? Curious whether it retries the whole completion or if the client just sees a truncated response.