copilot-api-plus 1.0.52 → 1.0.53
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.
- package/README.md +5 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
| 🌐 **代理支持** | 支持 HTTP/HTTPS 代理,配置持久化 |
|
|
43
43
|
| 🐳 **Docker 支持** | 提供完整的 Docker 部署方案 |
|
|
44
44
|
| 🔑 **API Key 认证** | 可选的 API Key 鉴权,保护公开部署的服务 |
|
|
45
|
-
| ✂️
|
|
45
|
+
| ✂️ **上下文透传** | 全量透传上下文至上游 API,由客户端(如 Claude Code)自行管理压缩 |
|
|
46
46
|
| 🔍 **智能模型匹配** | 自动处理模型名格式差异(日期后缀、dash/dot 版本号等) |
|
|
47
47
|
| 🔁 **Antigravity 端点容错** | 双端点自动切换,按模型族追踪速率限制,指数退避重试 |
|
|
48
48
|
|
|
@@ -648,14 +648,12 @@ curl http://localhost:4141/v1/messages \
|
|
|
648
648
|
|
|
649
649
|
## 🔧 技术细节
|
|
650
650
|
|
|
651
|
-
###
|
|
651
|
+
### 上下文管理
|
|
652
652
|
|
|
653
|
-
|
|
653
|
+
代理层不做上下文截断,全量透传消息至上游 API。上下文压缩由客户端负责:
|
|
654
654
|
|
|
655
|
-
-
|
|
656
|
-
-
|
|
657
|
-
- **工具调用分组**:assistant 的 tool_calls 和对应的 tool result 消息作为一组,不会被拆散
|
|
658
|
-
- **5% 安全余量**:实际限制为模型上下文窗口的 95%,避免边界情况
|
|
655
|
+
- **Claude Code**:通过 `/count_tokens` 端点获取当前 token 数,接近上限时自动触发 `/compact` 压缩
|
|
656
|
+
- **其他客户端**:如果上游 API 返回 400(token 超限),客户端自行处理重试
|
|
659
657
|
|
|
660
658
|
### 智能模型名匹配
|
|
661
659
|
|
|
@@ -690,12 +688,6 @@ Google Antigravity 模式内置了可靠性保障:
|
|
|
690
688
|
- `out` — 输出 token 数
|
|
691
689
|
- `cache_read` — 缓存命中的 token 数(仅在有缓存时显示)
|
|
692
690
|
|
|
693
|
-
触发上下文压缩时会额外输出一行:
|
|
694
|
-
|
|
695
|
-
```
|
|
696
|
-
Truncated: 190385 -> 117537 tokens (-59 msgs)
|
|
697
|
-
```
|
|
698
|
-
|
|
699
691
|
### 网络重试
|
|
700
692
|
|
|
701
693
|
对上游 API 的请求内置了瞬时网络错误重试(TLS 断开、连接重置等):
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilot-api-plus",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Turn GitHub Copilot, OpenCode Zen, or Google Antigravity into OpenAI/Anthropic API compatible server. Features:
|
|
3
|
+
"version": "1.0.53",
|
|
4
|
+
"description": "Turn GitHub Copilot, OpenCode Zen, or Google Antigravity into OpenAI/Anthropic API compatible server. Features: smart model matching, dual-endpoint failover, API key auth, and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"proxy",
|
|
7
7
|
"github-copilot",
|