How we built a model router into Open SWE's harness that cut median cost per coding task by 64% with no measurable drop in quality, and how to build your own.
Read the original at LangChain blog: How to Build a Model Router in the Harness
How OpenSmartRoute helps
Teams using OpenSmartRoute gain immediate access to a router that cuts costs by 64% without hurting quality. The system sends each request to the best-fit model, agent, tool, or skill from a defined catalogue. It scores every candidate on quality, cost, speed, and safety before making a decision.
The platform learns from outcomes to improve routing over time. A model that answers well gets more traffic, while one that fails gets less. New models join the catalogue as single entries and compete on the next request. Nothing else changes in the application code.
Users see exactly what each routed request cost next to the most expensive option. An input guard spots prompt injection and personal data before a request leaves. The hosted platform keeps a catalogue with prices and public rankings built from real traffic.