AI Developer Tools
Millwright
Millwright is an open-source, self-hosted LLM router that routes AI requests to the lowest-cost model providers based on policy, preserving prompt caches and controlling spend.
Millwright
What is Millwright?
Millwright is an open-source LLM router that directs AI requests to the cheapest appropriate model provider based on policy, preserving prompt cache affinity and controlling spend. It runs between your AI applications and model providers, accepting OpenAI Chat Completions and Anthropic Messages, and routing to OpenAI-compatible APIs, Anthropic, or Amazon Bedrock.
Millwright vs Similar AI Tools
| Pricing Model | Free | Custom Pricing | Paid | Free |
| Free Credits | ||||
| Key Features |
|
|
|
|
| Pros |
|
|
|
|
| Cons |
|
|
|
|
| Best For |
|
|
|
|
How to use Millwright?
- 1git clone https://github.com/Northwood-Systems/millwright.git
- 2cd millwright
- 3cargo install --path . --locked
- 4millwright init
- 5millwright serve
- 6Alternatively, for a local demo:
- 7make compose-up
- 8curl http://localhost:8080/v1/chat/completions -H 'Authorization: Bearer sk-millwright-local-demo' -H 'Content-Type: application/json' -d '{"model":"millwright-fast","messages":[{"role":"user","content":"Hello"}]}'
Millwright Key Features
- Policy-controlled routing with task and risk headers
- Cache-aware concurrency maintaining independent affinity lanes for cheap, mid, and frontier roles
- Spend tracking and cost analysis via ledger, CLI commands, and management APIs
- Provider and protocol support for OpenAI Chat Completions, Anthropic Messages, and Amazon Bedrock
- Self-hosting as a single Rust binary with Docker support; provider credentials stay on your infrastructure
Millwright Use Cases
- Reduce LLM costs by routing requests to the cheapest model that meets policy requirements
- Maintain prompt cache reuse across a session by preserving provider/model affinity
- Switch between providers without changing application code
- Inspect and audit routing decisions with response headers and ledger entries
Millwright Pricing & Free Credits
Millwright currently operates on a Free model.
This tool is completely free to use
Millwright Pros & Cons
Pros
- Cost control by using cheapest appropriate models
- Preserves prompt caches across requests
- Provider-agnostic; easy to switch without code changes
- Fully self-hosted; data and credentials remain on your infrastructure
- Inspectable routing decisions with detailed logging
Cons
- Requires self-hosting and setup
- Limited to supported protocols (OpenAI, Anthropic, Bedrock)
- Not an agent orchestrator; no prompt inspection or rewriting
What is Millwright best for?
- Teams managing LLM costs
- Developers needing policy-based routing
- Enterprises requiring self-hosted privacy