@wengine-ai/llms 2.3.2420 → 2.3.2422

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 CHANGED
@@ -93,6 +93,8 @@ npm install -g @wengine-ai/claude-code-router-next@latest && ccr restart
93
93
 
94
94
  | 版本 | 发布内容 |
95
95
  | --- | --- |
96
+ | **v2.3.2422** | <ul><li>**send 级插件失败不再误报**:插件 fetch 在拿到 HTTP 状态前失败(本地代理拒连/DNS/TLS/超时)时,此前只报笼统的"invalid upstream response";status 0 的发送失败现在归类为 <code>plugin_network_error</code>,附带上界受控、严格消毒的传输诊断(cause 链错误码 + host:port)。</li><li>**恢复探活不再被失败时间饿死**:受托恢复门控改用 lastProbeTime 判定,失败刷新 lastFailureTime 不再推迟探活,熔断可正常自愈。</li><li>**首页失败横幅显示最后失败时间**:过期红条与持续故障一眼可分。</li><li>**仓库对齐已发运状态**:合并堆积 PR #95-#100(workspace 根 private 守卫、codex 1.0.10 缓存键锚定、qoder 0.3.x 签到与卡片统一),插件版本对齐 codex 1.0.10 / qoder 0.3.3。</li></ul> |
97
+ | **v2.3.2421** | <ul><li>**插件更新重新能被发现**:插件记录保存的是安装时的 npm specifier(如 `@wengine-ai/ccr-provider-qoder@0.2.0`),而 catalog 行按裸包名索引,带版本号的安装匹配不到记录、退化为把本地 manifest 版本当成 registry 版本,`updateAvailable` 永远为 false,旧版插件显示为已是最新且升级按钮从不出现;现在匹配前剥离 specifier 版本尾部。</li><li>**`upstream_model` 不再写成 `unknown`**:Responses 每个生命周期事件的 `response` 都带 model,但此前只从 `response.completed` 读取,长流提前结束(中断/尾包截断/代理重连)就记成 `unknown`;现在捕获首个非空值,完全未回显时回退到路由模型。</li><li>**转换帧不再使用路由前模型名**:Responses→Chat 转换给早期分块贴的是路由前的 `body.model`,现在优先路由后模型。</li><li>**新增插件市场卡片升级按钮**:已安装且版本与 registry 不一致的卡片显示更新按钮,以 force 重装并展示进度。</li></ul> |
96
98
  | **v2.3.2420** | <ul><li>**codex 用量统计修复**:`response.completed` 转 chat 结束帧时漏带 usage,导致 codex 回合内容正常、TTFT 正常但输出/缓存命中/速度全为 0;现在结束帧携带完整 usage(含缓存读写与推理 token)。</li><li>**不再泄漏占位模型名**:早期分块缺少上游 model 时回退到请求的模型名,不再显示 `unknown` / `gpt-5-codex-`。</li></ul> |
97
99
  | **v2.3.2419** | <ul><li>**codex 0 输出回合根因修复**:数据面此前绕过 `SUBSCRIPTION_PROXY_URL` 走直连路径,中间盒剥离响应头并破坏压缩体(插件改为走订阅代理 + identity 编码,ccr-provider-codex 1.0.7);同时单次读取的格式探测在代理分块下漏掉格式标记,Responses 流被误送入 Chat 转换器输出「完整但空」的消息(现在累积读取判定格式,且原生 Responses 流仅对 codex 客户端放行,其他客户端走 Responses→Chat 转换)。</li><li>**gemini-oauth 数据面加 identity 编码**,登录失败记录 Google 原始错误与失败步骤(1.0.7)。</li></ul> |
98
100
  | **v2.3.2418** | <ul><li>**空回复现在会重试并降级**:上游返回 200 且 `content` 为空时不再被记成成功,改为触发同模型重试与 fallback;判据是 content 集合为空(tool_use-only 等合法回合不受影响),探测有字节与时间上限,慢速流不丢字节;Codex 侧同样拦住空 `response.completed`。</li><li>**流式回合不再记录 `output_tokens: 0`**:普通流式请求此前没有 usage 读取器,健康回复被记成全零且无 TTFT;现从 tee 分支采集并按流序合并。</li><li>**不健康 provider 从模型列表降级剔除**:熔断模型对所有 provider 类型生效隐藏,恢复后自动放回;订阅类 provider 新增两级后台探活(先查账号状态,再发真实最小请求),不再依赖真实请求反复撞死账号。</li></ul> |
@@ -1,5 +1,22 @@
1
1
  import type { ManagedRuntime } from "../provider-plugins/types";
2
- /** No unclassified plugin response or read exception may reach rawBody/logging. */
3
- export declare function pluginResponseError(runtime: ManagedRuntime, status: number, body: unknown, systemText: string, transport?: {
2
+ /** Bounded, safe transport diagnostics for a send-level (status 0) failure. */
3
+ export interface PluginTransportFailure {
4
4
  errorName?: string;
5
- }): Promise<Error & Record<string, any>>;
5
+ /** Enum-like OS/undici connect code, e.g. ECONNREFUSED, ENOTFOUND, UND_ERR_CONNECT_TIMEOUT. */
6
+ causeCode?: string;
7
+ /** Own-config endpoint the connect failed on (address:port or hostname) — never upstream text. */
8
+ causeDetail?: string;
9
+ }
10
+ /**
11
+ * Extract bounded transport diagnostics from a thrown send-level error. Node's
12
+ * fetch failures are `TypeError("fetch failed")` with a `cause` chain that
13
+ * carries errno-style fields (code/address/port/hostname). Only enum-like codes
14
+ * and endpoint atoms the core actually dialed survive sanitization — never
15
+ * error messages or URLs. The dialed endpoint normally comes from provider
16
+ * config, but a redirect-following dispatcher may have been pointed there by
17
+ * an upstream 3xx; the strict charset/length caps keep the result safe to
18
+ * embed in a client-visible message regardless.
19
+ */
20
+ export declare function describeTransportFailure(error: unknown): PluginTransportFailure;
21
+ /** No unclassified plugin response or read exception may reach rawBody/logging. */
22
+ export declare function pluginResponseError(runtime: ManagedRuntime, status: number, body: unknown, systemText: string, transport?: PluginTransportFailure): Promise<Error & Record<string, any>>;