Find the expensive workloads and model the savings.
millwright analyze turns existing Anthropic, OpenAI-compatible, or Millwright logs into a local report: which workload cohorts cost the most and how selected candidate-model economics compare.
Every estimate includes its coverage, price source, and assumptions. Candidate costs are modeled, not realized savings. Quality remains explicitly unverified until you evaluate representative work.
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.
An illustrative mid role for day-to-day coding and tool use. A valid affinity lane reuses its confirmed provider and model for the role-specific TTL.
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.
When a request cannot be translated faithfully, Millwright rejects it explicitly instead of silently changing its meaning.
Drop into Claude Code and Codex.
Millwright speaks the APIs your agents already use, so nothing about the workflow changes. Point Claude Code at the Messages surface or Codex at Chat Completions, and the model picker you already use becomes the tier switch: your main work runs on the role you choose, background chores fall to the cheap role automatically, and policy floors keep planning and high-risk work on frontier.
Switch tiers mid-session with /model, or steer any harness you control with X-Millwright-Task-Type and X-Millwright-Risk headers. Full setup for Claude Code, Codex, OpenCode, and Pi is in the docs.
A policy-approved route, role-scoped affinity, and evidence you can inspect.
Each response exposes the chosen model, provider, trace ID, and route reason. Role-scoped affinity keeps cheap, mid, and frontier routes independent, and retryable failures may receive one alternate attempt. Configured storage retains detailed traces and cost evidence for completed inference calls.
Read the chosen model, provider, trace ID, and route reason from the response.
Inspect measured usage and cost provenance for completed inference calls.
Trace the resolved role, provider attempts, and alternatives the router considered.
Built for concurrent traffic.
Millwright runs as one self-hosted Rust binary. Its router never holds a lock across provider I/O, supported streams are forwarded incrementally, and a configurable global concurrency limit provides backpressure.
No classifier in the hot path.
Millwright routes from explicit task and risk metadata, model aliases, and your policy. It does not 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 adding a per-session lock or serializing upstream requests.
We don't promise a savings number.
Millwright shows its work.
Point Millwright at your own logs to measure current spend and model selected alternatives. Coverage, price sources, and assumptions remain visible; candidate quality remains unverified until you test a representative sample in an approved evaluation harness. Evidence over claims.