CLIProxyAPI
AGENTS.md54k starsChanged 5 months agoMITView on GitHub
Go 1.26+ proxy server providing OpenAI/Gemini/Claude/Codex compatible APIs with OAuth and round-robin load balancing.
- Reads credentials
Trending
More talk lately.about the whole repository
Who's talking about router-for-me/CLIProxyAPI
- openai/codex“gpt-5.5 xhigh sometimes short-circuits with reasoning_output_tokens=516 and wrong final_answer in Codex …”GitHub · Jun 21, 2026 · 22 reactions
- Wei-Shaw/sub2api“连坐踢号杀号的问题, 是不是也应该借鉴隔壁来优化一下”GitHub · Jun 2, 2026 · 10 reactions
- openai/codex“Experimental context management: native notes/history return 404 on Pro + Astra, while new_context can …”GitHub · Sep 6, 2026 · 6 reactions
- farion1231/cc-switch“是否可以在cc-switch里面实现OpenAI “chat/completions” 和 “responses” 兼容适配”GitHub · May 10, 2026 · 6 reactions
- heyhuynhgiabuu/proxypal“Expose & decouple bundled cliproxyapi version (avoid waiting for Proxypal releases)”GitHub · Jan 8, 2026 · 6 reactions
The biggest 5 of 57 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 57
Talked about on GitHub and Bluesky (57 times).
On GitHub · 50
- Jun 21, 2026gpt-5.5 xhigh sometimes short-circuits with reasoning_output_tokens=516 and wrong final_answer in Codex Desktop — openai/codex22 reactions · 3 comments
- Jun 2, 2026连坐踢号杀号的问题, 是不是也应该借鉴隔壁来优化一下 — Wei-Shaw/sub2api10 reactions · 2 comments
- Sep 6, 2026Experimental context management: native notes/history return 404 on Pro + Astra, while new_context can discard task state — openai/codex6 reactions · 14 comments
- May 10, 2026是否可以在cc-switch里面实现OpenAI “chat/completions” 和 “responses” 兼容适配 — farion1231/cc-switch6 reactions · 15 comments
- Jan 8, 2026Expose & decouple bundled cliproxyapi version (avoid waiting for Proxypal releases) — heyhuynhgiabuu/proxypal6 reactions · 5 comments
45 more on GitHub
- Jun 17, 2026cliproxyapi: init at 7.2.146 — NixOS/nixpkgs4 reactions · 7 comments
- May 19, 2026docs(readme): restore 9router acknowledgment — cheaper-inference/OmniRoute4 reactions · 1 comment
- Jun 20, 2026feat: expose weighted routing configuration — router-for-me/Cli-Proxy-API-Management-Center3 reactions
- May 18, 2026feat(qoder): add Qoder as a first-class auth provider — kaitranntt/CLIProxyAPIPlus3 reactions · 2 comments
- Jan 12, 2026Feature Request: Add CCS and CLIProxyAPI for Multi-Provider AI Support — AutoMaker-Org/automaker3 reactions · 5 comments
- Oct 27, 2026CLIProxyAPI usage hub as an account source in the new OpenUsage — robinebers/openusage2 reactions · 4 comments
- Sep 23, 2026fix: preserve native fallback policy and route scroll position — markhuangai/cpa-plugin-model-router2 reactions · 1 comment
- Sep 4, 2026[Bug]: CLIProxyAPI usage sources call a quota endpoint absent from official releases — pingdotgg/t3code2 reactions · 3 comments
- Sep 2, 2026feat(antigravity): add Gemini 3.8 Flash medium model — router-for-me/models2 reactions · 1 comment
- Jul 29, 2026Add GitHub Copilot OAuth provider — devkade/CLIProxyAPI2 reactions
- May 24, 2026fix: accept responses path appended to chat completions base — jlcodes99/cockpit-tools2 reactions · 1 comment
- May 20, 2026[FEATURE] Support Google Antigravity CLI 2.0 and Session Extraction — cheaper-inference/OmniRoute2 reactions · 4 comments
- Feb 25, 2026New lxc : CLIProxyAPI — community-scripts/DevScripts2 reactions · 2 comments
- Jan 8, 2026fix(antigravity): update handling for new Antigravity API structure — shekohex/opencode-google-antigravity-auth2 reactions
- Jan 8, 2026[Bug]: Rate limited due to new api structure — shekohex/opencode-google-antigravity-auth2 reactions · 38 comments
- Nov 9, 2026chore(pool): update CLIProxyAPI — JustYannicc/basalt1 reaction
- Nov 5, 2026fix(anthropic): normalize caller instructions in translated OAuth requests — lidge-jun/opencodex1 reaction · 9 comments
- Nov 3, 2026fix(devin): use 127.0.0.1 OAuth redirect URI — tbphp/gpt-load1 reaction · 1 comment
- Oct 19, 2026Claude Code 网关模型发现(gateway model discovery)不显示任何模型 —— 建议适配其模型 ID 过滤规则 — yetone/magpie1 reaction · 2 comments
- Oct 16, 2026添加对CPA的特殊格式支持 — HOWILLMAKEIT/dsh-model-context-catalog1 reaction · 2 comments
- Oct 10, 2026Stop two dashboard tabs overwriting each other's saved views — btjc517/cliproxy1 reaction · 3 comments
- Oct 5, 2026chore(deps): consolidate Dependabot #150 and #151 — stefandevo/claude-dialects1 reaction · 1 comment
- Sep 29, 2026feat(codex): add GPT-6.1 Sol to model catalogs — router-for-me/models1 reaction · 1 comment
- Sep 28, 2026chore(deps): consolidate Dependabot #145, #146, and #147 — stefandevo/claude-dialects1 reaction · 1 comment
- Sep 26, 2026Adding CLIProxyAPI hub pools support on the Dynamic Island AI page — vorssaint/vorssaint-utils1 reaction
- Sep 23, 2026Update dialect presets to current flagship models — stefandevo/claude-dialects1 reaction · 1 comment
- Sep 22, 2026chore(deps): consolidate Dependabot #134, #136, and #139 — stefandevo/claude-dialects1 reaction · 1 comment
- Sep 14, 2026chore(deps): consolidate Dependabot #134–#136 — stefandevo/claude-dialects1 reaction · 4 comments
- Sep 12, 2026[Bug] v0.3.1425 hangs during CPA v7.2.158 startup; rollback to v0.3.1404 recovers — Mxucc/cpa-account-config-manager1 reaction · 1 comment
- Sep 8, 2026Fix release provenance for plugin-store review — tsunheimat/cpa-courrency-plugin1 reaction · 1 comment
- Sep 7, 2026#132 - Bump CLIProxyAPI v7.2.149 and dashboard npm dependencies — stefandevo/claude-dialects1 reaction · 1 comment
- Aug 31, 2026chore(deps): bump CLIProxyAPI to 7.2.144, codeql-action to v4.37.9, and 7 dashboard deps - #128 — stefandevo/claude-dialects1 reaction · 1 comment
- Aug 31, 2026Add CPA Account Concurrency plugin to the official registry — router-for-me/CLIProxyAPI-Plugins-Store1 reaction · 5 comments
- Aug 28, 2026feat(accounts): render provider-neutral plugin quotas — seakee/CPA-Manager-Plus1 reaction · 1 comment
- Aug 21, 2026#113 - Consolidate Dependabot dependency bumps — stefandevo/claude-dialects1 reaction · 1 comment
- Aug 5, 2026#80 - Bump CLIProxyAPI to v7.2.111 — stefandevo/claude-dialects1 reaction · 1 comment
- Jul 31, 2026#73 - Bump `github.com/router-for-me/CLIProxyAPI/v7` 7.2.102 → 7.2.104 — stefandevo/claude-dialects1 reaction · 1 comment
- Jul 20, 2026feat(concurrency): add credential in-flight leases and limits — router-for-me/CLIProxyAPIHome1 reaction
- Jul 13, 2026fix(models): Gemini 3.1 Flash Lite GA + legacy preview alias — router-for-me/models1 reaction · 1 comment
- May 7, 2026Fix compatibility issues with the script on Alpine Linux — router-for-me/cliproxyapi-installer1 reaction
- Apr 30, 2026[Feature Request] Per-account proxy configuration for OAuth accounts — quanpersie2001/cliproxyapi-dashboard1 reaction · 1 comment
- Apr 14, 2026[Feature] Hope the App Store can support CLIProxyAPI — 1Panel-dev/1Panel1 reaction · 1 comment
- Feb 15, 2026feat(iflow): add support for new models (glm-5, minimax-m2.5, qwen3-32b, tstars2.0, iflow-rome-30ba3b) — Mirrowel/LLM-API-Key-Proxy1 reaction · 2 comments
- Feb 10, 2026[Bug] Gemini 3 Flash via Antigravity returns 400 "Request contains an invalid argument" in OpenAI compatibility mode — decolua/9router1 reaction · 6 comments
- Jan 6, 2026[BUG] The response speed is extremely slow. — NoeFabris/opencode-antigravity-auth1 reaction · 2 comments
On Bluesky · 7
- Sep 24, 2026github.com/router-for-m... there is so much sketchy advertising all over it but this is what we used. @callie.on-her.computer has her own… — @okami.mom2 likes and reposts · 1 reply
- Apr 24, 2026I do something similar using github.com/router-for-m... With the oauth Claude sub and codex auth subagents — @emmnigma.bsky.social2 likes and reposts
- Aug 5, 2026CLIProxyAPI (⭐️ 46184) Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build as an OpenAI/Gemini/Claude/Codex compatible API service,… — @golangoss.bsky.social1 likes and repost
- Jul 29, 2026https://github.com/router-for-me/CLIProxyAPI — @sigmanor.net1 likes and repost
- Sep 25, 2026CLIProxyAPI (⭐️ 53149) Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Davin as an OpenAI/Gemini/Claude/Codex… — @golangoss.bsky.social0 likes and reposts · 1 reply
2 more on Bluesky
- Jul 19, 2026Today, I managed to use github.com/router-for-... to achieve full third-party (Fable and Grok 4.5) integration with Codex subagents. — @jnardiello.bsky.social0 likes and reposts · 1 reply
- Jul 2, 2026一次ソースで確認できたCLIProxyAPIの実体はかなり明快でした。MIT、38.9k stars、OpenAI/Gemini/Claude/Codex/Grok互換、OAuth対応、複数アカウントのラウンドロビン。ここは本当です。… — @mint-echosphere.bsky.social0 likes and reposts · 1 reply
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 1 is common, 3 are distinctive, and 5 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Default config: config.yaml (template: config.example.yaml)
- Distinctive: line 45
Keep changes small and simple (KISS)
- Distinctive: line 47
If editing code that already contains non-English comments, translate them to English (don’t add new non-English comments)
- Very specific: line 51
If a task requires changing only internal/translator/, run gh repo view --json viewerPermission -q .viewerPermission to confirm you have …
- Very specific: line 54
Follow gofmt; keep imports goimports-style.
- Very specific: line 55
Do not use log.Fatal/log.Fatalf (terminates the process).
- Common: line 58
Use logrus structured logging.
- Distinctive: line 59
Avoid panics in HTTP handlers.
- Very specific: line 61
Avoid wall-clock time.Sleep in TTL, expiration, ordering, or cache-eviction unit tests due to platform timer granularity (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Go 1.26+ proxy server providing OpenAI/Gemini/Claude/Codex compatible APIs with OAuth and round-robin load balancing.
Repository
Commands
gofmt -w . # Format (required after Go changes)
go build -o cli-proxy-api ./cmd/server # Build
go run ./cmd/server # Run dev server
go test ./... # Run all tests
go test -v -run TestName ./path/to/pkg # Run single test
go build -o test-output ./cmd/server && rm test-output # Verify compile (REQUIRED after changes)- Common flags:
--config <path>,--tui,--standalone,--local-model,--no-browser,--oauth-callback-port <port>
Config
- Default config:
config.yaml(template:config.example.yaml) .envis auto-loaded from the working directory- Auth material defaults under
auths/ - Storage backends: file-based default; optional Postgres/git/object store (
PGSTORE_*,GITSTORE_*,OBJECTSTORE_*)
Architecture
cmd/server/— Server entrypointinternal/api/— Gin HTTP API (routes, middleware, modules)internal/api/modules/amp/— Amp integration (Amp-style routes + reverse proxy)internal/thinking/— Main thinking/reasoning pipeline.ApplyThinking()(apply.go) parses suffixes (suffix.go, suffix overrides body), normalizes config to canonicalThinkingConfig(types.go), normalizes and validates centrally (validate.go/convert.go), then applies provider-specific output viaProviderApplier. Do not break this "canonical representation → per-provider translation" architecture.internal/runtime/executor/— Per-provider runtime executors (incl. Codex WebSocket)internal/translator/— Provider protocol translators (and sharedcommon)internal/registry/— Model registry + remote updater (StartModelsUpdater);--local-modeldisables remote updatesinternal/store/— Storage implementations and secret resolutioninternal/managementasset/— Config snapshots and management assetsinternal/cache/— Request signature cachinginternal/watcher/— Config hot-reload and watchersinternal/wsrelay/— WebSocket relay sessionsinternal/usage/— Usage and token accountinginternal/home/— CLIProxyAPIHome control plane integration (bootstrap, RESP communication, dispatch coordination)internal/tui/— Bubbletea terminal UI (--tui,--standalone)sdk/cliproxy/— Embeddable SDK entry (service/builder/watchers/pipeline)test/— Cross-module integration tests
Code Conventions
- Keep changes small and simple (KISS)
- Comments in English only
- If editing code that already contains non-English comments, translate them to English (don’t add new non-English comments)
- For user-visible strings, keep the existing language used in that file/area
- New Markdown docs should be in English unless the file is explicitly language-specific (e.g.
README_CN.md) - As a rule, do not make standalone changes to
internal/translator/. You may modify it only as part of broader changes elsewhere. - If a task requires changing only
internal/translator/, rungh repo view --json viewerPermission -q .viewerPermissionto confirm you haveWRITE,MAINTAIN, orADMIN. If you do, you may proceed; otherwise, file a GitHub issue including the goal, rationale, and the intended implementation code, then stop further work. internal/runtime/executor/should contain executors and their unit tests only. Place any helper/supporting files underinternal/runtime/executor/helps/.- Payload configuration MUST be the final semantic barrier before sending requests in every executor, including streaming, WebSocket, continuation, retry/fallback, image, and token-count paths where applicable. Complete all built-in payload translation, normalization, injection, and cleanup first, then evaluate and apply user payload rules exactly once to the final business payload. No subsequent logic may overwrite configured values or restore filtered fields. Only necessary transport framing, serialization, signature calculation, and read-only validation may follow without changing business payload semantics. Add regression tests when introducing or changing request-building paths to enforce this ordering.
- Follow
gofmt; keep imports goimports-style; wrap errors with context where helpful - Do not use
log.Fatal/log.Fatalf(terminates the process); prefer returning errors and logging via logrus - Shadowed variables: use method suffix (
errStart := server.Start()) - Wrap defer errors:
defer func() { if err := f.Close(); err != nil { log.Errorf(...) } }() - Use logrus structured logging; avoid leaking secrets/tokens in logs
- Avoid panics in HTTP handlers; prefer logged errors and meaningful HTTP status codes
- Timeouts are allowed only during credential acquisition; after an upstream connection is established, do not set timeouts for any subsequent network behavior. Intentional exceptions that must remain allowed are the Codex websocket liveness deadlines in
internal/runtime/executor/codex_websockets_executor.go, the wsrelay session deadlines ininternal/wsrelay/session.go, the management APICall timeout ininternal/api/handlers/management/api_tools.go, and thecmd/fetch_antigravity_modelsutility timeouts - Avoid wall-clock
time.Sleepin TTL, expiration, ordering, or cache-eviction unit tests due to platform timer granularity (e.g. Windows default timer resolution of ~15.6ms) and CI jitter under load; prefer controllable clocks (nowFunc/ mock clock), explicit timestamp manipulation, or deterministic synchronization primitives. - Note: if modifying features that involve CLIProxyAPIHome, check if corresponding updates are needed in the CLIProxyAPIHome repository.
- Endpoints under the
/v0/managementbase URL are deprecated and no longer maintained. For any feature changes, do not modify endpoints under/v0/managementunless necessary to fix compilation errors.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

