🤖 AI Summary
This work addresses the absence of a unified framework for fairly comparing and efficiently deploying large language model (LLM) routing strategies under diverse query and budget constraints. We propose the first formalized LLM routing framework, modeling routing as a sequential decision process that integrates joint encoding of context and models, configurable scoring functions, flexible decision rules, and automated learning signals—supporting single-turn, multi-turn, and personalized routing. To facilitate research and development, we introduce xRouteBench, a multitask benchmark, and release LLMRouter, a modular infrastructure integrating over 16 routing methods. Experiments demonstrate that learned routers outperform the strongest fixed-model baseline by 14.6%, lightweight variants excel under stringent cost constraints, and user-conditioned routing significantly enhances personalization effectiveness.
📝 Abstract
No single large language model (LLM) is optimal across all queries and budget constraints, making model routing essential for cost-effective deployment. Existing routers adopt diverse formulations and implementations, making fair comparison and extension difficult. We present a unified formulation of LLM routing as a sequential decision process characterized by five components: context encoders, model encoders, scoring functions, decision rules, and learning signals, covering single-turn, multi-turn, and personalized routing. Based on this formulation, we develop an automated pipeline for constructing routing supervision and evaluating routers jointly on response quality and inference cost. The resulting benchmark, xRouteBench, spans generic LLM, memory-augmented, vision, time-series, and personalized routing tasks. We further introduce LLMRouter, an open-source modular infrastructure with more than 16 representative routers. Our empirical study shows that learned routers outperform the strongest fixed-model baseline by 14.6% relatively, lightweight routers become more competitive under tight cost constraints, and user-conditioned routing consistently improves personalization.