# ulab-uiuc/LLMRouter

LLMRouter: An Open-Source Library for LLM Routing

Repository: https://github.com/ulab-uiuc/LLMRouter
Canonical: https://ross.abutalabs.com/products/llmrouter
Homepage: https://ulab-uiuc.github.io/LLMRouter/
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-20T08:24:44+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 35, longevity 23
- inputs: {"age_days": 330, "days_push": 13, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2547, forks 259 (observed 2026-08-28T04:06:59.549302+00:00)

## What it is
LLMRouter is an open-source Python library that intelligently routes queries to the most suitable LLM based on task complexity, cost, and performance requirements. It provides 16+ router models across single-round, multi-round, multimodal, agentic, and personalized categories, plus a unified CLI for training, inference, and chat with a Gradio UI.

## Use cases
- route llm queries to the cheapest model that meets quality requirements
- train a custom llm router on my own query data
- compare different llm routing strategies under a shared benchmark
- reduce llm api costs by dynamically selecting models per query
- build a cost-aware cascade across multiple llm providers
- evaluate routing policies on quality and token cost
- chat with routed models through a web ui

## When to choose
- you serve many diverse queries and want to balance model quality against inference cost
- you want to develop, train, or benchmark LLM routing methods with a unified framework
- you need a ready-made pool of router algorithms (KNN, SVM, BERT-based, graph-based, Elo, etc.)
- you want a CLI and data generation pipeline for building routing supervision

## When to avoid
- you only call a single LLM and have no need for model selection
- you need a production API gateway with rate limiting, auth, and load balancing rather than a research routing library
- your candidate model pool is too small for routing to pay off

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, machine-learning, cli, benchmarking, rag
- domain: large-language-models, machine-learning, artificial-intelligence, developer-tools
- platform: python, cli, cross-platform
- tags: llm-routing, model-selection, cost-optimization, router-training, gradio-ui, benchmark

## Member repositories
- ulab-uiuc/LLMRouter (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:59.549302+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:24:35.193676+00:00, confidence not recorded.
  - readme: https://github.com/ulab-uiuc/LLMRouter (fetched 2026-08-28T04:06:59.549302+00:00, sha 232143c6da9d)
  - homepage: https://ulab-uiuc.github.io/LLMRouter/ (fetched 2026-08-29T10:06:47.761412+00:00, sha 7aca469a4fa2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
