RSI-Router: Evolving Subtask-Level LLM Routing and Skills for Cost-Efficient Agents
Organizations: Shanghai Artificial Intelligence Laboratory · Northwestern Polytechnical University
Abstract
Practical deployment of large language model (LLM) agents requires strong task performance at affordable inference cost. For long-horizon agentic tasks, this performance-cost trade-off can be improved through within-task large-small model collaboration, as smaller models can handle some stages even when they cannot solve the full task. In this paper, we introduce RSI-router, a routing framework that constructs subtask-level model assignments and model-specific skills through recursive self-improvement over accumulated experience. Each iteration consists of four stages: Subtask Mining derives subtask definitions and identification rules from training trajectories; Routing Strategy Evolution proposes and evaluates diverse model assignments; Model-Specific Skill Evolution compares routed and large-model-only trajectories to diagnose failures and develop reusable execution skills; and Pareto-Optimal Router Selection updates the Pareto population using historical and newly generated routers while retaining dominated routers as experience for subsequent evolution. Routing between DeepSeek-V4.1-Flash and Qwen3.5-9B, RSI-router consistently surpasses the DeepSeek-only baseline at roughly half the inference cost (48.3%) across five agentic benchmarks. In particular, on ALFWorld, ScienceWorld, and WebShop, it cuts inference cost by 74.7-82.2% while simultaneously improving performance; on Terminal-Bench 2.0, it achieves a 16.7% relative performance gain at 18.0% lower cost. Moreover, RSI-router establishes a stronger performance--cost Pareto frontier than 9 routing methods.
Figures & tables
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Tokens per request | GPU hours | |||
| Input | Output | DeepSeek-V4.1-Flash | Qwen3.5-9B | Ratio |
| 8 H200s | 1 H200 | |||
| 2,048 | 128 | 0.9842 | 0.0199 | 49.46 |
| 2,048 | 1,024 | 5.4078 | 0.0545 | 99.23 |
| 8,192 | 128 | 2.0729 | 0.0679 | 30.53 |
| 8,192 | 1,024 | 6.4912 | 0.1153 | 56.30 |