mlsanityData to 14 Oct 2026

Agent-as-a-Router: Agentic Model Routing for Coding Tasks

arXiv 2606.22902 ↗First posted 22 Jun 2026cs.AIcited by 10

On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks

Abstract (arXiv)

Real-world users typically have access to multiple Large Language Models (LLMs) from different providers, and these LLMs often excel at distinct domains, yet none dominate all. Consequently, routing each task to the most suitable model becomes critical for both performance and cost. Existing routers treat this as a static, one-off classification problem. However, we identify the performance bottleneck for these routers as information deficit: simply augmenting a vanilla LLM router with performance statistics at the task-dimension level yields a 15.3% relative gain, surpassing a heuristic router built on the same dimension-level priors. Motivated by this finding, we propose Agent-as-a-Router, a framework that formalizes routing as a C-A-F loop (Context->Action->Feedback->Context). It closes the information gap by accumulating execution-grounded experience during deployment. We instantiate this framework as ACRouter, composed of an Orchestrator, a Verifier, a Memory module, and introduce CodeRouterBench, an evaluation environment comprising ~10K task instances with verified scores from 8 frontier LLMs, enabling regret-based router comparison on streaming tasks. Experiments show that ACRouter achieves the lowest cumulative regret on in-distribution tasks and generalizes to out-of-distribution agentic-programming tasks, demonstrating that our routing framework actively closes the information gap. Codes and benchmarks are released at https://github.com/LanceZPF/agent-as-a-router.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 34 of its 48 references that are in the map. First posted on arXiv 22 Jun 2026.

Builds on

34 of 48 references.

Closest ancestors · 2

Same direction, newest first

  1. 2025MasRouter: Learning to Route LLMs for Multi-Agent Systems16 Feb
  2. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework1 Aug

Other references · 32

  1. 2025Qwen3 Technical Reportcited by 8,820
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2021Program Synthesis with Large Language Modelscited by 3,637
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  5. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  6. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
  7. 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
  8. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
  9. 2023ChatDev: Communicative Agents for Software Developmentcited by 919
  10. 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 853
  11. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  12. 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 682
20 more
  1. 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 587
  2. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
  3. 2026Kimi K2.5: Visual Agentic Intelligencecited by 501
  4. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 452
  5. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 421
  6. 2024Hybrid LLM: Cost-Efficient and Quality-Aware Query Routingcited by 372
  7. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
  8. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
  9. 2023Large Language Model Routing with Benchmark Datasetscited by 172
  10. 2023AutoMix: Automatically Mixing Language Modelscited by 125
  11. 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 108
  12. 2023Fly-Swat or Cannon? Cost-Effective Language Model Choice via Meta-Modelingcited by 95
  13. 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 48
  14. 2026LLMRouterBench: A Massive Benchmark and Unified Framework for LLM Routingcited by 38
  15. 2026FeatureBench: Benchmarking Agentic Coding for Complex Feature Developmentcited by 34
  16. 2026LongCLI-Bench: A Preliminary Benchmark and Study for Long-horizon Agentic Programming in Command-Line Interfacescited by 34
  17. 2026SWE-CI: Evaluating Agent Capabilities in Maintaining Codebases via Continuous Integrationcited by 23
  18. 2026Composer 2 Technical Reportcited by 22
  19. 2026Adaptive Vision-Language Model Routing for Computer Use Agentscited by 8
  20. 2026LLM Router: Rethinking Routing with Prefill Activationscited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 10.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026TwinRouterBench: Fast Static and Live Dynamic Evaluation for Realistic Agentic LLM Routing
  2. 2026AgentRouter: Heterogeneous Model Routing for Cost-Optimal Multi-Step Agentic Workflows
  3. 2026Runtime Burden Allocation for Structured LLM Routing in Agentic Expert Systems: A Full-Factorial Cross-Backend Methodology
  4. 2025A Self-Improving Coding Agent
  5. 2026CASTER: Breaking the Cost-Performance Barrier in Multi-Agent Orchestration via Context-Aware Strategy for Task Efficient Routing
  6. 2025MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLM
  7. 2026Learning Agent Routing From Early Experience
  8. 2026Learning Compositional Meta-Routing for Agentic Workflows: An Executable Benchmark