← all repositories
ulab-uiuc/LLMRouter

A model switchboard with 17 routing strategies

It matches each prompt to the cheapest capable LLM so you stop paying flagship-model rates for simple queries.

LLMRouter
Not currently ranked — collecting fresh signals.
star history

What it does

LLMRouter is a Python framework that sits between incoming prompts and a pool of candidate LLMs. It trains and deploys routing strategies—from classical ML like KNN and SVM to graph neural networks and Elo ratings—to map task complexity to model capability automatically. The library also includes a full pipeline for generating training data from 11 benchmark datasets and evaluating router performance.

The interesting bit

The breadth is almost comical: it ships 17 router implementations across single-round, multi-round, agentic, and personalized categories, yet also wraps everything into an OpenAI-compatible API server via OpenClaw integration. That means you can deploy it in front of Slack or Discord bots, add retrieval-augmented routing memory, and even route multimodal prompts across image, audio, and video inputs.

Key highlights

  • 17 router algorithms including mlprouter, graphrouter, elorouter, and GNN-based personalized routers
  • Built-in data generation pipeline that auto-evaluates 11 benchmark datasets to produce training material
  • OpenAI-compatible server mode through OpenClaw, with Slack/Discord hooks, streaming, and multimodal routing
  • Visual workflow interfaces via both Gradio and ComfyUI drag-and-drop nodes
  • Trivial baseline routers (smallest_llm, largest_llm) included for sanity-checking

Verdict

Worth a look if you maintain a model zoo and want to cut API costs without writing a custom router from scratch. Skip it if you only ever call a single endpoint.

Frequently asked

What is ulab-uiuc/LLMRouter?
It matches each prompt to the cheapest capable LLM so you stop paying flagship-model rates for simple queries.
Is LLMRouter open source?
Yes — ulab-uiuc/LLMRouter is open source, released under the MIT license.
What language is LLMRouter written in?
ulab-uiuc/LLMRouter is primarily written in Python.
How popular is LLMRouter?
ulab-uiuc/LLMRouter has 2.1k stars on GitHub.
Where can I find LLMRouter?
ulab-uiuc/LLMRouter is on GitHub at https://github.com/ulab-uiuc/LLMRouter.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.