Skip to content

Commit 5eaf7ad

Browse files
webplodeclaude
andcommitted
Add Codex subscription dates to quota cards and sync CLIProxyAPI
Surface subscription start/end dates on the Quotas page by extracting them from the Codex JWT id_token. Expired subscriptions now show a red badge, helping diagnose unexpected EOF errors from OpenAI. Also syncs bundled CLIProxyAPI to latest upstream and hardens JWT config init. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 37471b1 commit 5eaf7ad

152 files changed

Lines changed: 17347 additions & 2425 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: agents-md-guard
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
10+
permissions:
11+
contents: read
12+
issues: write
13+
pull-requests: write
14+
15+
jobs:
16+
close-when-agents-md-changed:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Detect AGENTS.md changes and close PR
20+
uses: actions/github-script@v7
21+
with:
22+
script: |
23+
const prNumber = context.payload.pull_request.number;
24+
const { owner, repo } = context.repo;
25+
26+
const files = await github.paginate(github.rest.pulls.listFiles, {
27+
owner,
28+
repo,
29+
pull_number: prNumber,
30+
per_page: 100,
31+
});
32+
33+
const touchesAgentsMd = (path) =>
34+
typeof path === "string" &&
35+
(path === "AGENTS.md" || path.endsWith("/AGENTS.md"));
36+
37+
const touched = files.filter(
38+
(f) => touchesAgentsMd(f.filename) || touchesAgentsMd(f.previous_filename),
39+
);
40+
41+
if (touched.length === 0) {
42+
core.info("No AGENTS.md changes detected.");
43+
return;
44+
}
45+
46+
const changedList = touched
47+
.map((f) =>
48+
f.previous_filename && f.previous_filename !== f.filename
49+
? `- ${f.previous_filename} -> ${f.filename}`
50+
: `- ${f.filename}`,
51+
)
52+
.join("\n");
53+
54+
const body = [
55+
"This repository does not allow modifying `AGENTS.md` in pull requests.",
56+
"",
57+
"Detected changes:",
58+
changedList,
59+
"",
60+
"Please revert these changes and open a new PR without touching `AGENTS.md`.",
61+
].join("\n");
62+
63+
try {
64+
await github.rest.issues.createComment({
65+
owner,
66+
repo,
67+
issue_number: prNumber,
68+
body,
69+
});
70+
} catch (error) {
71+
core.warning(`Failed to comment on PR #${prNumber}: ${error.message}`);
72+
}
73+
74+
await github.rest.pulls.update({
75+
owner,
76+
repo,
77+
pull_number: prNumber,
78+
state: "closed",
79+
});
80+
81+
core.setFailed("PR modifies AGENTS.md");
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: auto-retarget-main-pr-to-dev
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- reopened
8+
- edited
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: read
14+
issues: write
15+
pull-requests: write
16+
17+
jobs:
18+
retarget:
19+
if: github.actor != 'github-actions[bot]'
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Retarget PR base to dev
23+
uses: actions/github-script@v7
24+
with:
25+
script: |
26+
const pr = context.payload.pull_request;
27+
const prNumber = pr.number;
28+
const { owner, repo } = context.repo;
29+
30+
const baseRef = pr.base?.ref;
31+
const headRef = pr.head?.ref;
32+
const desiredBase = "dev";
33+
34+
if (baseRef !== "main") {
35+
core.info(`PR #${prNumber} base is ${baseRef}; nothing to do.`);
36+
return;
37+
}
38+
39+
if (headRef === desiredBase) {
40+
core.info(`PR #${prNumber} is ${desiredBase} -> main; skipping retarget.`);
41+
return;
42+
}
43+
44+
core.info(`Retargeting PR #${prNumber} base from ${baseRef} to ${desiredBase}.`);
45+
46+
try {
47+
await github.rest.pulls.update({
48+
owner,
49+
repo,
50+
pull_number: prNumber,
51+
base: desiredBase,
52+
});
53+
} catch (error) {
54+
core.setFailed(`Failed to retarget PR #${prNumber} to ${desiredBase}: ${error.message}`);
55+
return;
56+
}
57+
58+
const body = [
59+
`This pull request targeted \`${baseRef}\`.`,
60+
"",
61+
`The base branch has been automatically changed to \`${desiredBase}\`.`,
62+
].join("\n");
63+
64+
try {
65+
await github.rest.issues.createComment({
66+
owner,
67+
repo,
68+
issue_number: prNumber,
69+
body,
70+
});
71+
} catch (error) {
72+
core.warning(`Failed to comment on PR #${prNumber}: ${error.message}`);
73+
}

CLIProxyAPI/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ GEMINI.md
3333

3434
# Tooling metadata
3535
.vscode/*
36+
.worktrees/
3637
.codex/*
3738
.claude/*
3839
.gemini/*
3940
.serena/*
4041
.agent/*
4142
.agents/*
42-
.agents/*
4343
.opencode/*
4444
.idea/*
45+
.beads/*
4546
.bmad/*
4647
_bmad/*
4748
_bmad-output/*

CLIProxyAPI/README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ Get 10% OFF GLM CODING PLAN:https://z.ai/subscribe?ic=8JVLJQFSKB
3030
<td width="180"><a href="https://www.aicodemirror.com/register?invitecode=TJNAIF"><img src="./assets/aicodemirror.png" alt="AICodeMirror" width="150"></a></td>
3131
<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>
3232
</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://www.lingtrue.com/register"><img src="./assets/lingtrue.png" alt="LingtrueAPI" width="150"></a></td>
39+
<td>Thanks to LingtrueAPI for its sponsorship of this project! LingtrueAPI is a global large - model API intermediary service platform that provides API calling services for various top - notch models such as Claude Code, Codex, and Gemini. It is committed to enabling users to connect to global AI capabilities at low cost and with high stability. LingtrueAPI offers special discounts to users of this software: register using <a href="https://www.lingtrue.com/register">this link</a>, and enter the promo code "LingtrueAPI" when making the first recharge to enjoy a 10% discount.</td>
40+
</tr>
41+
<tr>
42+
<td width="180"><a href="https://poixe.com/i/m8kvep"><img src="./assets/poixeai.png" alt="PoixeAI" width="150"></a></td>
43+
<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>
44+
</tr>
3345
</tbody>
3446
</table>
3547

@@ -74,6 +86,14 @@ CLIProxyAPI includes integrated support for [Amp CLI](https://ampcode.com) and A
7486
- **Model mapping** to route unavailable models to alternatives (e.g., `claude-opus-4.5``claude-sonnet-4`)
7587
- Security-first design with localhost-only management endpoints
7688

89+
When you need the request/response shape of a specific backend family, use the provider-specific paths instead of the merged `/v1/...` endpoints:
90+
91+
- Use `/api/provider/{provider}/v1/messages` for messages-style backends.
92+
- Use `/api/provider/{provider}/v1beta/models/...` for model-scoped generate endpoints.
93+
- Use `/api/provider/{provider}/v1/chat/completions` for chat-completions backends.
94+
95+
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.
96+
7797
**[Complete Amp CLI Integration Guide](https://help.router-for.me/agent-client/amp-cli.html)**
7898

7999
## SDK Docs
@@ -110,10 +130,6 @@ Browser-based tool to translate SRT subtitles using your Gemini subscription via
110130

111131
CLI wrapper for instant switching between multiple Claude accounts and alternative models (Gemini, Codex, Antigravity) via CLIProxyAPI OAuth - no API keys needed
112132

113-
### [ProxyPal](https://github.com/heyhuynhgiabuu/proxypal)
114-
115-
Native macOS GUI for managing CLIProxyAPI: configure providers, model mappings, and endpoints via OAuth - no API keys needed.
116-
117133
### [Quotio](https://github.com/nguyenphutrong/quotio)
118134

119135
Native macOS menu bar app that unifies Claude, Gemini, OpenAI, Qwen, and Antigravity subscriptions with real-time quota tracking and smart auto-failover for AI coding tools like Claude Code, OpenCode, and Droid - no API keys needed.
@@ -161,6 +177,14 @@ mode without windows or traces, and enables cross-device AI Q&A interaction and
161177
LAN). Essentially, it is an automated collaboration layer of "screen/audio capture + AI inference + low-friction delivery",
162178
helping users to immersively use AI assistants across applications on controlled devices or in restricted environments.
163179

180+
### [ProxyPal](https://github.com/buddingnewinsights/proxypal)
181+
182+
Cross-platform desktop app (macOS, Windows, Linux) wrapping CLIProxyAPI with a native GUI. Connects Claude, ChatGPT, Gemini, GitHub Copilot, Qwen, iFlow, and custom OpenAI-compatible endpoints with usage analytics, request monitoring, and auto-configuration for popular coding tools - no API keys needed.
183+
184+
### [CLIProxyAPI Quota Inspector](https://github.com/AllenReder/CLIProxyAPI-Quota-Inspector)
185+
186+
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.
187+
164188
> [!NOTE]
165189
> If you developed a project based on CLIProxyAPI, please open a PR to add it to this list.
166190

CLIProxyAPI/README_CN.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ GLM CODING PLAN 是专为AI编码打造的订阅套餐,每月最低仅需20元
3030
<td width="180"><a href="https://www.aicodemirror.com/register?invitecode=TJNAIF"><img src="./assets/aicodemirror.png" alt="AICodeMirror" width="150"></a></td>
3131
<td>感谢 AICodeMirror 赞助了本项目!AICodeMirror 提供 Claude Code / Codex / Gemini CLI 官方高稳定中转服务,支持企业级高并发、极速开票、7×24 专属技术支持。 Claude Code / Codex / Gemini 官方渠道低至 3.8 / 0.2 / 0.9 折,充值更有折上折!AICodeMirror 为 CLIProxyAPI 的用户提供了特别福利,通过<a href="https://www.aicodemirror.com/register?invitecode=TJNAIF">此链接</a>注册的用户,可享受首充8折,企业客户最高可享 7.5 折!</td>
3232
</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>感谢 BmoPlus 赞助了本项目!BmoPlus 是一家专为AI订阅重度用户打造的可靠 AI 账号代充服务商,提供稳定的 ChatGPT Plus / ChatGPT Pro(全程质保) / Claude Pro / Super Grok / Gemini Pro 的官方代充&成品账号。 通过<a href="https://shop.bmoplus.com/?utm_source=github">BmoPlus AI成品号专卖/代充</a>注册下单的用户,可享GPT <b>官网订阅一折</b> 的震撼价格!</td>
36+
</tr>
37+
<tr>
38+
<td width="180"><a href="https://www.lingtrue.com/register"><img src="./assets/lingtrue.png" alt="LingtrueAPI" width="150"></a></td>
39+
<td>感谢 LingtrueAPI 对本项目的赞助!LingtrueAPI 是一家全球大模型API中转服务平台,提供Claude Code、Codex、Gemini 等多种顶级模型API调用服务,致力于让用户以低成本、高稳定性链接全球AI能力。LingtrueAPI为本软件用户提供了特别优惠:使用<a href="https://www.lingtrue.com/register">此链接</a>注册,并在首次充值时输入 "LingtrueAPI" 优惠码即可享受9折优惠。</td>
40+
</tr>
41+
<tr>
42+
<td width="180"><a href="https://poixe.com/i/m8kvep"><img src="./assets/poixeai.png" alt="PoixeAI" width="150"></a></td>
43+
<td>感谢 Poixe AI 对本项目的赞助!Poixe AI 提供可靠的 AI 模型接口服务,您可以使用平台提供的 LLM API 接口轻松构建 AI 产品,同时也可以成为供应商,为平台提供大模型资源以赚取收益。通过 CLIProxyAPI <a href="https://poixe.com/i/m8kvep">专属链接</a>注册,充值额外赠送 $5 美金</td>
44+
</tr>
3345
</tbody>
3446
</table>
3547

@@ -73,6 +85,14 @@ CLIProxyAPI 已内置对 [Amp CLI](https://ampcode.com) 和 Amp IDE 扩展的支
7385
- 智能模型回退与自动路由
7486
- 以安全为先的设计,管理端点仅限 localhost
7587

88+
当你需要某一类后端的请求/响应协议形态时,优先使用 provider-specific 路径,而不是合并后的 `/v1/...` 端点:
89+
90+
- 对于 messages 风格的后端,使用 `/api/provider/{provider}/v1/messages`
91+
- 对于按模型路径暴露生成接口的后端,使用 `/api/provider/{provider}/v1beta/models/...`
92+
- 对于 chat-completions 风格的后端,使用 `/api/provider/{provider}/v1/chat/completions`
93+
94+
这些路径有助于选择协议表面,但当多个后端复用同一个客户端可见模型名时,它们本身并不能保证唯一的推理执行器。实际的推理路由仍然根据请求里的 model/alias 解析。若要严格钉住某个后端,请使用唯一 alias、前缀,或避免让多个后端暴露相同的客户端模型名。
95+
7696
**[Amp CLI 完整集成指南](https://help.router-for.me/cn/agent-client/amp-cli.html)**
7797

7898
## SDK 文档
@@ -109,10 +129,6 @@ CLIProxyAPI 已内置对 [Amp CLI](https://ampcode.com) 和 Amp IDE 扩展的支
109129

110130
CLI 封装器,用于通过 CLIProxyAPI OAuth 即时切换多个 Claude 账户和替代模型(Gemini, Codex, Antigravity),无需 API 密钥。
111131

112-
### [ProxyPal](https://github.com/heyhuynhgiabuu/proxypal)
113-
114-
基于 macOS 平台的原生 CLIProxyAPI GUI:配置供应商、模型映射以及OAuth端点,无需 API 密钥。
115-
116132
### [Quotio](https://github.com/nguyenphutrong/quotio)
117133

118134
原生 macOS 菜单栏应用,统一管理 Claude、Gemini、OpenAI、Qwen 和 Antigravity 订阅,提供实时配额追踪和智能自动故障转移,支持 Claude Code、OpenCode 和 Droid 等 AI 编程工具,无需 API 密钥。
@@ -157,6 +173,14 @@ Windows 托盘应用,基于 PowerShell 脚本实现,不依赖任何第三方
157173

158174
Shadow AI 是一款专为受限环境设计的 AI 辅助工具。提供无窗口、无痕迹的隐蔽运行方式,并通过局域网实现跨设备的 AI 问答交互与控制。本质上是一个「屏幕/音频采集 + AI 推理 + 低摩擦投送」的自动化协作层,帮助用户在受控设备/受限环境下沉浸式跨应用地使用 AI 助手。
159175

176+
### [ProxyPal](https://github.com/buddingnewinsights/proxypal)
177+
178+
跨平台桌面应用(macOS、Windows、Linux),以原生 GUI 封装 CLIProxyAPI。支持连接 Claude、ChatGPT、Gemini、GitHub Copilot、Qwen、iFlow 及自定义 OpenAI 兼容端点,具备使用分析、请求监控和热门编程工具自动配置功能,无需 API 密钥。
179+
180+
### [CLIProxyAPI Quota Inspector](https://github.com/AllenReder/CLIProxyAPI-Quota-Inspector)
181+
182+
上手即用的面向 CLIProxyAPI 跨平台配额查询工具,支持按账号展示 codex 5h/7d 配额窗口、按计划排序、状态着色及多账号汇总分析。
183+
160184
> [!NOTE]
161185
> 如果你开发了基于 CLIProxyAPI 的项目,请提交一个 PR(拉取请求)将其添加到此列表中。
162186

0 commit comments

Comments
 (0)