Most of an agent's token spend sits in tool output, so debugging or evaluating behavior means targeting that slice rather than full transcripts. Teams building coding agents or observability pipelines can use this ratio to size context budgets and design trajectory search over logs. The numbers come from Open SWE in production use, giving a concrete baseline for agent cost analysis.
#Open SWE
Placing routing logic inside the agent harness — which knows the task — beat gateway-level routing on cost without hurting merge quality. Teams running coding agents can replicate the tiered setup and measure merge rate, not just cost, before rolling out. LangChain itself flags the caveats: the control was the most expensive model and the router is still a proof of concept.
Cost-aware routing in the agent harness, rather than a single frontier model everywhere, is becoming a practical default for coding agents. Teams building multi-step agents can benchmark cheaper models per task type and keep premium models for escalation only. The DeepSeek V4.1 Flash versus Opus split shows a concrete tiering pattern worth copying.
This approach demonstrates how significant cost savings can be achieved without compromising quality by intelligently routing tasks based on complexity. Developers can implement similar routing in their own systems using LangChain middleware, with the decision model Jev offering 50x faster classification. The method is particularly valuable for organizations managing large-scale AI operations where cost efficiency is critical.