#5858th of 74 in Gateways and observability
llmrouter
Python library for training and running routers that pick an LLM per query
- Stars
- 3.1k
- License
- MIT
- Last commit
- Nov 2026
- Language
- Python
1,721 on 26 Apr 20263,094 on 22 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
LLMRouter is a Python library and CLI for training, evaluating and running routers that choose which LLM answers each query, based on cost and expected quality. It ships 16+ routers (KNN, SVM, MLP, matrix factorization, Elo, graph-based, personalized, multi-round), a data pipeline over 11 benchmarks, a Gradio chat UI, and an OpenAI-compatible server for OpenClaw.
Who it is for: Engineers researching or deploying learned LLM routing to cut inference cost
Strengths
- 16+ router implementations behind one llmrouter CLI for training, inference and chat
- Data pipeline builds routing training data from 11 benchmarks, plus multimodal tasks
- Works with OpenAI-compatible endpoints, including Ollama, vLLM and SGLang on localhost
- Custom routers can be added through a plugin workflow; installable from PyPI
Weaknesses
- Learned routers need a data generation run that calls paid or rate-limited model APIs
- No Docker or compose files; install is pip or conda only
- Router-R1 support needs a GPU and pins vllm 0.6.3 with torch 2.4.0
- No tagged GitHub release; versions are tracked on PyPI only
What it needs
- GPU optional
- Needs Python 3.10, LLM provider API keys (NVIDIA, OpenAI, Anthropic) or a local OpenAI-compatible server
- Models: OpenAI-compatible APIs, NVIDIA endpoints, OpenAI, Anthropic, Ollama
Known problems
Reported, then fixed by a linked change
- [Bug] Router fails silently when no suitable model found ↗ (opens in a new tab)0 reactions · closed 30 Sept 2026Fixed by fix: surface silent routing fallbacks with warning logs ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Gateways and observability
See all 74| Rank | Project | Score |
|---|---|---|
| #56 | orcarouter-liteLLM router that tracks and caps coding-agent spend, with a menu-bar app | 52 out of 100 |
| #57 | metorialMCP gateway with SSO, per-user OAuth, permissions and audit logs for agents | 51 out of 100 |
| #59 | orcareplayRecord coding-agent runs and replay or fork them offline onto other models | 51 out of 100 |
| #60 | gptcachePython semantic cache for LLM responses using embeddings and vector search | 50 out of 100 |
| #61 | paritok-4b-v1Compression proxy that shrinks coding-agent prompts before they reach the LLM API | 50 out of 100 |