Hacker News
Latest
Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
2026-06-26 @ 18:32:22Points: 47Comments: 36
U.S. government will decide who gets to use GPT-5.6
2026-06-26 @ 18:23:14Points: 534Comments: 682
Pre-Modern Armies for Worldbuilders, Part III: Paying for It
2026-06-26 @ 18:04:05Points: 20Comments: 1
What Is a Nomogram and Why Would It Interest Me?
2026-06-26 @ 17:24:25Points: 47Comments: 12
Data centers trigger voter backlash
2026-06-26 @ 17:24:21Points: 118Comments: 164
Previewing GPT‑5.6 Sol: a next-generation model
2026-06-26 @ 17:06:55Points: 640Comments: 387
Liva AI (YC S25) Is Hiring
2026-06-26 @ 17:00:43Points: 1
Show HN: Smart model routing directly in Claude, Codex and Cursor
2026-06-26 @ 16:40:11Points: 107Comments: 76
At Weave, we write most of our code with AI, and it's been getting more expensive. This came to a head when Opus 4.7 was released and, thanks to its tokenizer changes, our costs shot up. We knew we didn't need Opus for everything but we didn't want to lose out on the intelligence for the cases where you really need it. So we decided to build a model router to handle this for us.
The Weave Router acts as an Anthropic/OpenAI endpoint specifically for coding agents. It looks at every inference request and intelligently (more on that in a sec) decides what model to send it to, handling all the translations required along the way. So it can use faster/cheaper models (e.g. DeepSeek v4, GLM 5.2, Kimi K2.6) when possible, and frontier models (Opus 4.8 & GPT 5.5 (& Fable whenever it's back)) when necessary.
How do we know what model to route to? We trained an RL model on tens of thousands (so far!) of agent traces. We reward the routing model when it selects an LLM that successfully completes the given task.
Here's an example: if you ask the router to plan a complex change, it will (probably) route that request to Opus 4.8. Subagents exploring the codebase to gather context will be routed to more suitable models (e.g. DeepSeek V4 Flash). Then when you have the plan ready to implement, it will be (most likely) be handed to a quicker model (e.g. GLM 5.2) to carry it out.
We've been using this internally for the last month or so. We've saved 40% on tokens vs. what we otherwise would have paid, with no noticeable differences in quality or velocity.
The router is source-available under Elastic License 2.0, so you can self-host it. Or if you prefer, you can also use our hosted version: weaverouter.com.
I'll be here to answer any questions you may have!