One endpoint, every model
Models are served as <provider>/<model>, so
ollama/qwen3:32b and openai/gpt-5 sit in
the same list and the id says where a request goes.
One OpenAI-compatible endpoint in front of several model servers
Register the model servers you use — OpenAI, OpenRouter, Ollama, llama.cpp,
vLLM, anything that speaks the OpenAI API — and group them into workspaces.
A client pointed at a workspace sees one /v1 that lists every
model its providers offer and sends each request to the right one. It is
the model-server counterpart of
mcp-router.
Models are served as <provider>/<model>, so
ollama/qwen3:32b and openai/gpt-5 sit in
the same list and the id says where a request goes.
Each workspace has its own base URL and serves the providers you switch on, all of their models or a subset you pick.
Requests are forwarded with only model rewritten, and
responses, streams included, come back unchanged. Provider keys stay
on the router and are never shown again.
With Docker:
git clone https://github.com/cubicecho/llm-router.git
cd llm-router
docker compose up --wait # http://localhost:3000, with its own Postgres
Or from source, with Node 26 or newer:
npm install
cp .env.example .env
npm run db:up # a local Postgres, in Docker
npm run dev # UI on http://localhost:3000
2.0 has no auth: anyone who can reach the port can use your providers and change them, so run it on a network you trust until #21 brings sign-in and API keys. Then:
ollama), the base URL including the version path
(http://localhost:11434/v1) and, if it needs one, an API
key.
| Base URL |
http://<host>:3000/w/<slug>/v1 for a
workspace, http://<host>:3000/v1 for every
enabled provider
|
|---|---|
| API key | any value, such as unused: the router does not check it yet |
| Model | <provider>/<model>, such as ollama/qwen3:32b |
curl http://localhost:3000/w/research/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "ollama/qwen3:32b", "messages": [{"role": "user", "content": "Hello"}]}'
from openai import OpenAI
client = OpenAI(base_url="http://localhost:3000/w/research/v1", api_key="unused")
client.chat.completions.create(model="ollama/qwen3:32b", messages=[{"role": "user", "content": "Hello"}])
Endpoints, configuration and the design decisions are in the project README: https://github.com/cubicecho/llm-router