Skip to content

Commit fcc3fa2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into remote-fix
2 parents b487199 + 17be644 commit fcc3fa2

45 files changed

Lines changed: 2227 additions & 1598 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG BUILD_DATE=unknown
1414

1515
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X 'main.Version=${VERSION}-plus' -X 'main.Commit=${COMMIT}' -X 'main.BuildDate=${BUILD_DATE}'" -o ./CLIProxyAPIPlus ./cmd/server/
1616

17-
FROM alpine:3.22.0
17+
FROM alpine:3.23
1818

1919
RUN apk add --no-cache tzdata
2020

@@ -32,4 +32,4 @@ ENV TZ=Asia/Shanghai
3232

3333
RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime && echo "${TZ}" > /etc/timezone
3434

35-
CMD ["./CLIProxyAPIPlus"]
35+
CMD ["./CLIProxyAPIPlus"]

README.md

Lines changed: 116 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,113 @@ This is the Plus version of [CLIProxyAPI](https://github.com/router-for-me/CLIPr
66

77
All third-party provider support is maintained by community contributors; CLIProxyAPI does not provide technical support. Please contact the corresponding community maintainer if you need assistance.
88

9-
The Plus release stays in lockstep with the mainline features.
9+
So you can use local or multi-account CLI access with OpenAI(include Responses)/Gemini/Claude-compatible clients and SDKs.
10+
11+
## Sponsor
12+
13+
[![z.ai](https://assets.router-for.me/english-5-0.jpg)](https://z.ai/subscribe?ic=8JVLJQFSKB)
14+
15+
This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN.
16+
17+
GLM CODING PLAN is a subscription service designed for AI coding, starting at just $10/month. It provides access to their flagship GLM-4.7 & (GLM-5 Only Available for Pro Users)model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences.
18+
19+
Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB
20+
21+
---
22+
23+
<table>
24+
<tbody>
25+
<tr>
26+
<td width="180"><a href="https://www.packyapi.com/register?aff=cliproxyapi"><img src="./assets/packycode.png" alt="PackyCode" width="150"></a></td>
27+
<td>Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: register using <a href="https://www.packyapi.com/register?aff=cliproxyapi">this link</a> and enter the "cliproxyapi" promo code during recharge to get 10% off.</td>
28+
</tr>
29+
<tr>
30+
<td width="180"><a href="https://www.aicodemirror.com/register?invitecode=TJNAIF"><img src="./assets/aicodemirror.png" alt="AICodeMirror" width="150"></a></td>
31+
<td>Thanks to AICodeMirror for sponsoring this project! AICodeMirror provides official high-stability relay services for Claude Code / Codex / Gemini CLI, with enterprise-grade concurrency, fast invoicing, and 24/7 dedicated technical support. Claude Code / Codex / Gemini official channels at 38% / 2% / 9% of original price, with extra discounts on top-ups! AICodeMirror offers special benefits for CLIProxyAPI users: register via <a href="https://www.aicodemirror.com/register?invitecode=TJNAIF">this link</a> to enjoy 20% off your first top-up, and enterprise customers can get up to 25% off!</td>
32+
</tr>
33+
<tr>
34+
<td width="180"><a href="https://shop.bmoplus.com/?utm_source=github"><img src="./assets/bmoplus.png" alt="BmoPlus" width="150"></a></td>
35+
<td>Huge thanks to BmoPlus for sponsoring this project! BmoPlus is a highly reliable AI account provider built strictly for heavy AI users and developers. They offer rock-solid, ready-to-use accounts and official top-up services for ChatGPT Plus / ChatGPT Pro (Full Warranty) / Claude Pro / Super Grok / Gemini Pro. By registering and ordering through <a href="https://shop.bmoplus.com/?utm_source=github">BmoPlus - Premium AI Accounts & Top-ups</a>, users can unlock the mind-blowing rate of <b>10% of the official GPT subscription price (90% OFF)</b>!</td>
36+
</tr>
37+
<tr>
38+
<td width="180"><a href="https://poixe.com/i/m8kvep"><img src="./assets/poixeai.png" alt="PoixeAI" width="150"></a></td>
39+
<td>Thanks to Poixe AI for sponsoring this project! Poixe AI provides reliable LLM API services. You can leverage the platform's API endpoints to seamlessly build AI-powered products. Additionally, you can become a vendor by providing AI API resources to the platform and earn revenue. Register through the exclusive CLIProxyAPI <a href="https://poixe.com/i/m8kvep">referral link</a> and receive a bonus of $5 USD on your first top-up.</td>
40+
</tr>
41+
<tr>
42+
<td width="180"><a href="https://coder.visioncoder.cn"><img src="./assets/visioncoder.png" alt="VisionCoder" width="150"></a></td>
43+
<td>Thanks to VisionCoder for supporting this project. <a href="https://coder.visioncoder.cn" target="_blank">VisionCoder Developer Platform</a> is a reliable and efficient API relay service provider, offering access to mainstream AI models such as Claude Code, Codex, and Gemini. It helps developers and teams integrate AI capabilities more easily and improve productivity.
44+
<p></p>
45+
VisionCoder is also offering our users a limited-time <a href="https://coder.visioncoder.cn" target="_blank">Token Plan</a> promotion: buy 1 month and get 1 month free.</td>
46+
</tr>
47+
</tbody>
48+
</table>
49+
50+
## Overview
51+
52+
- OpenAI/Gemini/Claude compatible API endpoints for CLI models
53+
- OpenAI Codex support (GPT models) via OAuth login
54+
- Claude Code support via OAuth login
55+
- Amp CLI and IDE extensions support with provider routing
56+
- Streaming and non-streaming responses
57+
- Function calling/tools support
58+
- Multimodal input support (text and images)
59+
- Multiple accounts with round-robin load balancing (Gemini, OpenAI, Claude)
60+
- Simple CLI authentication flows (Gemini, OpenAI, Claude)
61+
- Generative Language API Key support
62+
- AI Studio Build multi-account load balancing
63+
- Gemini CLI multi-account load balancing
64+
- Claude Code multi-account load balancing
65+
- OpenAI Codex multi-account load balancing
66+
- OpenAI-compatible upstream providers via config (e.g., OpenRouter)
67+
- Reusable Go SDK for embedding the proxy (see `docs/sdk-usage.md`)
68+
69+
## Getting Started
70+
71+
CLIProxyAPI Guides: [https://help.router-for.me/](https://help.router-for.me/)
72+
73+
## Management API
74+
75+
see [MANAGEMENT_API.md](https://help.router-for.me/management/api)
76+
77+
## Usage Statistics
78+
79+
Since v6.10.0, CLIProxyAPI and [CPAMC](https://github.com/router-for-me/Cli-Proxy-API-Management-Center) no longer ship built-in usage statistics. If you need usage statistics, use:
80+
81+
### [CPA Usage Keeper](https://github.com/Willxup/cpa-usage-keeper)
82+
83+
Standalone persistence and visualization service for CLIProxyAPI, with periodic data sync, SQLite storage, aggregate APIs, and a built-in dashboard for usage and statistics.
84+
85+
### [CLIProxyAPI Usage Dashboard](https://github.com/zhanglunet/cliproxyapi-usage-dashboard)
86+
87+
Local-first usage and quota dashboard for CLIProxyAPI. It collects per-request token usage from the Redis-compatible usage queue into SQLite, visualizes daily and recent-window usage by account and model, and shows Codex 5h/7d quota remaining in a local web UI.
88+
89+
## Amp CLI Support
90+
91+
CLIProxyAPI includes integrated support for [Amp CLI](https://ampcode.com) and Amp IDE extensions, enabling you to use your Google/ChatGPT/Claude OAuth subscriptions with Amp's coding tools:
92+
93+
- Provider route aliases for Amp's API patterns (`/api/provider/{provider}/v1...`)
94+
- Management proxy for OAuth authentication and account features
95+
- Smart model fallback with automatic routing
96+
- **Model mapping** to route unavailable models to alternatives (e.g., `claude-opus-4.5``claude-sonnet-4`)
97+
- Security-first design with localhost-only management endpoints
98+
99+
When you need the request/response shape of a specific backend family, use the provider-specific paths instead of the merged `/v1/...` endpoints:
100+
101+
- Use `/api/provider/{provider}/v1/messages` for messages-style backends.
102+
- Use `/api/provider/{provider}/v1beta/models/...` for model-scoped generate endpoints.
103+
- Use `/api/provider/{provider}/v1/chat/completions` for chat-completions backends.
104+
105+
These routes help you select the protocol surface, but they do not by themselves guarantee a unique inference executor when the same client-visible model name is reused across multiple backends. Inference routing is still resolved from the request model/alias. For strict backend pinning, use unique aliases, prefixes, or otherwise avoid overlapping client-visible model names.
106+
107+
**[Complete Amp CLI Integration Guide](https://help.router-for.me/agent-client/amp-cli.html)**
108+
109+
## SDK Docs
110+
111+
- Usage: [docs/sdk-usage.md](docs/sdk-usage.md)
112+
- Advanced (executors & translators): [docs/sdk-advanced.md](docs/sdk-advanced.md)
113+
- Access: [docs/sdk-access.md](docs/sdk-access.md)
114+
- Watcher: [docs/sdk-watcher.md](docs/sdk-watcher.md)
115+
- Custom Provider Example: `examples/custom-provider`
10116

11117
## Contributing
12118

@@ -30,7 +136,7 @@ Native macOS menu bar app to use your Claude Code & ChatGPT subscriptions with A
30136

31137
### [Subtitle Translator](https://github.com/VjayC/SRT-Subtitle-Translator-Validator)
32138

33-
Browser-based tool to translate SRT subtitles using your Gemini subscription via CLIProxyAPI with automatic validation/error correction - no API keys needed
139+
A cross-platform desktop and web app to translate and validate SRT subtitles using your existing LLM subscriptions (Gemini, ChatGPT, Claude, etc.) via CLIProxyAPI - no API keys needed.
34140

35141
### [CCS (Claude Code Switch)](https://github.com/kaitranntt/ccs)
36142

@@ -91,14 +197,14 @@ Cross-platform desktop app (macOS, Windows, Linux) wrapping CLIProxyAPI with a n
91197

92198
Ready-to-use cross-platform quota inspector for CLIProxyAPI, supporting per-account codex 5h/7d quota windows, plan-based sorting, status coloring, and multi-account summary analytics.
93199

94-
### [CPA Usage Keeper](https://github.com/Willxup/cpa-usage-keeper)
95-
96-
Standalone persistence and visualization service for CLIProxyAPI, with periodic data sync, SQLite storage, aggregate APIs, and a built-in dashboard for usage and statistics.
97-
98200
### [CodexCliPlus](https://github.com/C4AL/CodexCliPlus)
99201

100202
Windows-focused, local-first desktop management platform for Codex CLI built on CLIProxyAPI, focused on simplifying local setup, account and runtime management, and providing a more complete Codex CLI experience for local users.
101203

204+
### [CLIProxy Pool Watch](https://github.com/murasame612/CLIProxyPoolWidget)
205+
206+
Native macOS SwiftUI app for monitoring ChatGPT/Codex account quotas in CLIProxyAPI pools. Displays account availability, Plus-base capacity, 5-hour and weekly quota bars, plan weights, and restore forecasts through the Management API.
207+
102208
> [!NOTE]
103209
> If you developed a project based on CLIProxyAPI, please open a PR to add it to this list.
104210
@@ -116,6 +222,10 @@ Never stop coding. Smart routing to FREE & low-cost AI models with automatic fal
116222

117223
OmniRoute is an AI gateway for multi-provider LLMs: an OpenAI-compatible endpoint with smart routing, load balancing, retries, and fallbacks. Add policies, rate limits, caching, and observability for reliable, cost-aware inference.
118224

225+
### [Playful Proxy API Panel (PPAP)](https://github.com/daishuge/playful-proxy-api-panel)
226+
227+
A public CLIProxyAPI-compatible fork and bundled management panel. It keeps upstream-style usage while restoring built-in usage statistics, adding cache hit rate, first-byte latency, TPS tracking, and Docker-oriented self-hosted installation docs.
228+
119229
> [!NOTE]
120230
> If you have developed a port of CLIProxyAPI or a project inspired by it, please open a PR to add it to this list.
121231

0 commit comments

Comments
 (0)