One model alias. Multiple providers.
A small Go proxy for routing LLM requests, translating wire formats, and failing over when a provider cannot serve them. No control plane. No database server.
Point your client at http://127.0.0.1:8787/api/v1. Keep the same OpenRouter
model names and request format; the router picks an upstream and maps the model ID.
Up and running
go build -o llm-router ./cmd/llm-router
export OPENROUTER_API_KEY=sk-or-...
./llm-router -check
./llm-routerRequires Go 1.26 or newer. Run from the repository root to use the included
router.yaml. The default listener is loopback-only; configure a gateway key
before exposing it to a network.
How requests flow
- Your client sends a request using a configured model alias.
- The router chooses an eligible upstream and rewrites the model ID.
- If that upstream fails before the response starts, the router tries another target.
- The response streams back in the client’s wire format.
Read why llm-router for the tradeoffs, or design notes for the routing invariants.