← all repositories
ding113/claude-code-hub

An open-source control plane for AI API chaos

Routes requests across Claude, Codex, Gemini and OpenAI-compatible endpoints while tracking costs, enforcing limits, and failing over automatically.

3.3k stars TypeScript Coding AssistantsLLMOps · Eval
claude-code-hub
Not currently ranked — collecting fresh signals.
star history

What it does Claude Code Hub is a self-hosted gateway that sits between your team and a mix of LLM providers—Claude, Codex, Gemini, or any OpenAI-compatible endpoint. It handles routing, circuit-breaker failover, usage metering, and rate limiting through a Hono proxy pipeline backed by PostgreSQL and Redis, with a Next.js 15 dashboard for live monitoring and cost attribution.

The interesting bit The README opens with six affiliate API-reseller promotions before the first feature list, which tells you exactly who this is built for: teams that need to hop between regional relay providers and official APIs without changing client code. It treats rate limits and price arbitrage as first-class problems.

Key highlights

  • Weighted, priority-based load balancing with circuit breakers and up to three automatic retries across provider groups
  • Granular rate limiting (RPM, spend caps, concurrent sessions) enforced via Redis Lua scripts with fail-open degradation
  • Auto-generated OpenAPI 3.1 docs and Swagger/Scalar UI from 39 internal Server Actions endpoints
  • Five-minute session context cache that records full decision chains for audit and cost attribution
  • Strict OpenAI-compatible /v1/chat/completions routing without cross-format translation

Caveats

  • Documentation is heavily interleaved with affiliate promotions for external API resellers
  • Architecture details and advanced configuration are truncated in the provided README
  • UI and primary documentation are Chinese-first, which may add friction for English-only operators

Verdict Grab it if you manage multiple provider keys and need a single internal endpoint with spend tracking and automatic failover. Pass if you already have a cloud-native gateway or just want a thin reverse proxy.

Frequently asked

What is ding113/claude-code-hub?
Routes requests across Claude, Codex, Gemini and OpenAI-compatible endpoints while tracking costs, enforcing limits, and failing over automatically.
Is claude-code-hub open source?
Yes — ding113/claude-code-hub is open source, released under the MIT license.
What language is claude-code-hub written in?
ding113/claude-code-hub is primarily written in TypeScript.
How popular is claude-code-hub?
ding113/claude-code-hub has 3.3k stars on GitHub.
Where can I find claude-code-hub?
ding113/claude-code-hub is on GitHub at https://github.com/ding113/claude-code-hub.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.