The self-hosted LLM router that cuts inference cost, not quality.
Route Anthropic Messages and OpenAI Chat Completions to the model your policy allows: frontier where the work needs it, approved lower-cost models for the rest. Millwright decides from explicit policy, not prompt inspection, and records the reason for every route.
- License
- Apache-2.0
- Runtime
- One Rust binary
- Deployment
- Self-hosted
- API surfaces
- Messages + Chat Completions
Find the expensive workloads and model the savings.
Every estimate includes its coverage, price source and assumptions. Candidate costs are modeled, not realized savings. Quality remains unverified until you test.
Route only within model sets you’ve approved.
Assign requests to cheap, mid or frontier roles, then list the models each role may use. Millwright reuses a confirmed affinity route when it remains valid and otherwise selects the lowest-estimated-cost healthy model the resolved role permits.
Change the endpoint, not the developer workflow.
Keep compatible Anthropic Messages and OpenAI Chat Completions clients, including supported streaming and tool use. Route them to native Anthropic, AWS Bedrock or approved OpenAI-compatible endpoints.
Drop into Claude Code and Codex.
Millwright speaks the APIs your agents already use. Point Claude Code at the Messages surface or Codex at Chat Completions, and the model picker you already use becomes the tier switch.
A policy-approved route, role-scoped affinity, and evidence you can inspect.
Each response exposes the chosen model, provider, trace ID and route reason. Configured storage retains detailed traces and cost evidence for completed inference calls.
Built for concurrent traffic.
No classifier in the hot path.
Millwright routes from explicit task and risk metadata, model aliases and your policy. It doesn’t make a second model call to decide where the first one should go.
Streaming remains streaming.
Supported upstream streams are forwarded incrementally instead of being buffered into a complete response first.
Concurrent sessions stay concurrent.
Role-scoped affinity keeps separate cheap, mid and frontier lanes under one session ID without a per-session lock.