ccLoad: An AI API Gateway That Routes Around Broken Upstreams Instead of Waiting for You
AI API gateway that ends manual channel switching with smart routing, auto failover, exponential cooldown, multi-URL scheduling, live request monitoring and soft-error detection.
At a glance
- What is it?
- ccLoad is a Go-based gateway that puts Claude Code, Codex, Gemini, and OpenAI clients behind one proxy, with model-scoped cooldowns, multi-URL scheduling, and soft-error detection. It is a serious operational tool, but its complexity and OAuth surface demand careful review before adoption.
- Who is it for?
- Adopt ccLoad if you run multiple AI API channels and need automatic failover, model-scoped cooldown, and live request visibility without writing client-side logic. Do not adopt it if you have a single upstream and a simple proxy need, or if you cannot tolerate the operational overhead of a gateway with embedded SQLite, OAuth credential management, and WebSocket bridging.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Star history
- caidaoli/ccLoad426 ★ · +31
| Repository | 2026-08-26 | 2026-10-23 |
|---|---|---|
| caidaoli/ccLoad | 395 | 426 |
31 Stars in the last 58 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The Problem: Manual Channel Switching Is a Tax on AI Workflows
The README targets a specific pain: running several AI API channels with different keys, quotas, validity windows, and upstream URLs. Without a gateway, a developer must either hard-code one provider and hope it stays healthy, or write custom retry and failover logic into every client script. ccLoad moves that logic into a single service. It is for teams or individuals who use Claude Code, Codex, Gemini, or OpenAI-compatible clients and want one stable endpoint. The documentation lists common failure modes: 429 rate limits, 502 and 504 upstream errors, expired keys, and overloaded providers. It also names a subtler case: some upstreams return HTTP 200 while the body is actually an error. That is the kind of failure that a naive proxy will pass through silently, and it is the core reason ccLoad exists.
How Routing and Cooldown Actually Work
The routing mechanism is more granular than a simple round-robin. Channels are selected by priority first, and channels at the same priority use smooth weighted round-robin. The README mentions pre-filtering of cooled channels and health-based dynamic sorting, with a confidence factor that prevents small samples from over-penalizing a channel. The key design choice is model-scoped cooldown. Structured model_cooldown responses, upstream 5xx, key-level 429, model-unavailable 404, and model-retirement 410 errors cool only the actual upstream model first. Other models on the same channel stay available. The channel is promoted to cooldown only after every configured model or every enabled key is cooling. That is a deliberate trade-off: it keeps a single bad model from taking down a whole channel, but it also means the gateway must classify errors correctly. Misclassification could leave a failing model in rotation longer than a channel-wide cooldown would allow.
Multi-URL Scheduling and Protocol Transformation
A single channel can use multiple upstream URLs, weighted by observed latency and health. Each URL can declare the wire protocols it accepts. Explicit declarations route directly. An empty declaration tries the client protocol first and caches the working fallback. This is practical for providers that expose both native WebSocket and HTTP/SSE transports. The README also describes Responses WebSocket bridging: authenticated Codex clients keep a downstream WebSocket while each candidate uses native Codex WebSocket or the existing HTTP/SSE transport. That is a non-trivial feature, and it is the kind of thing that sounds simple in a bullet point but requires careful state management in practice. The documentation does not describe the exact fallback logic beyond "transcript-aware failover," so you should test it with your actual Codex client before relying on it.
Getting It Running: Deployment and Configuration
The repository does not include a full installation guide in the cleaned README, but it does state that deployment is simple, with embedded SQLite and a Cursor SDK Bridge that is managed automatically when needed. The primary language is Go, and the README references Gin as the web framework and Docker Hub for images. Build tags are supported via GOTAGS, and the project uses a high-performance JSON library. The release history shows active development, with v4.9.1-beta.1 pushed on 2026-08-29. To run it, you would clone the repository, build with Go, or pull a Docker image. Configuration likely involves setting upstream channels, keys, URLs, and priorities, but the README does not show a sample config file. You should check the repository's docs or examples for the exact YAML or JSON schema before deploying.
Soft-Error Detection: The Feature That Justifies the Gateway
The most distinctive capability is soft-error detection. The README lists concrete cases: JSON responses containing an error structure, responses with a type field set to error, explicit rate limits in SSE error events such as rate_limit_exceeded or too_many_requests (handled as 429), and plain text messages like "当前模型负载过高" or "Current model load too high". This is not a generic "detect anomalies" claim; it is a specific set of patterns. The value is that a 200 response that is actually an error triggers the same failover path as a regular upstream failure. Without this, a client would receive a 200 with an error body and might treat it as a successful completion. The README does not list all possible patterns, so you must verify that your upstreams' error bodies match these cases. If an upstream returns a different error shape, ccLoad will pass it through as a success.
Limitations and Wrong-Tool Cases
ccLoad is not a lightweight reverse proxy. It carries significant operational weight: embedded SQLite, OAuth credential management for Codex, Anthropic, Antigravity, xAI, Z.ai, Cursor, and Zed, plus batch quota refresh and auto-disable for rejected credentials. That is a lot of moving parts. If you only have one upstream and one key, this gateway is overkill. The documentation also notes that OAuth quota cost tracking aligns to upstream quota windows and supports manual Codex quota reset, but it does not explain the failure mode when a provider revokes a credential mid-session. The README claims race-safe key selection and startup config validation, but it does not describe the testing coverage or the exact conditions under which a channel is marked unhealthy. The confidence factor in health-based sorting suggests that small samples are protected, but the threshold is not documented. You must test with your own traffic patterns.
Alternatives: What Else Does This Job?
The obvious alternative is to write failover logic in each client, or to use a general-purpose API gateway like Kong or Traefik with custom plugins. The difference in approach is that those gateways are protocol-agnostic and do not understand AI-specific error semantics. They will route on HTTP status codes, but they will not classify a 200-with-error-body as a failure. They also will not implement model-scoped cooldown, because they have no concept of a model. Another alternative is to use a provider's own multi-region or load-balancing features, but that ties you to one vendor. ccLoad's approach is to centralize AI-specific intelligence in one service, which is a real difference. The trade-off is that you must maintain that intelligence yourself, and the README shows that the project is evolving quickly, so you will need to track releases.
Maintenance, License, and Upgrade Cost
The project is licensed under MIT, which is permissive and imposes few restrictions beyond preserving the license notice. The maintenance cost is visible in the release cadence: three releases in two days, including a beta. That suggests active development, but also that the project may not be stable. You should pin a specific version and test before upgrading. The README mentions that the project was built with Codex and GPT-5.6, and that AGENTS.md and CLAUDE.md contain engineering constraints. That is a signal that the codebase is designed to be modified by AI agents, which could be a benefit or a risk depending on your review process. The embedded SQLite means no external database to manage, but it also means you need to handle backups and migrations yourself. The Cursor SDK Bridge is managed automatically, but that automation is another component to trust. Before adopting, check the repository for a changelog or migration notes between versions, since the README does not include them.
Editorial conclusion
Adopt ccLoad if you run multiple AI API channels and need automatic failover, model-scoped cooldown, and live request visibility without writing client-side logic. Do not adopt it if you have a single upstream and a simple proxy need, or if you cannot tolerate the operational overhead of a gateway with embedded SQLite, OAuth credential management, and WebSocket bridging. Before deploying, verify the exact behavior of the exponential-backoff policy for your error mix, test the soft-error detection against your upstreams' actual 200-with-error responses, and confirm the OAuth refresh flows for the providers you use, since the README only claims support, not guarantees.
Frequently asked questions
What does ccLoad do and which clients can use it?
It is a Go AI API gateway that keeps Claude Code, Codex, Gemini and OpenAI-compatible clients on a single endpoint, handling upstream selection, failover, cooldown, protocol conversion, request visibility and cost limits in the service instead of in client scripts.
How does ccLoad decide whether to cool down one model or the whole channel?
Model-scoped failures including 5xx, key-level 429, model-unavailable 404 and model-retirement 410 cool only that upstream model first, and the channel itself is promoted to cooldown only after every configured model or every enabled key is cooling. An explicit upstream reset deadline takes priority over the shared exponential-backoff policy.
Does ccLoad store data in SQLite by default?
Yes. The default is an embedded SQLite file at ./data/ccload.db with no separate database container, and MySQL and PostgreSQL are optional mutually exclusive alternatives that require their own DSN.
What authentication does ccLoad require?
The admin password comes from the required CCLOAD_PASS variable and the program exits when it is unset, while API access uses tokens managed from the web interface or preloaded at startup. A password containing a dollar sign must be single quoted or Compose will interpolate it and truncate the value.
Which upstream credentials can ccLoad manage?
OAuth channels cover Codex, Anthropic, Antigravity and xAI with refresh where supported, plus Codex personal access tokens, Z.ai Coding Plan authorization, Cursor API keys and Zed native sign-in bound to a real installation's system_id, with per-credential quota cost tracking against upstream windows.
How current is the ccLoad codebase?
The repository is not archived and its last push is dated 2026-10-01, with three beta tags published around that time including v4.10.30-beta.5. The module targets Go 1.27.0 and the release line is still carrying a beta suffix.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/caidaoli-ccload)Star history chart for your README
[](https://hysenlabs.com/projects/caidaoli-ccload)Was this useful?