展示HN:UnifyRoute – 自托管的OpenAI兼容LLM网关,支持故障转移

1作者: unifyroute27 天前原帖
嗨,HN, 我创建了UnifyRoute,因为我不断遇到同样的问题:速率限制、配额耗尽和服务提供商的故障在最糟糕的时刻破坏了我的基于大型语言模型(LLM)的应用程序。 UnifyRoute是一个自托管的网关,位于您的LLM提供商(如OpenAI、Anthropic等)前面,自动处理路由、故障转移和配额管理——并且提供完全兼容OpenAI的API,因此您无需更改现有代码的任何一行。 它的功能包括: - 即插即用的OpenAI兼容API(/chat/completions、/models等) - 基于层级的路由:定义尝试哪些提供商及其顺序 - 当提供商失败或达到配额时自动故障转移 - Web仪表板用于管理提供商、凭证和使用情况 - 自托管——您的API密钥永远不会离开您的基础设施 - 适用于任何支持OpenAI API的工具(LangChain、LlamaIndex等) 快速开始(Docker): ``` git clone https://github.com/unifyroute/UnifyRoute.git cd UnifyRoute && cp sample.env .env ./unifyroute setup && ./unifyroute start # 仪表板地址 http://localhost:6565 ``` 它是基于Apache 2.0的开源项目。 欢迎提问关于架构或设计决策的问题。 [https://github.com/unifyroute/UnifyRoute](https://github.com/unifyroute/UnifyRoute)
查看原文
Hey HN,<p>I built UnifyRoute because I kept running into the same problem: rate limits, quota exhaustion, and provider outages were breaking my LLM-powered apps at the worst times.<p>UnifyRoute is a self-hosted gateway that sits in front of your LLM providers (OpenAI, Anthropic, etc.) and handles routing, failover, and quota management automatically — with a fully OpenAI-compatible API, so you don&#x27;t change a single line of your existing code.<p>What it does: - Drop-in OpenAI-compatible API (&#x2F;chat&#x2F;completions, &#x2F;models, etc.) - Tier-based routing: define which providers to try and in what order - Automatic failover when a provider fails or hits quota - Web dashboard to manage providers, credentials, and usage - Self-hosted — your API keys never leave your infrastructure - Works with any tool that supports OpenAI&#x27;s API (LangChain, LlamaIndex, etc.)<p>Quick start (Docker): git clone <a href="https:&#x2F;&#x2F;github.com&#x2F;unifyroute&#x2F;UnifyRoute.git" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;unifyroute&#x2F;UnifyRoute.git</a> cd UnifyRoute &amp;&amp; cp sample.env .env .&#x2F;unifyroute setup &amp;&amp; .&#x2F;unifyroute start # Dashboard at http:&#x2F;&#x2F;localhost:6565<p>It&#x27;s open source under Apache 2.0.<p>Happy to answer questions about the architecture or design decisions.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;unifyroute&#x2F;UnifyRoute" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;unifyroute&#x2F;UnifyRoute</a>