Design & architecture · Engineering references
Where should model routing live? LangChain puts selection inside the harness
Choose a model tier based on real tasks and outcomes. LangChain shares experiments building a router for Open SWE.
What the source says
The router uses task context to choose a model, rather than relying only on request shape at a general gateway.
The team analyzes task types in traces, then evaluates results through online experiments and user feedback.
The current implementation chooses a model at the beginning of a thread. Mid-task rerouting remains an area of exploration, and switching models can lose prompt-cache benefits.
Original source
This is AgentBee’s editorial digest and analysis of the source, not a reproduction of the full article.
Sydney Runkle and Eugene Yurtsev · LangChain ↗