From ba6fe1c8aff046379ca82d326679c828ff49b98c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Nov 2025 06:41:41 +0000 Subject: [PATCH 1/4] chore: sync VERSION file with release v1.1.196 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 745550c2..37efc484 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.195 +1.1.196 From 861ad116476847b4310e0f87beaa00c764cfd118 Mon Sep 17 00:00:00 2001 From: Yukuiii <472619563@qq.com> Date: Sat, 15 Nov 2025 18:08:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E5=AF=B9gpt-5.1?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=9A=84=E6=8F=90=E7=A4=BA=E8=AF=8D=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/openaiRoutes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/openaiRoutes.js b/src/routes/openaiRoutes.js index 207d0e0f..ba638ee8 100644 --- a/src/routes/openaiRoutes.js +++ b/src/routes/openaiRoutes.js @@ -260,7 +260,8 @@ const handleResponses = async (req, res) => { // 判断是否为 Codex CLI 的请求 const isCodexCLI = req.body?.instructions?.startsWith('You are a coding agent running in the Codex CLI') || - req.body?.instructions?.startsWith('You are Codex') + req.body?.instructions?.startsWith('You are Codex') || + req.body?.instructions?.startsWith('You are GPT-5.1 running in the Codex CLI') // 如果不是 Codex CLI 请求,则进行适配 if (!isCodexCLI) { From 77938b6e394ac2a8c58a6c7438c77b7d3a62cf48 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Nov 2025 14:58:37 +0000 Subject: [PATCH 3/4] chore: sync VERSION file with release v1.1.197 [skip ci] --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 37efc484..c1dddabb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.196 +1.1.197 From b1853a076019968681518d1fd352fbd840a109be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=BE=E5=BA=86=E9=9B=B7?= Date: Wed, 19 Nov 2025 17:56:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?docs:=20=E4=BC=98=E5=8C=96Gemini=20CLI?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 21 ++++++++++++++++++-- README_EN.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 70 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 95a47a55..80c6f0a5 100644 --- a/README.md +++ b/README.md @@ -410,10 +410,27 @@ export ANTHROPIC_AUTH_TOKEN="后台创建的API密钥" **Gemini CLI 设置环境变量:** +**方式一(推荐):通过 Gemini Assist API 方式访问** + +每账号每日享受 1000 次请求,每分钟 60 次免费限额。 + ```bash +CODE_ASSIST_ENDPOINT="http://127.0.0.1:3000/gemini" # 根据实际填写你服务器的ip地址或者域名 +GOOGLE_CLOUD_ACCESS_TOKEN="后台创建的API密钥" +GOOGLE_GENAI_USE_GCA="true" +GEMINI_MODEL="gemini-2.5-pro" +``` + +> **注意**:gemini-cli 控制台会提示 `Failed to fetch user info: 401 Unauthorized`,但使用不受任何影响。 + +**方式二:通过 Gemini API 方式访问** + +免费额度极少,极易触发 429 错误。 + +```bash +GOOGLE_GEMINI_BASE_URL="http://127.0.0.1:3000/gemini" # 根据实际填写你服务器的ip地址或者域名 +GEMINI_API_KEY="后台创建的API密钥" GEMINI_MODEL="gemini-2.5-pro" -GOOGLE_GEMINI_BASE_URL="http://127.0.0.1:3000/gemini" # 根据实际填写你服务器的ip地址或者域名 -GEMINI_API_KEY="后台创建的API密钥" # 使用相同的API密钥即可 ``` **使用 Claude Code:** diff --git a/README_EN.md b/README_EN.md index 6573021b..477c2f52 100644 --- a/README_EN.md +++ b/README_EN.md @@ -232,21 +232,68 @@ Assign a key to each user: 4. Set usage limits (optional) 5. Save, note down the generated key -### 4. Start Using Claude Code +### 4. Start Using Claude Code and Gemini CLI Now you can replace the official API with your own service: -**Set environment variables:** +**Claude Code Set Environment Variables:** + +Default uses standard Claude account pool: + ```bash -export ANTHROPIC_BASE_URL="http://127.0.0.1:3000/api/" # Fill in your server's IP address or domain according to actual situation +export ANTHROPIC_BASE_URL="http://127.0.0.1:3000/api/" # Fill in your server's IP address or domain export ANTHROPIC_AUTH_TOKEN="API key created in the backend" ``` -**Use claude:** +**VSCode Claude Plugin Configuration:** + +If using VSCode Claude plugin, configure in `~/.claude/config.json`: + +```json +{ + "primaryApiKey": "crs" +} +``` + +If the file doesn't exist, create it manually. Windows users path is `C:\Users\YourUsername\.claude\config.json`. + +**Gemini CLI Set Environment Variables:** + +**Method 1 (Recommended): Via Gemini Assist API** + +Each account enjoys 1000 requests per day, 60 requests per minute free quota. + +```bash +CODE_ASSIST_ENDPOINT="http://127.0.0.1:3000/gemini" # Fill in your server's IP address or domain +GOOGLE_CLOUD_ACCESS_TOKEN="API key created in the backend" +GOOGLE_GENAI_USE_GCA="true" +GEMINI_MODEL="gemini-2.5-pro" +``` + +> **Note**: gemini-cli console will show `Failed to fetch user info: 401 Unauthorized`, but this doesn't affect usage. + +**Method 2: Via Gemini API** + +Very limited free quota, easily triggers 429 errors. + +```bash +GOOGLE_GEMINI_BASE_URL="http://127.0.0.1:3000/gemini" # Fill in your server's IP address or domain +GEMINI_API_KEY="API key created in the backend" +GEMINI_MODEL="gemini-2.5-pro" +``` + +**Use Claude Code:** + ```bash claude ``` +**Use Gemini CLI:** + +```bash +gemini +``` + --- ## 🔧 Daily Maintenance