Millwright Review 2026: A Self-Hosted LLM Router in One Rust Binary
Millwright is an open-source, self-hosted LLM router that sends each request to the lowest-cost healthy model your policy allows. We review its routing, cache affinity, and spend control.
When every request hits your most expensive frontier model, the bill climbs fast β and provider switches quietly break prompt-cache reuse. Millwright is a self-hosted LLM router (a single Rust binary) that puts the cheaper path in charge, with policy, cache affinity, and spend control in one place.
What is Millwright?
Millwright is an open-source LLM router that sits between your AI apps and the model providers you choose. It accepts OpenAI Chat Completions and Anthropic Messages, then routes each request to an OpenAI-compatible API, Anthropic, or Amazon Bedrock. You define which models fill the cheap, mid, and frontier roles; Millwright picks the lowest estimated-cost healthy route your policy permits.
Itβs a router, not an agent orchestrator β it doesnβt spawn agents, inspect prompts, or rewrite context.
Key features
- Policy-controlled routing β classify requests into cheap / mid / frontier roles; high-risk and planning work always uses frontier.
- Cache-aware affinity β keeps independent cheap/mid/frontier lanes under one session ID to protect prompt-cache reuse.
- Spend ledger β SQLite by default, PostgreSQL for production, with routing provenance.
- Provider portability β change providers behind one endpoint without touching app code.
- Runs the data plane yourself β provider credentials stay on your infrastructure.
- Works with Claude Code, Codex, OpenCode, Pi, and other compatible clients.
Who should use it?
Millwright is for teams running many concurrent agent sessions who want to cap LLM spend without hand-tuning every call. If youβre already comparing routers, itβs a self-hosted alternative to LiteLLM and hosted gateways β no required control plane.
Itβs less useful if you only call one model from one app; the setup cost outweighs the benefit there.
Pros and cons
Pros: self-hosted and private, explicit spend control, cache-aware concurrency, inspectable routing.
Cons: early release (v0.1.0) so the API may shift; router-only (no agent orchestration); needs Rust 1.97+ to build from source.
Pricing
Free and open source (Apache-2.0).
FAQ
Does Millwright inspect my prompts? No. Routing decisions use task/risk headers and model selection, never message content.
Can it replace LiteLLM? It covers core routing, caching, and spend-tracking use cases and is fully self-hosted; whether it replaces LiteLLM depends on which advanced features you rely on.
Which clients work with it? Any OpenAI-compatible or Anthropic-compatible client, including Claude Code, Codex, and OpenCode.
Explore the best AI Coding tools
Related Articles
Aether Review 2026: Turn Your AI Subscription Into a Fleet of Devboxes
Aether (runaether.dev) turns the AI subscription you already pay for into parallel cloud devboxes where an agent streams every command, opens a PR, and another agent reviews and fixes it until the code holds up. We review the loop, the receipts, and the pricing.
agent-run Review 2026: Run Coding Agents in a Tiny Sandbox That Catches Mistakes Before They Spread
In-depth review of agent-run β a sub-1MB standalone binary that sandboxes coding agents (Claude Code, Codex, OpenCode, pi) inside a Bubblewrap container. Host filesystem is read-only by default. Built to catch agent mistakes, not malware.
Best AI Agent Tools in 2026: From Coding Assistants to Autonomous Workers
Complete guide to AI agent tools in 2026 β Claude Code, Codex, Cursor, Manus, and more. Which agents actually deliver on the promise of autonomous work?
Faultsense Review 2026: The expect() Without the Page
Faultsense is a zero-dependency browser agent that runs end-to-end assertions against real user sessions in production. We review how fs-* attributes work, RUM-style testing, and who should adopt it.
Subscribe to the 9bests weekly β get the full list free
Hand-picked AI tool reviews and updates every week. Subscribe to receive this full list + 7 more quick-reference sheets (writing / image / video / audio / chat models / data / API cost).
Subscribe free & get it βIndependent reviews β ratings aren't influenced by vendor payments Β· double opt-in Β· unsubscribe anytime