northwood-systems/millwright — explained in plain English
Analysis updated 2026-05-18
Route AI coding assistant traffic (like Claude Code) across cheap, mid, and frontier model tiers to control spend.
Keep a session pinned to one provider and model so prompt-cache discounts are not lost mid-conversation.
Track and report LLM spend per team with a built-in CLI and cost analyzer.
Swap model providers behind one endpoint without changing application code.
| northwood-systems/millwright | adindazu/tangoaudio | bigmacfive/turbo-graph | |
|---|---|---|---|
| Stars | 23 | 23 | 23 |
| Language | Rust | Rust | Rust |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 4/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires building the Rust binary or Docker, plus your own model provider API keys.
Millwright is a self-hosted router that sits between your AI applications and the model providers you choose. It accepts requests written in the OpenAI Chat Completions format or the Anthropic Messages format, then forwards each one to an OpenAI-compatible API, Anthropic directly, or Amazon Bedrock, depending on your rules. Instead of every request going to the priciest model, you group models into three roles: cheap, mid, and frontier. Millwright picks the lowest-cost healthy option that your policy allows for that role, based on the type of task or risk level of the request. High-risk or planning-heavy requests are always sent to the frontier role, while routine work can use cheaper models. A notable feature is cache-aware routing. Many AI providers offer discounted pricing when a session keeps reusing the same warm prompt cache, but switching models mid-session can break that savings. Millwright keeps a session pinned to the same confirmed provider and model within each role, so cheap, mid, and frontier work can all run at once without stepping on each other's cache. Every routing decision is logged with the model chosen, the provider, the reason, and any alternatives that were rejected, so you can see exactly where your money is going. A command-line tool shows total spend, cost breakdowns by team, and live activity, and there is a built-in analyzer that can turn usage logs into an HTML or Markdown cost report. Millwright ships as a single Rust binary with Docker support, and your provider API keys stay on your own infrastructure rather than passing through a third-party service. It is built for developers and teams running AI agent tools like Claude Code or similar coding assistants who want to control spend without changing their application code. Setup involves an interactive command that walks through provider endpoints, model roles, and pricing, followed by starting the server.
Millwright is a self-hosted router that sits between your AI apps and model providers, picking the cheapest healthy model for each request while protecting prompt-cache savings.
Mainly Rust. The stack also includes Rust, Docker, SQLite.
Permissive Apache-2.0 license, use, modify, and deploy freely including commercially, as long as you keep attribution.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.