← Reddit

I built a free, self-hosted gateway so I never hit a Claude limit mid-session — it fails over across 237 providers, and can share one Claude Max across a team (MIT)

Reddit · ZombieGold5145 · July 2, 2026
A developer created a free, self-hosted gateway that routes Claude API requests across multiple providers and models, automatically switching to alternatives when hitting rate limits or quota constraints during active sessions. The system enables teams to share a single Claude subscription through weighted quota management and includes a compression pipeline that reduces token usage by up to 89%, and has accumulated approximately 9,800 GitHub stars since launch.

Detailed Analysis

A developer has released an open-source, MIT-licensed gateway designed to solve two persistent pain points for heavy Claude and Claude Code users: hitting usage limits mid-session and inefficient quota consumption across teams. Built over roughly 4.5 months, the self-hosted tool sits between the user and Anthropic's API, routing requests through a configurable ladder of fallback providers — starting with the user's own subscription, then API keys, then cheaper models, and finally free alternatives. The project claims support for 237 providers and 17 distinct routing strategies, with resilience mechanisms like circuit breakers, per-key cooldowns, and model lockouts intended to prevent a single failed request or dead API key from disrupting an entire workflow. According to the maintainer, the tool has already attracted meaningful traction: nearly 9,800 GitHub stars, over 1,490 forks, 280+ contributors, and more than 21,000 automated tests.

The gateway's two headline features address distinct but related problems. "Fallback combos" let a session seamlessly slide to a backup model or provider the instant a rate limit or server error is hit, without the calling tool ever seeing the failure — effectively making Claude Code sessions resilient to Anthropic outages or quota exhaustion. "Quota-Share" tackles a team-level inefficiency: rather than each team member burning a separate subscription or API allotment, a single Claude Max or Pro subscription can be pooled across a group of keys with weighted fairness rules (e.g., 50/30/20 splits) and configurable hard, soft, and burst limits. This effectively turns an individual subscription into a shared team resource, which could have real economic implications for organizations paying for multiple seats when usage is bursty and uneven across members.

Perhaps the more technically distinctive component is the ten-engine compression pipeline, which transparently reduces token usage before requests reach the model. By combining multiple purpose-built compression techniques — RTK for structured command/tool output like git diffs and test logs, Microsoft's LLMLingua-2 for semantic pruning of natural language, and other tools for prose and cross-turn deduplication — the pipeline claims an average 89% reduction in input tokens for tool-heavy coding sessions, while preserving code, URLs, and JSON byte-for-byte. A built-in "inflation guard" ensures the system never sends a compressed version that's larger than the original, avoiding a common failure mode of naive compression schemes. This kind of aggressive, multi-layered token optimization reflects a broader recognition that as agentic coding workflows generate massive volumes of tool output (diffs, logs, build results), raw context windows and per-token costs become a binding constraint independent of model capability.

This project fits into a broader pattern emerging around Claude Code and similar agentic coding tools: as developers increasingly treat LLMs as always-on infrastructure rather than occasional chat interfaces, the friction points shift from "is the model good enough" to "is the service reliable and affordable enough to run continuously." Usage caps, rate limits, and per-seat subscription costs become operational bottlenecks in a way they weren't for casual chatbot use, spawning a cottage industry of proxies, routers, and quota-sharing tools built by the community rather than the vendor. Anthropic itself has not endorsed or built this tool, and self-hosted gateways that pool subscriptions across users sit in something of a gray area relative to typical terms of service for consumer/team subscription tiers, even when technically not violating API terms directly. Nonetheless, the rapid organic adoption — thousands of stars and hundreds of contributors in under five months — signals genuine unmet demand among power users and teams for infrastructure-level resilience and cost control around frontier coding assistants, a dynamic likely to recur as more organizations build critical workflows atop rate-limited, subscription-gated AI services.

Read original article →