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

1作者: unifyroute大约 2 小时前
嗨,HN, 我构建了 UnifyRoute,因为我一直遇到同样的问题: 速率限制、配额耗尽和提供商中断,这些问题总是在我的 LLM 驱动的应用程序最糟糕的时候出现。 UnifyRoute 是一个自托管网关,位于您的 LLM 提供商(OpenAI、Anthropic 等)的前面,并自动处理路由、故障转移和配额管理——它具有完全兼容 OpenAI 的 API,因此您无需更改现有代码的任何一行。 它的功能: * 即插即用的 OpenAI 兼容 API(/chat/completions、/models 等) * 基于层级的路由:定义要尝试的提供商以及尝试顺序 * 当提供商发生故障或达到配额时自动故障转移 * Web 仪表板,用于管理提供商、凭据和使用情况 * 自托管——您的 API 密钥永远不会离开您的基础设施 * 适用于任何支持 OpenAI API 的工具(LangChain、LlamaIndex 等) 快速入门(Docker): ```bash 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>
查看原文
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>