xRouter: Training Cost-Aware LLMs Orchestration System via Reinforcement Learning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Qian, Cheng, Liu, Zuxin, Kokane, Shirley, Prabhakar, Akshara, Qiu, Jielin, Chen, Haolin, Liu, Zhiwei, Ji, Heng, Yao, Weiran, Heinecke, Shelby, Savarese, Silvio, Xiong, Caiming, Wang, Huan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911200304955392
author Qian, Cheng
Liu, Zuxin
Kokane, Shirley
Prabhakar, Akshara
Qiu, Jielin
Chen, Haolin
Liu, Zhiwei
Ji, Heng
Yao, Weiran
Heinecke, Shelby
Savarese, Silvio
Xiong, Caiming
Wang, Huan
author_facet Qian, Cheng
Liu, Zuxin
Kokane, Shirley
Prabhakar, Akshara
Qiu, Jielin
Chen, Haolin
Liu, Zhiwei
Ji, Heng
Yao, Weiran
Heinecke, Shelby
Savarese, Silvio
Xiong, Caiming
Wang, Huan
contents Modern LLM deployments confront a widening cost-performance spectrum: premium models deliver strong reasoning but are expensive, while lightweight models are economical yet brittle on complex tasks. Static escalation rules and keyword heuristics under-utilize this spectrum and fail to adapt across task types. We present xRouter, a tool-calling-based routing system in which a learned router can either answer directly or invoke one or more external models. The router is trained end-to-end with reinforcement learning using an explicit, cost-aware reward that encodes cost-performance trade-offs, eliminating the need for hand-engineered routing rules. Our implementation encompasses the full reinforcement learning framework, including reward and cost accounting, as well as the deployment and evaluation pipelines. Across diverse benchmarks, xRouter achieves strong cost-performance trade-offs (e.g., substantial cost reductions at comparable task completion rates), and provides empirical insights into what reliably helps learned routing and what does not, ranging from model trainability to the difficulty of eliciting sophisticated orchestration behaviors in small open models. We hope these findings and our open implementation will serve as a practical substrate for advancing learned, cost-aware LLM orchestration.
format Preprint
id arxiv_https___arxiv_org_abs_2510_08439
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle xRouter: Training Cost-Aware LLMs Orchestration System via Reinforcement Learning
Qian, Cheng
Liu, Zuxin
Kokane, Shirley
Prabhakar, Akshara
Qiu, Jielin
Chen, Haolin
Liu, Zhiwei
Ji, Heng
Yao, Weiran
Heinecke, Shelby
Savarese, Silvio
Xiong, Caiming
Wang, Huan
Machine Learning
Artificial Intelligence
Computation and Language
Modern LLM deployments confront a widening cost-performance spectrum: premium models deliver strong reasoning but are expensive, while lightweight models are economical yet brittle on complex tasks. Static escalation rules and keyword heuristics under-utilize this spectrum and fail to adapt across task types. We present xRouter, a tool-calling-based routing system in which a learned router can either answer directly or invoke one or more external models. The router is trained end-to-end with reinforcement learning using an explicit, cost-aware reward that encodes cost-performance trade-offs, eliminating the need for hand-engineered routing rules. Our implementation encompasses the full reinforcement learning framework, including reward and cost accounting, as well as the deployment and evaluation pipelines. Across diverse benchmarks, xRouter achieves strong cost-performance trade-offs (e.g., substantial cost reductions at comparable task completion rates), and provides empirical insights into what reliably helps learned routing and what does not, ranging from model trainability to the difficulty of eliciting sophisticated orchestration behaviors in small open models. We hope these findings and our open implementation will serve as a practical substrate for advancing learned, cost-aware LLM orchestration.
title xRouter: Training Cost-Aware LLMs Orchestration System via Reinforcement Learning
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2510.08439