Show HN: Smart model routing directly in Claude, Codex and Cursor
TL;DR Highlight
An open-source proxy that picks a model per request, claiming 40-70% cost savings via an endpoint change.
Who Should Read
Developers whose Claude Code or Codex API bills are getting out of hand.
Core Mechanics
- Just swap the endpoint
- Point Claude Code, Codex, Cursor or your own app at localhost:8080.
- It accepts Anthropic Messages, OpenAI Chat Completions and Gemini native APIs.
- Routes per request
- It routes per upstream API request (action), not per turn.
- A cluster scorer derived from the Avengers-Pro paper picks among your enabled providers.
- A small embedder decides
- A small in-process ONNX embedder scores each request.
- The README says it is not a vibes-based prompt.
- Numbers the README claims
- Routing in under 50ms and 40-70% cost cuts are stated.
- The README does not say what baseline the savings are measured against.
- Keys and prompts stay local
- Provider keys are BYOK and encrypted at rest on your box.
- Prompts go straight from the router to your provider, never to Weave.
- Easy to install and inspect
- npx @weave-os/router wires up Claude Code, Codex, opencode and pi.
- /v1/route shows the decision without proxying, and response headers like x-router-cost-usd report cost.
Community Reactions
- Cache misses may eat the savings
- Several commenters said agent harnesses rely heavily on prompt caching with a 5-minute TTL.
- Switching models mid-session causes cache misses that can cancel the savings.
- Agents already pick models themselves
- One commenter said coding agents already use mini/flash for exploration and heavy models for planning.
- A proxy breaks that feedback loop, such as retrying with a stronger model after failure.
- Two models may be enough
- One commenter argued that with 3+ models the cache penalty offsets gains, and with 1-2 you don't need a router.
- A planner plus an executor was called sufficient.
- Asks for evidence, plus a manual alternative
- Commenters asked for published Terminal-Bench style performance, cost and time comparisons.
- One said they had Opus delegate work to DeepSeek subagents via an MCP server, saving tokens manually.
How to Apply
- Check decisions with /v1/route
- Today, start the self-hosted stack and send 10 of your usual prompts to /v1/route.
- See which models get picked and whether that matches your expectations.
- Measure cost from the headers
- Point Claude Code or your app at the router and log x-router-cost-usd and cache-read-tokens.
- Compare cache-read tokens against direct calls.
- A/B with on and off
- Run the same task with the router on and off and record cost and success.
- If cache loss is large, turn it off or narrow the enabled model list.
Try It
# Paste in shell: connect the hosted router to Claude Code (needs Node 18+ and jq)
npx @weave-os/router --claude
# Check status
npx @weave-os/router status --claude
# Turn off (keeps config)
npx @weave-os/router off --claude
# Turn back on
npx @weave-os/router on --claudeTerminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls
Related Resources
- https://github.com/workweave/router
- https://arxiv.org/abs/2508.12631
- https://vllm-semantic-router.com/
- https://github.com/vllm-project/semantic-router
- https://arxiv.org/abs/2603.04444
- https://sakana.ai/fugu/
- https://routeworks.github.io/leaderboard
- https://arxiv.org/abs/2510.00202
- https://github.com/RouteWorks/RouterArena