Stars
Forks
Watchers
Developer links
ccLoad
An upstream dies mid-stream. The session does not have to. ccLoad is a self-hosted AI gateway that stands between your coding agents and every key, relay, and subscription you own, retrying the next source before the first byte reaches your client. Claude Code, Codex, Gemini, and OpenAI-compatible tools all point at one address and present one ccLoad token. Behind it, each source becomes a channel with a model list, a priority, and health-based ordering. Requests are matched by the model name the client asked for. Protocol differences disappear in transit, with Anthropic, OpenAI, Codex Responses, and Gemini converted in either direction, streamed responses included. Failure gets a narrow blast radius. A revoked key cools down alone, a failing model cools down alone, and a dead URL cools down alone, each with exponential backoff that respects upstream reset times. Errors disguised as successful responses still trigger failover. Subscription accounts work as channels beside API keys, tokens refresh on their own, and quota use is tracked against each provider's reset window. Every request lands in the logs with its cost, priced with cache reads, cache writes, and long-context tiers included. Tokens carry model restrictions, budgets, and concurrency caps. Channels carry daily spend limits. Sensitive text can be masked on the way out and restored on the way back. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.
Benefits
- Sessions survive upstream failures
- A failed upstream is retried on the next candidate before the first byte reaches your client, and soft errors hidden in 200 responses or streams trigger the same failover path.
- Subscriptions become channels
- Codex, Claude, Antigravity, xAI, Cursor, Zed, and other account credentials sit beside API keys and relays as channels, with automatic token refresh and quota windows tracked.
- Cost you can check and cap
- Every request is priced with cache and long-context tiers accounted for, and spending can be capped per channel per day and per token in total, per day, or per month.
- Upstream keys stay hidden
- Clients only ever hold a ccLoad token with its own model, channel, and concurrency limits, and access can be revoked at any time without touching upstream credentials.
Features
- Priority and health routing
- High-priority channels go first, equal priorities share smooth weighted round-robin, and health-based sorting, scheduled checks, and CSV import and export keep many channels manageable.
- Scoped cooldown and failover
- Errors are classified by key, model, channel, or client, only the failed scope cools down with exponential backoff, and other models on the same channel keep serving.
- Four-protocol conversion
- Anthropic Messages, OpenAI Chat, Codex Responses, and Gemini clients can use every channel, with requests and streams converted when protocols differ, including Responses over WebSocket.
- Tokens with budgets
- Per-token model restrictions, channel allowlists and denylists, concurrency caps, and cost limits, plus a read-only console sign-in that shows a token only its own usage.
- Privacy masking
- Keys, passwords, personal data, and custom terms are replaced with placeholders before requests reach an upstream and restored in replies, isolated per caller token.
- Dashboard and workbench
- Active requests, trends, time to first byte, and cost by channel, model, and token, debug logs with masked headers, and a model testing workbench with chat and image upload.