HM-ROUTER: Joint Model and Harness Routing for Agentic Systems
Organizations: Imperial College London · Samsung · Institute of Science Tokyo
Abstract
Agent performance depends on both the underlying model and the harness that manages its tool use and execution. Selecting a suitable pair requires accounting for their compatibility, yet training samples may cover only a subset of the growing combination space. We introduce HM-Router, a routing method that jointly selects a model and harness for each query. It learns separate model and harness representations shared across routes, with an interaction term inspired by canonical polyadic (CP) tensor decomposition to capture how their compatibility varies with the query. This sharing allows training samples from observed pairs to inform predictions for unobserved combinations. We curate a benchmark from 12 public agent benchmarks, covering 293 routes, 73 models, and 25 harnesses. HM-Router exceeds the strongest evaluated learned baseline by 7.3 percentage points in mean routing accuracy and leads at all seven evaluated cost budgets on the six-benchmark subset. When 90% of routes have their training outcomes withheld, allowing unobserved combinations improves normalized accuracy by 15.8 points over restricting the same router to observed routes. HM-Router has also demonstrated training sample efficiency for new routes and components and generalization to unseen benchmarks. Our code and data are open-sourced at https://github.com/hmarkc/HM-Router.
Figures & tables
| Benchmark | Random | IRT | Avengers | EmbedLLM | HM-Router |
|---|---|---|---|---|---|
| TerminalBench 2.1 ( Merrill et al., 2026 ) | 77.29 | 82.13 | 83.32 | 85.71 | 86.89 |
| TauBench Airline ( Yao et al., 2024 ) | 35.66 | 42.74 | 51.52 | 52.59 | 57.52 |
| CORE-Bench Hard ( Siegel et al., 2024 ) | 26.84 | 62.73 | 66.93 | 85.96 | 91.33 |
| ScienceAgentBench ( Chen et al., 2025 ) | 30.28 | 35.60 | 41.56 | 36.60 | 56.47 |
| GAIA ( Mialon et al., 2024 ) | 42.29 | 68.85 | 69.99 | 64.16 | 73.87 |
| Online Mind2Web ( Deng et al., 2023 ) | 39.71 | 45.75 | 46.95 | 47.43 | 51.26 |
| Removed | HM-Router | Comp. Avg. (all) | HM-Router (observed) | Fixed (observed) | Oracle (observed) |
|---|---|---|---|---|---|
| 10% | 67.13 | 63.52 | 64.15 | 61.24 | 98.30 |
| 25% | 63.52 | 60.22 | 61.92 | 60.50 | 94.22 |
| 50% | 52.12 | 52.89 | 46.82 | 47.53 | 80.29 |
| 75% | 48.32 | 40.30 | 39.62 | 40.10 | 63.48 |
| 90% | 49.31 | 37.43 | 33.54 | 33.33 | 42.22 |
| One route left | 51.28 | 47.54 | 23.37 | 23.37 | 23.37 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Harness(es) | Model identifiers |
|---|---|---|
| TerminalBench 2.1 ( Merrill et al., 2026 ) | Claude Code ( Anthropic, 2025 ) | claude-fable-5 ; claude-opus-4-7 ; claude-opus-4-8 ; claude-sonnet-5 ; glm-5-1 |
| TerminalBench 2.1 | Codex ( OpenAI, 2025 ) | gpt-5-5 ; gpt-5-6-luna ; gpt-5-6-terra |
| TerminalBench 2.1 | Gemini CLI ( Google, 2025 ) | gemini-3-1-pro-preview ; gemini-3-pro-preview |
| TerminalBench 2.1 | Terminus 2 ( Merrill et al., 2026 ) | claude-fable-5 ; claude-opus-4-7 ; gemini-3-1-pro-preview ; gemini-3-pro-preview ; gpt-5-5 |
| TauBench Airline ( Yao et al., 2024 ) | HAL Generalist ( Kapoor et al., 2026 ) | claude-opus-4 ; claude-opus-4-1 ; claude-sonnet-3-7 ; deepseek-r1 ; deepseek-v3 ; gemini-2-0-flash ; gpt-4-1 ; gpt-5 ; o4-mini |
| TauBench Airline | Taubench ToolCalling ( Yao et al., 2024 ) | claude-opus-4-1 ; claude-sonnet-3-5 ; claude-sonnet-3-7 ; gemini-2-0-flash ; gpt-4-1 ; gpt-4o ; gpt-5 ; o3 ; o4-mini |
| Method | \leq\0.75$ | \leq\1$ | \leq\1.50$ | \leq\2$ | \leq\3$ | \leq\5$ | \leq\10$ |
|---|---|---|---|---|---|---|---|
| Random | — | — | — | — | 40.20 | 40.20 | 40.20 |
| Fixed | 46.29 | 49.01 | 52.89 | 60.23 | 60.23 | 66.90 | 66.90 |
| Av-Pro | 53.58 | 55.25 | 58.41 | 60.67 | 60.67 | 62.20 | 62.20 |
| IRT | 49.54 | 49.58 | 49.63 | 53.98 | 54.70 | 54.70 | 54.70 |
| EmbedLLM | 50.11 | 53.54 | 53.63 | 59.95 | 59.95 | 59.95 | 59.95 |
| HM-Router | 58.94 | 61.86 | 61.86 | 69.21 | 69.21 | 70.89 | 70.89 |
LLM Agent Routing
LLM agent routing selects models, tools, skills, or collaboration workflows for each task or step to balance capability, cost, latency, and reliability.
See all 99 papers