Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Millwright – Rust-based, self-hosted LLM router (github.com/northwood-systems)
9 points by AndrewLiu96 1 day ago | hide | past | favorite | 6 comments
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.

 help



Personally I don't use LLMs, so I wonder what this kind of router is good for? Why not just a library?

You don't use LLMs? Even my grandma use LLMs, what's your reasons?

- I don't like to burn down the planet.

- I don't want to make myself dependant on a company from a foreign nation if I can help it.

- I want to keep the ability to use my own brain, especially given that they still are massively undercharging. So once they would start to charge the real price and my brain is gone I would have no choice and it would ruin me (I don't make that much money).

- I am very suspicious about the legal situation. How is it legal to generate software based on other software while not adhering to any license agreement? Don't say "fair use", the American government made sure that doesn't exist outside of the USA.

- I'm not your grandma.

And for outside of programming where you can't easily recognize when something is hallucinated accuracy is a huge issue. When I use Google its AI answers are often complete nonsense. I usually ignore them. Only sometimes notice the nonsense.


thank you! i find this very interesting, especially the Cache-aware concurrency .

No worries! Thank you for checking it out. The cache-aware concurrency was a ton of fun to implement

another option for on-device routers is role-model that i'm building: https://github.com/try-works/role-model



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: