cd /news/artificial-intelligence/show-hn-millwright-rust-based-self-h… · home topics artificial-intelligence article
[ARTICLE · art-69096] src=github.com ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Show HN: Millwright – Rust-based, self-hosted LLM router

A developer released Millwright, an open-source, self-hosted LLM router built in Rust, designed to sit between coding agents and GenAI workloads for cost savings and transparency. The tool supports providers including OpenAI, Anthropic, and Amazon Bedrock, and offers features such as policy-controlled routing, cache affinity, spend tracking, and cost analysis.

read1 min views1 publishedJul 22, 2026

Hey HN,

With the news of OpenRouter possibly being acquired and proliferation of hosted LLM routers (i.e. Ramp Router, Vercel’s AI Gateway), I saw the need for a self hosted solution focused on cost savings, transparency, and performance. So, I built an open sourced router with a simple CLI interface that can easily sit between coding agents and GenAI workloads.

For the curious and lazy, at the moment, Millwright has the tools for,

  • Providers: OpenAI-compatible APIs, Anthropic, Amazon Bedrock

  • Routing: policy-controlled model roles (cheap, mid, frontier), cheapest healthy route selection

  • Protocols: OpenAI Chat Completions, Anthropic Messages, text and tool translation

  • Cache Affinity: role-scoped session lanes without serializing concurrent agent traffic

  • Spend Tracking: per-team costs, cache usage, model/provider mix, request traces

  • Cost Analysis: measured usage and modeled candidate economics (HTML, Markdown, JSON)

  • Reliability: bounded failover, circuit breakers, timeouts, concurrency limits

  • Setup: interactive provider, model, and pricing configuration without storing provider secrets

  • Deployment: one Rust binary, Docker, SQLite or PostgreSQL

Full disclosure: parts of the codebase were built with AI coding agents. All feedback is welcome, I’d especially value feedback on the routing policy, provider coverage, and anything that would block you from self-hosting it. Feel free to open feature/request and/or contribute as well.

Comments URL: [https://news.ycombinator.com/item?id=49011806](https://news.ycombinator.com/item?id=49011806)

Points: 2

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @millwright 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-millwright-r…] indexed:0 read:1min 2026-07-22 ·