Awesome Infra for AI › LLM Gateways & Proxies

zxcloli666/AI-Worker-Proxy

⭐ 104 TypeScript repository created 2025-11-01

AI Worker Proxy is an LLM gateway deployed as a single Cloudflare Worker that presents one OpenAI-compatible API, plus a separate Anthropic Messages-compatible endpoint, in front of multiple upstream LLM providers: OpenAI, Anthropic Claude, Google Gemini, and local or self-hosted OpenAI-compatible models. It is installed by forking the repository, adding a Cloudflare account ID and API token as GitHub secrets, and running a bundled GitHub Actions workflow that deploys the Worker to Cloudflare's free tier (up to 100k requests per day, no servers to manage). Provider API keys and a single client-facing PROXY_AUTH_TOKEN are then set as Worker environment variables. Requests are routed by a named-route table - for example a "super-brain" or "cheap-fast" alias mapping to a specific provider, model, and list of API keys - defined in routes.json. The gateway rotates through the multiple keys configured for a provider to avoid hitting per-key rate limits, and fails over to another configured provider automatically if one is unavailable, aiming for uninterrupted availability from the client's point of view. Routing can be changed without touching code or committing anything: the configuration is stored as a GitHub Actions repository variable (ROUTES_CONFIG, splittable across ROUTES_CONFIG_2 through _9 for larger JSON payloads) and redeployed by re-running the Actions workflow, which writes it into routes.json and bundles it into the Worker. Clients talk to the gateway with the standard OpenAI SDK, or the Anthropic SDK against the /anthropic path, by pointing base_url at the deployed Worker and using the shared PROXY_AUTH_TOKEN as the API key; any OpenAI-compatible chat client (Chatbox, NextChat, TypingMind, etc.) can also be pointed at it directly. The project is MIT-licensed.

https://github.com/zxcloli666/AI-Worker-Proxy

llm gatewayapi proxycloudflare workersfailoverkey rotationopenai compatibleanthropic api

Also in LLM Gateways & Proxies

diegosouzapw/OmniRoute

OmniRoute is a free AI gateway that unifies access to over 170 AI providers, offering token compression, auto-fallback, and aggregating free tiers to provide billions of free tokens monthly.

Mintplex-Labs/anything-llm

AnythingLLM is an all-in-one local-first AI application for chatting with documents, managing AI agents, and integrating with various LLMs and vector databases, offering dynamic model routing and m...

BerriAI/litellm

LiteLLM is an open-source AI Gateway and Python SDK providing a unified interface to over 100 LLM providers, with features like cost tracking, guardrails, load balancing, and observability.

QuantumNous/new-api

new-api is a unified LLM gateway and AI asset management system that enables aggregation, distribution, and cross-conversion of various LLMs into OpenAI, Claude, or Gemini compatible formats, offer...

Kong/kong

Kong Gateway is a cloud-native API and AI gateway offering high performance, extensibility via plugins, and advanced AI traffic capabilities including multi-LLM support, semantic security, and cach...

decolua/9router

9Router is an AI router and token saver that connects various AI coding tools to over 40 AI providers, optimizing usage with auto-fallback, quota tracking, and token compression.

apache/apisix

Apache APISIX is a dynamic, real-time, high-performance API Gateway that can also function as an AI Gateway, providing AI proxying, load balancing for LLMs, and robust security for AI agents.

lidge-jun/opencodex

OpenCodex is a universal local proxy that enables OpenAI Codex, Claude Code, and Grok Build to utilize any LLM provider, offering advanced model routing, account pooling, and API key management.