LangChain routes its coding agent to cheaper models, cutting cost 64%
Open SWE was tested on 973 threads with per-thread model routing, dropping median cost from $2.61 to $0.94 with no significant difference in merged-PR rate.

LangChain gave its coding agent three models and a router. Open SWE, their open-source coding agent, now sends each thread to the cheapest model likely to finish the job. they tested it on 973 threads, half routed and half always on GPT-6 Astra. median cost per thread: $0.94 against $2.61. that's 64% lower. threads ending in a merged PR: 29.2% routed, 27.3% on Astra. LangChain's p-value for that gap is 0.49. the router sent 56% of threads to the balanced model, 34% to the fast one and 10% to the performance one. they also tried always using the fast model. that test ended within a day, because engineers reported low output quality. LangChain's own caveats: the control was the most expensive model, and the router is a proof of concept. Which three models would you put in the tiers?