Pretrain Once, Route Anywhere: Towards a Foundation Model for LLM Routing
Guannan Lai, Han-Jia Ye
Nanjing University
Published September 29, 2026 · on the feed October 2, 2026 · ▲ 16 · arXiv 2609.37362
The abstract
Large language model (LLM) routing aims to assign each query to the most suitable model from a heterogeneous candidate pool, improving the quality--efficiency trade-off of LLM inference. Existing routers are typically learned through local fitting: a router is optimized for a particular query workload and candidate pool, and often requires additional supervision or retraining as the routing environment changes. We ask whether LLM routing can instead be approached from a foundation-model perspective, learning a reusable routing capability that generalizes across tasks, candidate models, and deployment conditions. To this end, we introduce RouteFM, which learns to characterize anonymous candidate models from behavioral context and infer their target-specific capabilities, rather than binding routing decisions to fixed model identities or a single environment. Through episodic pretraining across heterogeneous routing environments, this capability can be reused by a frozen router and adapted to new environments through context alone. Experiments demonstrate transfer across changes in domains, modalities, candidate pools, and context budgets, with the largest gains when behavioral evidence is limited. On MMR-Bench, which is excluded from pretraining, RouteFM outperforms the strongest baseline by 2.23 quality points with only eight observations per candidate. These results support moving LLM routing from repeated local fitting toward a pretrain once, route anywhere paradigm. Our code is publicly available at https://github.com/LAMDA-Model-Reuse/RouteFM.
The Brief
2:32A short podcast summary of the paper. Written and voiced by AI.
Transcript
Pretrain Once, Route Anywhere. Towards a Foundation Model for LLM Routing. By Guannan Lai and one other, from Nanjing University. Published on the twenty-ninth of September. Its code repository is public and real: about thirty source files.
LLM routing takes each incoming query and assigns it to the most suitable model from a heterogeneous pool of candidates. Done well, it improves the trade-off between quality and efficiency at inference time. The decision is made per query, and the pool can mix models of very different kinds.
Existing routers are typically learned through what the authors call local fitting. A router is optimized for one particular query workload and one particular candidate pool. When the routing environment changes, whether that is new queries or new models in the pool, the router often needs additional supervision or outright retraining. Its knowledge is bound to the exact setting it was fitted in, so every new setting means fitting again.
The paper asks whether routing can be approached from a foundation-model perspective instead. The aim is a reusable routing capability, learned once, that generalizes across tasks, across candidate models, and across deployment conditions. RouteFM is the attempt. Rather than binding its decisions to fixed model identities, or to a single environment, it learns to characterize candidate models that are anonymous to it, using behavioral context, and from that to infer their capabilities specific to the target in front of it. A candidate is known by how it behaves, not by what it is called.
That capability is built through episodic pretraining across heterogeneous routing environments, many of them, each a different combination of queries and candidates. What comes out can be reused by a router that stays frozen. Adapting to a new environment happens through context alone: the router is shown behavioral evidence about the candidates in front of it, and nothing in the router itself is retrained.
Experiments demonstrate transfer across four kinds of change: domains, modalities, candidate pools, and context budgets. The largest gains come when behavioral evidence is limited, when the router has seen the candidates do very little. MMR-Bench was excluded from pretraining, so it is unseen. There, RouteFM outperforms the strongest baseline by two point two three quality points, with only eight observations per candidate.
Routing has been something redone for each pool and each workload. RouteFM argues for paying the expensive part once: pretrain a router that reads candidates from how they behave, then let a handful of observations stand in for retraining whenever the environment shifts. Pretrain once, route anywhere, as the title puts it.
Paper Quest · 7 chapters · about 40 min
Play this paper
Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.
Chapter 1 🧩 · The problem
New models keep arriving. Must the router start over every time?
You run a service that sends each incoming query to one of several language models, picking whichever gives the best quality for the cost.
The road ahead
- 1 · The problem ~6 min A router that picks a language model per query is fitted to one setting, so every change to queries or models forces you to collect data and retrain.
- 2 · What came before ~3 min
- 3 · The key idea ~9 min Describe each candidate model only by how it behaved on earlier queries, pretrain one router over many varied episodes, then use it frozen anywhere.
- 4 · Choose your own research ~3 min
- 5 · Build the method ~8 min Pretrain on varied episodes, freeze, feed in a new pool's behavior, infer each anonymous candidate's fit for the query, then route to the best.
- 6 · The experiment ~6 min You’ll guess: On an unseen multimodal benchmark, with only eight observations per candidate, by how many quality points did RouteFM beat the strongest baseline?
- 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Free, with Google or an email address. Your stars and progress are kept.