🚀 LLMRouter: An Open-Source Library for LLM Routing
✨ Introduction
LLMRouter is an intelligent routing system designed to optimize LLM inference by dynamically selecting the most suitable model for each query. To achieve intelligent routing, it defines:
- 🚀 Smart Routing: Automatically routes queries to the optimal LLM based on task complexity, cost, and performance requirements.
- 📊 Multiple Router Models: Support for over 16 routing models, organized into five major categories—single-round routers, multi-round routers, multimodal routers, agentic routers, and personalized routers—covering a wide range of strategies such as KNN, SVM, MLP, Matrix Factorization, Elo Rating, graph-based routing, BERT-based routing, hybrid probabilistic methods, transformed-score routers, and more.
- 🛠️ Unified CLI: Complete command-line interface for training, inference, and interactive chat with Gradio-based UI.
- 📈 Data Generation Pipeline: Complete pipeline for generating training data from 11 benchmark datasets with automatic API calling and evaluation.
📰 News
🔥 [2026-08]: We are honored to have LLMRouter featured among the top papers on 🤗 Hugging Face Daily Papers.
🚀 [2026-08]: LLMRouter - We've released LLMRouter, a unified infrastructure for developing, evaluating, and deploying LLM routers! LLMRouter formulates routing as a unified sequential decision process spanning single-turn, multi-turn, and personalized scenarios, and provides a modular framework with 16+ representative routing methods. It also introduces xRouteBench, a comprehensive benchmark covering generic LLM, memory-augmented, vision, time-series, and personalized routing, with automated supervision construction and joint evaluation of response quality and inference cost. Experiments show that learned routers outperform the strongest fixed-model baseline by 14.6% relatively, wh