LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers

Tao Feng, Fangxu Yu, Haozhen Zhang, Zhongjie Dai, Liangqi Yuan, Zijie Lei, Weizhi Zhang, Kunlun Zhu, Haodong Yue, Keyang Xuan, Ge Liu, Jiaxuan YouarXiv 2026

TL;DR

LLMRouter unifies the fragmented landscape of Large Language Model (LLM) routing by framing it as a sequential decision process. Along with a modular open-source framework supporting over 16 routing methods, the authors introduce xRouteBench, a multi-scenario benchmark that evaluates routers across diverse modalities and cost constraints, revealing that learned routers can achieve a 14.6% relative performance boost over fixed-model baselines.

What Problem Does This Paper Address?

In the current AI ecosystem, we have access to a massive variety of LLMs, ranging from lightweight, cost-effective open-weight models to massive, expensive frontier systems. Because no single model is optimal for every query and budget, model routing—dynamically choosing which LLM handles a specific request—is crucial for cost-effective deployment.

However, the development of LLM routers has been highly fragmented. Researchers build routers using entirely different formalisms (e.g., cost-aware cascades, graph-based routers, or agentic RL routers) released in isolated codebases with incompatible interfaces. Furthermore, evaluating a router requires running every candidate model on every query to establish a baseline, making standardized, cost-aware evaluation incredibly difficult—especially for multi-turn and personalized routing.

Methods

The authors tackle this fragmentation by introducing a unified mathematical formulation, casting all LLM routing as a sequential decision process. Under this framework, any router can be broken down into five modular components:

  1. Context Encoder ($E_q$): Encodes the current state (the query, user persona, and interaction history).
  2. Model Encoder ($E_m$): Encodes the candidate LLMs based on static metadata or historical performance profiles.
  3. Scoring Function ($g$): Measures the compatibility between the encoded context and the candidate models.
  4. Decision Rule ($d$): Converts scores into a routing action (e.g., choosing a model or terminating the loop).
  5. Learning Signal ($\mathcal{L}$): The objective function (pointwise loss, pairwise preference, or reinforcement learning rewards) used to train the router.
Figure 1: Overview of LLM routing. Routing is driven by three needs (left), namely cost efficiency, capability matching, and user preference. Our unified formulation (right) casts all of them as one decision process: a context encoder Eq represents the routing state of query, persona, and interaction history, a model encoder Em represents each candidate, and the router dispatches the query or its sub-queries to selected models and aggregates their responses into the answer. The single-turn, multi-turn, and personalized families differ only in which part of the state they observe.

Using this formulation, they developed LLMRouter, an open-source infrastructure that standardizes data construction, training, and deployment. It allows developers to implement a new router simply by defining a routing method and a loss function, while the rest of the evaluation and deployment stack remains unchanged.

Figure 3: Architecture of LLMRouter. The system consists of six modules that support routing data construction, router implementation and training, inference, evaluation, and deployment.

Datasets

To evaluate routers on equal footing, the authors created xRouteBench, a benchmark consisting of 4,767 instances across five distinct tracks:

  • Generic LLM Tasks: A mix of 13 standard text benchmarks spanning knowledge QA, math, and code generation (e.g., MMLU, GSM8K, HumanEval).
  • Memory: Long-horizon conversational QA (LoCoMo, LongMemEval) where input token costs dominate.
  • Vision: Image-grounded math reasoning (MathVista, Geometry3K) and video understanding (Charades-Ego).
  • TimeSeries: Pattern reasoning on numerical data rendered as both text and images.
  • Personalized: Open-ended prompts from Chatbot Arena and MT-Bench evaluated against 200 distinct user personas.
Figure 2: Task composition of xRouteBench. The benchmark covers generic LLM tasks, mem- ory, vision, time-series, and personalized routing, with percentages indicating the proportion of test queries contributed by each dataset.

Key Insights and Ideas

  • The Largest Model Isn't Always Right: A common misconception is that always routing to the largest model yields the best performance if budget allows. xRouteBench reveals that learned routers actually outperform the "Largest-LLM" baseline. Why? Because massive models still fail on queries that smaller, specialized models sometimes answer correctly.
  • Multi-Turn Routing is Overhyped (For Now): Multi-turn or agentic routers that decompose queries into sub-queries do not consistently outperform single-turn routers. The extra rounds of decomposition often introduce redundant information and heavy computational overhead, and their success hinges entirely on the capability of the base model doing the orchestrating.
  • Rankings Flip Under Cost Constraints: Router performance is highly sensitive to budget. For instance, RouterDC dominates text tasks when only quality matters, but plummets to the bottom under tight cost constraints, where lightweight designs like MLPRouter become optimal.

Key Results

  • Overall Performance: Learned routers achieved a 14.6% relative improvement on average over the strongest fixed-model baseline across xRouteBench.
  • Personalized Routing: On the personalized track using a simulated persona judge, GMTRouter achieved the highest accuracy at 68.78%.
Table 3: Performance comparison on the person- alized track. Top two results are highlighted in bold and underline.
  • Real-User Deployment: The authors deployed LLMRouter behind a live Slack application to gather real human preferences. In this real-world setting, PersonalizedRouter led with an 83.05% agreement rate with human choices. Interestingly, the rankings from the simulated persona judge did not perfectly transfer to real humans, emphasizing the importance of live user testing.
  • Multi-Agent Systems: When routing individual nodes within multi-agent architectures (like chains or trees), six out of seven learned routers beat the single largest-model baseline, with MFRouter scoring the highest average performance (76.48%).

Limitations and Future Work

While LLMRouter provides a massive leap forward, the authors note that multi-turn routers remain bottlenecked by their orchestrating base models. Future work will need to focus on better "sufficiency estimation"—knowing exactly when a single turn is enough to stop and save costs. Additionally, the discrepancy between LLM-simulated persona judges and real human feedback highlights a critical need for more robust alignment datasets in personalized routing.

Summary updated

BibTeX
@misc{feng2026llmrouter,
  author = {Tao Feng and Fangxu Yu and Haozhen Zhang and Zhongjie Dai and Liangqi Yuan and Zijie Lei and Weizhi Zhang and Kunlun Zhu and Haodong Yue and Keyang Xuan and Ge Liu and Jiaxuan You},
  title = {{LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers}},
  year = {2026},
  eprint = {2608.06867},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.06867},
}
Figure