
I built a self-hosted LLM proxy that supports 12 providers (Claude, GPT-4o, Gemini, Ollama...)
Every time a new LLM comes out, someone on your team adds a new SDK, a new API key in .env, and a new set of error handling logic. Repeat for OpenAI, Anthropic, Gemini, Groq, Mistral, Ollama... I got tired of this. So I built llm-gateway . What it does llm-gateway is a single Go binary that sits between your app and every LLM provider. Your code sends one request format (OpenAI-compatible), and the gateway routes it to the right provider based on the model name. # One endpoint for all providers curl http://localhost:8080/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model": "claude-sonnet-4-20250514", "messages": [{"role": "user", "content": "hello"}]}' # Switch provider by changing the model name — zero code changes curl http://localhost:8080/v1/chat/completions \ -d '{"model": "gpt-4o", "messages": [...]}' # Local model — no API key needed curl http://localhost:8080/v1/chat/completions \ -d '{"model": "llama3.2", "messages": [...]}' Model routing is automatic: cla
Continue reading on Dev.to
Opens in a new tab



