copilot-api-plus 1.2.14 → 1.2.15

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.en.md CHANGED
@@ -46,10 +46,10 @@ English | [简体中文](README.md)
46
46
  | 👥 **Multi-Account** | Multiple GitHub accounts with automatic failover on quota exhaustion/rate limiting/bans |
47
47
  | 🔀 **Model Routing** | Flexible model name mapping and per-model concurrency control |
48
48
  | 📱 **Visual Management** | Web dashboard for account management, model config, and runtime stats |
49
- | 🛡️ **Network Resilience** | 60s timeout + smart retry + instant stream recovery + proxy tunnel keepalive (45s heartbeat) |
49
+ | 🛡️ **Network Resilience** | 120s timeout + smart retry + instant stream recovery + proxy tunnel keepalive (45s heartbeat) |
50
50
  | ✂️ **Context Passthrough** | Full context passthrough to upstream API; clients (e.g. Claude Code) manage compression |
51
51
  | 🔍 **Smart Model Matching** | Handles model name format differences (date suffixes, dash/dot versions, etc.) |
52
- | 🧠 **Thinking Chain** | Automatically enables deep thinking (thinking/reasoning) for supported models, improving code quality |
52
+ | 🧠 **Thinking Chain** | Automatically enables deep thinking (reasoning_effort) with Anthropic adaptive/enabled mode auto-translation |
53
53
 
54
54
  ---
55
55
 
@@ -582,7 +582,7 @@ Each API request outputs a log line with model name, status code, and duration:
582
582
 
583
583
  Built-in connection timeout and smart retry for upstream API requests, minimizing Copilot request credit consumption:
584
584
 
585
- - **Connection timeout**: 60 seconds for the first attempt, 30 seconds for retries (headers typically arrive in 3–5s)
585
+ - **Connection timeout**: 120 seconds for the first attempt, 30 seconds for retries (headers typically arrive in 3–5s)
586
586
  - **Retry strategy**: Up to 2 retries (3 total attempts), 2-3 second delays
587
587
  - **Instant stream recovery**: On SSE stream interruption, immediately destroys the connection pool so the next request uses fresh sockets — recovery drops from ~135s to seconds
588
588
  - **Connection pool reset**: Automatically destroys all pooled connections on the first network error and creates fresh instances, preventing retries from hitting stale sockets
package/README.md CHANGED
@@ -47,10 +47,10 @@
47
47
  | 👥 **多账号管理** | 支持添加多个 GitHub 账号,额度耗尽/限流/封禁时自动切换下一个 |
48
48
  | 🔀 **模型路由** | 灵活的模型名映射和每模型并发控制 |
49
49
  | 📱 **可视化管理** | Web 仪表盘支持账号管理、模型管理、运行统计 |
50
- | 🛡️ **网络弹性** | 60s 连接超时 + 智能重试 + 流中断即时恢复 + 代理隧道保活(45s 心跳) |
50
+ | 🛡️ **网络弹性** | 120s 连接超时 + 智能重试 + 流中断即时恢复 + 代理隧道保活(45s 心跳) |
51
51
  | ✂️ **上下文透传** | 全量透传上下文至上游 API,由客户端(如 Claude Code)自行管理压缩 |
52
52
  | 🔍 **智能模型匹配** | 自动处理模型名格式差异(日期后缀、dash/dot 版本号等) |
53
- | 🧠 **Thinking 思维链** | 自动为支持的模型启用深度思考(thinking/reasoning),提升代码质量 |
53
+ | 🧠 **Thinking 思维链** | 自动为支持的模型启用深度思考(reasoning_effort),支持 Anthropic adaptive/enabled 模式自动转换 |
54
54
 
55
55
  ---
56
56
 
@@ -745,7 +745,7 @@ Anthropic 格式的模型名(如 `claude-opus-4-6`)和 Copilot 的模型列
745
745
 
746
746
  对上游 API 的请求内置了连接超时和智能重试,以最小化 Copilot 请求次数消耗:
747
747
 
748
- - **连接超时**:首次请求 60 秒,重试请求 30 秒(响应头通常 3~5 秒到达)
748
+ - **连接超时**:首次请求 120 秒,重试请求 30 秒(响应头通常 3~5 秒到达)
749
749
  - **重试策略**:最多重试 2 次(共 3 次尝试),间隔 2-3 秒
750
750
  - **流中断即时恢复**:SSE 流中断时立刻销毁连接池,下一个请求使用全新连接,恢复时间从 ~135 秒降至几秒
751
751
  - **连接池重置**:首次网络错误后自动销毁所有连接并创建新实例,避免后续请求复用坏连接
package/dist/main.js CHANGED
@@ -2463,8 +2463,7 @@ function translateToOpenAI(payload) {
2463
2463
  user: payload.metadata?.user_id,
2464
2464
  tools: translateAnthropicToolsToOpenAI(payload.tools),
2465
2465
  tool_choice: toolChoice,
2466
- ...!isForced && payload.thinking && { thinking: payload.thinking },
2467
- ...!isForced && payload.thinking?.type === "enabled" && { reasoning_effort: "high" },
2466
+ ...!isForced && payload.thinking && { reasoning_effort: "high" },
2468
2467
  ...!isForced && payload.thinking?.budget_tokens && { thinking_budget: payload.thinking.budget_tokens }
2469
2468
  };
2470
2469
  }