SWE-Router: Routing in Multi-turn Agentic Software Engineering Tasks
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
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.
Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 47 of its 55 references that are in the map. First posted on arXiv 30 Jun 2026.
Builds on
47 of 55 references.
Closest ancestors · 6
Same direction, newest first
- 2025SWE-RM: Execution-free Feedback For Software Engineering Agents26 Dec
- 2025SWE-smith: Scaling Data for Software Engineering Agents30 Apr
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
Other references · 41
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 682
- 2023LLM-Blender: Ensembling Large Language Models with Pairwise Ranking and Generative Fusioncited by 564
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 279
- 2024RouterBench: A Benchmark for Multi-LLM Routing Systemcited by 238
29 more
- 2024SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?cited by 203
- 2024A Careful Examination of Large Language Model Performance on Grade School Arithmeticcited by 191
- 2025Reasoning Models Can Be Effective Without Thinkingcited by 187
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 183
- 2025Multi-SWE-bench: A Multilingual Benchmark for Issue Resolvingcited by 171
- 2024GraphRouter: A Graph-based Router for LLM Selectionscited by 165
- 2024Benchmark Data Contamination of Large Language Models: A Surveycited by 147
- 2023Large Language Model Cascades with Mixture of Thoughts Representations for Cost-efficient Reasoningcited by 143
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
- 2023Investigating Data Contamination in Modern Benchmarks for Large Language Modelscited by 138
- 2023AutoMix: Automatically Mixing Language Modelscited by 125
- 2024SWE-Bench+: Enhanced Coding Benchmark for LLMscited by 99
- 2023Fly-Swat or Cannon? Cost-Effective Language Model Choice via Meta-Modelingcited by 95
- 2025Universal Model Routing for Efficient LLM Inferencecited by 86
- 2025SWE-bench Goes Live!cited by 80
- 2025Router-R1: Teaching LLMs Multi-Round Routing and Aggregation via Reinforcement Learningcited by 72
- 2025RouterEval: A Comprehensive Benchmark for Routing LLMs to Explore Model-level Scaling Up in LLMscited by 61
- 2024EmbedLLM: Learning Compact Representations of Large Language Modelscited by 48
- 2025IRT-Router: Effective and Interpretable Multi-LLM Routing via Item Response Theorycited by 40
- 2025CARROT: A Cost Aware Rate Optimal Routercited by 39
- 2025SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?cited by 36
- 2025OmniRouter: Budget and Performance Controllable Multi-LLM Routingcited by 35
- 2025Route to Reason: Adaptive Routing for LLM and Reasoning Strategy Selectioncited by 23
- 2025RouterArena: An Open Platform for Comprehensive Comparison of LLM Routerscited by 22
- 2025Cost-Aware Contrastive Routing for LLMscited by 16
- 2025Route-and-Reason: Scaling Large Language Model Reasoning with Reinforced Model Routercited by 13
- 2025When to Reason: Semantic Router for vLLMcited by 12
- 2025IPR: Intelligent Prompt Routing with User-Controlled Quality-Cost Trade-offscited by 5
- 2026Think When Needed: Model-Aware Reasoning Routing for LLM-based Rankingcited by 4
Built on by
Citing papers per year: 2026: 11.
11 papers.
- 2026The Handoff Tax: Continuing Non-Native Trajectories in LLM Agentscited by 6
- 2026Scrouting: Cost-Aware Routing of Coding Agents by Scouting the Repository Firstcited by 2
- 2026TACIT-Switch: Cost-Aware Model Escalation for LLM Agents from Censored Supervisioncited by 2
- 2026TRACE-ROUTER: Task-Consistent and Adaptive Online Routing for Agentic AIcited by 1
- 2026Cost-Effective Repository Exploration for Agentic Issue Localizationcited by 1
- 2026RSI-Router: Evolving Subtask-Level LLM Routing and Skills for Cost-Efficient Agentscited by 1
- 2026Do Not Restart: Residual Completion for Stateful Agent Handoffscited by 0
- 2026HM-ROUTER: Joint Model and Harness Routing for Agentic Systemscited by 0
- 2026What Can Component-Replacement Evidence Establish? A Critical Scoping Review of Local Decisions in LLM Agentscited by 0
- 2026TurnCost: Turns, Not Observations: Cache-Aware Loop Engineering for Coding Agentscited by 0
- 2026Handoff Curves: Initial Selection, Later Handoff, and Supervision Targets in Multi-turn LLM Routingcited by 0
- 2026Handoff Curves: Initial Selection, Later Handoff, and Supervision Targets in Multi-turn LLM Routing11 Oct 2026
- 2026TurnCost: Turns, Not Observations: Cache-Aware Loop Engineering for Coding Agents10 Oct 2026
- 2026What Can Component-Replacement Evidence Establish? A Critical Scoping Review of Local Decisions in LLM Agents30 Sep 2026
- 2026RSI-Router: Evolving Subtask-Level LLM Routing and Skills for Cost-Efficient Agents28 Sep 2026
- 2026HM-ROUTER: Joint Model and Harness Routing for Agentic Systems26 Sep 2026
- 2026Do Not Restart: Residual Completion for Stateful Agent Handoffs12 Sep 2026
- 2026Cost-Effective Repository Exploration for Agentic Issue Localization30 Aug 2026
- 2026TACIT-Switch: Cost-Aware Model Escalation for LLM Agents from Censored Supervision28 Aug 2026
- 2026The Handoff Tax: Continuing Non-Native Trajectories in LLM Agents25 Aug 2026
- 2026Scrouting: Cost-Aware Routing of Coding Agents by Scouting the Repository First5 Aug 2026
- 2026TRACE-ROUTER: Task-Consistent and Adaptive Online Routing for Agentic AI24 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2025SWE-Compass: Towards Unified Evaluation of Agentic Coding Abilities for Large Language Models
- 2026Open-SWE-Traces: Advancing Dual-Mode Multilingual Distillation for Software Engineering Agents
- 2025When Agents go Astray: Course-Correcting SWE Agents with PRMs
- 2024SWE-Search: Enhancing Software Agents with Monte Carlo Tree Search and Iterative Refinement
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System
- 2026The Evolution of Tool Use in LLM Agents: From Single-Tool Call to Multi-Tool Orchestration
- 2025LoCoBench-Agent: An Interactive Benchmark for LLM Agents in Long-Context Software Engineering
- 2026SWE-Replay: Efficient Test-Time Scaling for Software Engineering Agents