0012. ai builds on CLIProxyAPI
Status: accepted, 2026-10-09
Context
The author wants an AI gateway built on CLIProxyAPI (router-for-me/CLIProxyAPI: Go, MIT): it turns
subscription CLIs (Claude Code, Codex, Gemini, Antigravity, Grok…) into OpenAI / Claude / Gemini
compatible APIs, with our own updates, quotas, analytics and quota endpoints on top.
Decision
ai embeds CLIProxyAPI as a Go module (its SDK) where possible and keeps a thin fork only for what
the SDK cannot do. Our layer: teams, keys, quotas, routing, accounts pool, usage analytics, quota
endpoints, panel. A CI job follows upstream releases and opens a merge request bumping it.
Official API keys (Anthropic, OpenAI, Google, OpenRouter, any OpenAI-compatible) are first-class
providers too.
Consequences
- Using consumer subscriptions through a proxy can break the providers' terms and get accounts banned;
the panel says so where such a provider is added. Instance owners decide.