SWE-Router: Routing in Multi-turn Agentic Software Engineering Tasks
- URL: http://arxiv.org/abs/2607.00053v1
- Date: Tue, 30 Jun 2026 01:46:26 GMT
- Title: SWE-Router: Routing in Multi-turn Agentic Software Engineering Tasks
- Abstract summary: Large language models (LLMs) embedded in multi-turn agentic harnesses are reshaping software engineering (SWE)<n>But routing every task to a frontier model is wasteful when many issues admit cheap fixes.<n>We introduce SWE--a value-based temporal approach that lets a cheap model run for a few exploratory turns and reads the resulting partial trajectory.<n>We show that SWE- greatly improves the cost efficiency of SWE tasks, while maintaining the majority of the performances of the stronger model.
- Score: 11.50404356970464
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Large language models (LLMs) embedded in multi-turn agentic harnesses are reshaping software engineering (SWE), but routing every task to a frontier model is wasteful when many issues admit cheap fixes. Existing LLM routers operate on the task description alone, which inherits an information-theoretic Bayes-error floor in agentic settings: a similar issue can hide either a localized typo or a multi-module refactor, and the prompt does not separate the two. We introduce SWE-Router, a value-based temporal approach that lets a cheap model run for a few exploratory turns and reads the resulting partial trajectory before deciding whether to continue cheaply or to escalate to an expensive model. We provide a Bayes-optimality theorem showing that conditioning on the partial trajectory never harms routing and is strictly better whenever exploration is informative. Across the LLM pairs of weak and strong models spanning the contemporary cost--capability frontier, we show that SWE-Router greatly improves the cost efficiency of SWE tasks, while maintaining the majority of the performances of the stronger model. We additionally release a multi-LLM trajectory dataset which allows reproduction of our trajectory-level routing.
Related papers
- Agent-as-a-Router: Agentic Model Routing for Coding Tasks [54.00153674547733]
Agent-as-a-router (AC) formalizes routing as a C-A-F loop (Context->Action->FeedbackContext)<n>AC achieves the lowest cumulative regret on in-distribution tasks and generalizes to out-of-distribution agentic-programming tasks.
arXiv Detail & Related papers (2026-06-22T06:37:31Z) - MTRouter: Cost-Aware Multi-Turn LLM Routing with History-Model Joint Embeddings [47.963523156965174]
We study cost-aware multi-turn routing for large language models.<n>We propose MT, which encodes the interaction history and candidate models into joint history-model embeddings.<n>Experiments show that MT improves the performance-cost trade-off.
arXiv Detail & Related papers (2026-04-26T04:42:21Z) - RouteLMT: Learned Sample Routing for Hybrid LLM Translation Deployment [57.588738943463646]
Large Language Models (LLMs) have achieved remarkable performance in Machine Translation (MT)<n> deploying them at scale remains prohibitively expensive.<n>We propose textbfRouteLMT, an in-model router that predicts the expected gain by probing the small translators prompt-token representation.
arXiv Detail & Related papers (2026-04-24T13:02:45Z) - Efficient and Interpretable Multi-Agent LLM Routing via Ant Colony Optimization [58.59491516762626]
We propose AMRO-S, an efficient and interpretable routing framework for Multi-Agent Systems (MAS)<n>AMRO-S models MAS routing as a semantic-conditioned path selection problem, enhancing routing performance through three key mechanisms.<n>Extensive experiments on five public benchmarks and high-concurrency stress tests demonstrate that AMRO-S consistently improves the quality--cost trade-off over strong routing baselines.
arXiv Detail & Related papers (2026-03-13T12:26:05Z) - CASTER: Breaking the Cost-Performance Barrier in Multi-Agent Orchestration via Context-Aware Strategy for Task Efficient Routing [25.48759875572515]
CASTER (Context-Aware Strategy for Task Efficient Routing) is a lightweight router for dynamic model selection in graph-based MAS.<n>CASTER reduces inference cost by up to 72.4% compared to strong-model baselines.
arXiv Detail & Related papers (2026-01-27T16:52:47Z) - xRouter: Training Cost-Aware LLMs Orchestration System via Reinforcement Learning [104.63494870852894]
We present x, a tool-calling-based routing system in which a learned router can either answer directly or invoke one or more external models.<n>Our implementation encompasses the full reinforcement learning framework, including reward and cost accounting.<n>Across diverse benchmarks, x achieves strong cost-performance trade-offs.
arXiv Detail & Related papers (2025-10-09T16:52:01Z) - Learning to Route LLMs from Bandit Feedback: One Policy, Many Trade-offs [69.2486294522259]
BaRP is a Bandit Routing-feedback with Preferences approach that trains under the same partial-feedback restriction as deployment.<n> Framed as a contextual bandit over prompt features and a user preference vector, our method simulates an online feedback setting during training and adapts its routing decisions to each new prompt.
arXiv Detail & Related papers (2025-10-08T18:24:59Z) - Keeping Up with the Models: Online Deployment and Routing of LLMs at Scale [6.911384287238722]
We present a hierarchical algorithm that selects up to $M_max$ models for the next stage using reward upper-confidence and cost lower-confidence bounds.<n>We prove that StageRoute achieves a regret of order $T2/3$ and provide a matching lower bound, thereby establishing its near-optimality.
arXiv Detail & Related papers (2025-06-08T12:25:26Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.