copilot-api-plus 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +62 -75
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,80 +1,6 @@
1
1
  # Copilot API Plus
2
2
 
3
- ## OpenCode Zen 使用指南
4
3
 
5
- OpenCode Zen 是由 opencode.ai 提供的多模型 API 服务,支持 Claude、GPT-5、Gemini、Qwen 等主流大模型,适合代码生成、AI 助手等场景。Copilot API Plus 支持将 Zen 转换为 OpenAI/Anthropic 兼容 API,方便与 Claude Code、opencode 等工具无缝集成。
6
-
7
- ### 1. 获取 Zen API Key
8
-
9
- 1. 访问 [https://opencode.ai/zen](https://opencode.ai/zen)
10
- 2. 注册并登录,进入“API Keys”页面,创建你的 API Key
11
-
12
- ### 2. 启动 Zen 模式
13
-
14
- 首次运行会自动提示输入 API Key,并保存到本地。也可直接指定:
15
-
16
- ```sh
17
- npx copilot-api-plus@latest start --zen --zen-api-key <你的APIKey>
18
- ```
19
-
20
- 或交互式:
21
-
22
- ```sh
23
- npx copilot-api-plus@latest start --zen
24
- ```
25
-
26
- ### 3. 与 Claude Code 配合
27
-
28
- Zen 支持多种 Claude 模型,推荐用法:
29
-
30
- ```sh
31
- npx copilot-api-plus@latest start --zen --claude-code
32
- ```
33
- 会自动生成 Claude Code 启动命令,支持模型选择。
34
-
35
- ### 4. 支持的模型(部分示例)
36
-
37
- | 名称 | ID | 说明 |
38
- |---------------------|----------------------|---------------------------|
39
- | Claude Sonnet 4.5 | claude-sonnet-4-5 | Anthropic Claude 200K |
40
- | Claude Opus 4.5 | claude-opus-4-5 | Anthropic Claude 200K |
41
- | GPT-5 Codex | gpt-5-codex | OpenAI Responses API |
42
- | Gemini 3 Pro | gemini-3-pro | Google Gemini |
43
- | Qwen3 Coder 480B | qwen3-coder | Alibaba Qwen |
44
- | Kimi K2 | kimi-k2 | Moonshot |
45
- | Grok Code Fast 1 | grok-code | xAI |
46
-
47
- 更多模型请见 [Zen 官网](https://opencode.ai/zen)。
48
-
49
- ### 5. API 路径
50
-
51
- Zen 模式下,所有 OpenAI/Anthropic 兼容路径均可用:
52
-
53
- - `POST /v1/chat/completions` (OpenAI 格式)
54
- - `POST /v1/messages` (Anthropic 格式)
55
- - `GET /v1/models` (模型列表)
56
-
57
- Zen 专属路径(始终可用):
58
- - `POST /zen/v1/chat/completions`
59
- - `POST /zen/v1/messages`
60
- - `GET /zen/v1/models`
61
-
62
- ### 6. 常见问题
63
-
64
- - **API Key 存储位置**:`~/.local/share/copilot-api-plus/zen-auth.json`
65
- - **切换/清除 API Key**:
66
- - 只清除 Zen:`npx copilot-api-plus@latest logout --zen`
67
- - 全部清除:`npx copilot-api-plus@latest logout --all`
68
- - **模型选择**:启动时会自动显示可用模型列表
69
- - **与 opencode 配合**:在 `opencode.json` 里设置 `baseURL` 为 `http://127.0.0.1:4141/v1`,或用环境变量 `OPENAI_BASE_URL`
70
-
71
- ### 7. 使用技巧
72
-
73
- - 推荐用 `--claude-code` 生成 Claude Code 启动命令
74
- - 支持所有 Zen 公开模型,按需选择
75
- - 支持 Docker 部署,API Key 持久化
76
-
77
- 如需详细配置示例、opencode 配置、更多高级用法,请继续阅读下方文档。
78
4
 
79
5
  > **Fork of [ericc-ch/copilot-api](https://github.com/ericc-ch/copilot-api)** with bug fixes and improvements.
80
6
 
@@ -430,7 +356,68 @@ The dashboard provides a user-friendly interface to view your Copilot usage data
430
356
 
431
357
  ## Using with OpenCode Zen
432
358
 
433
- [OpenCode Zen](https://opencode.ai/zen) is a curated list of tested and verified models provided by the OpenCode team. This proxy can convert OpenCode Zen into an OpenAI/Anthropic compatible API server, allowing you to use Zen models with Claude Code and other tools!
359
+
360
+ ### OpenCode Zen 使用指南
361
+
362
+ OpenCode Zen 是由 opencode.ai 提供的多模型 API 服务,支持 Claude、GPT-5、Gemini、Qwen 等主流大模型,适合代码生成、AI 助手等场景。Copilot API Plus 支持将 Zen 转换为 OpenAI/Anthropic 兼容 API,方便与 Claude Code、opencode 等工具无缝集成。
363
+
364
+ #### 1. 获取 Zen API Key
365
+ 1. 访问 [https://opencode.ai/zen](https://opencode.ai/zen)
366
+ 2. 注册并登录,进入“API Keys”页面,创建你的 API Key
367
+
368
+ #### 2. 启动 Zen 模式
369
+ 首次运行会自动提示输入 API Key,并保存到本地。也可直接指定:
370
+ ```sh
371
+ npx copilot-api-plus@latest start --zen --zen-api-key <你的APIKey>
372
+ ```
373
+ 或交互式:
374
+ ```sh
375
+ npx copilot-api-plus@latest start --zen
376
+ ```
377
+
378
+ #### 3. 与 Claude Code 配合
379
+ Zen 支持多种 Claude 模型,推荐用法:
380
+ ```sh
381
+ npx copilot-api-plus@latest start --zen --claude-code
382
+ ```
383
+ 会自动生成 Claude Code 启动命令,支持模型选择。
384
+
385
+ #### 4. 支持的模型(部分示例)
386
+ | 名称 | ID | 说明 |
387
+ |---------------------|----------------------|---------------------------|
388
+ | Claude Sonnet 4.5 | claude-sonnet-4-5 | Anthropic Claude 200K |
389
+ | Claude Opus 4.5 | claude-opus-4-5 | Anthropic Claude 200K |
390
+ | GPT-5 Codex | gpt-5-codex | OpenAI Responses API |
391
+ | Gemini 3 Pro | gemini-3-pro | Google Gemini |
392
+ | Qwen3 Coder 480B | qwen3-coder | Alibaba Qwen |
393
+ | Kimi K2 | kimi-k2 | Moonshot |
394
+ | Grok Code Fast 1 | grok-code | xAI |
395
+ 更多模型请见 [Zen 官网](https://opencode.ai/zen)。
396
+
397
+ #### 5. API 路径
398
+ Zen 模式下,所有 OpenAI/Anthropic 兼容路径均可用:
399
+ - `POST /v1/chat/completions` (OpenAI 格式)
400
+ - `POST /v1/messages` (Anthropic 格式)
401
+ - `GET /v1/models` (模型列表)
402
+ Zen 专属路径(始终可用):
403
+ - `POST /zen/v1/chat/completions`
404
+ - `POST /zen/v1/messages`
405
+ - `GET /zen/v1/models`
406
+
407
+ #### 6. 常见问题
408
+ - **API Key 存储位置**:`~/.local/share/copilot-api-plus/zen-auth.json`
409
+ - **切换/清除 API Key**:
410
+ - 只清除 Zen:`npx copilot-api-plus@latest logout --zen`
411
+ - 全部清除:`npx copilot-api-plus@latest logout --all`
412
+ - **模型选择**:启动时会自动显示可用模型列表
413
+ - **与 opencode 配合**:在 `opencode.json` 里设置 `baseURL` 为 `http://127.0.0.1:4141/v1`,或用环境变量 `OPENAI_BASE_URL`
414
+
415
+ #### 7. 使用技巧
416
+ - 推荐用 `--claude-code` 生成 Claude Code 启动命令
417
+ - 支持所有 Zen 公开模型,按需选择
418
+ - 支持 Docker 部署,API Key 持久化
419
+
420
+ 如需详细配置示例、opencode 配置、更多高级用法,请继续阅读下方文档。
434
421
 
435
422
  ### Why Use Zen Mode?
436
423
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilot-api-plus",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Turn GitHub Copilot or OpenCode Zen into OpenAI/Anthropic API compatible server. Fork with bug fixes: auto re-auth, logout support, Zen mode, and more.",
5
5
  "keywords": [
6
6
  "proxy",