dsh-workbuddy-xdpool 1.4.0 → 1.4.1
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/CHANGELOG.md +17 -0
- package/lib/bin.js +2 -2
- package/lib/index.js +6 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
6
6
|
|
|
7
|
+
## 1.4.1 (2026-09-24)
|
|
8
|
+
|
|
9
|
+
### 修了:hy3 超长对话还是会弹 400
|
|
10
|
+
|
|
11
|
+
1.4.0 让溢出消息能被 Harness 认出、并给 shim 加了本地压缩,但 hy3 仍然会爆。根因是
|
|
12
|
+
**窗口值写错了**:catalog 里 hy3 的 `contextWindow` 填的是 `200_000`,而它真实上限远小于
|
|
13
|
+
此。shim 压缩时按「估算 token 数的一半」设预算(约 100K),DSH 压力触发也按 200K 算,
|
|
14
|
+
两侧都以为 200K 够用,所以压缩到 100K 仍远超真实窗口,重试再次溢出。
|
|
15
|
+
|
|
16
|
+
修法:
|
|
17
|
+
- catalog 里 hy3 的窗口改为真实值 `32_000`(同步把 `maxOutputTokens` 从 128K 调到 8K);
|
|
18
|
+
- `recoverFromContextOverrun` 不再用「估算一半」,而是用模型**真实**窗口算预算
|
|
19
|
+
(`realWindow * 0.8 - 2048`),并在调用处把 catalog 的窗口传进去。
|
|
20
|
+
|
|
21
|
+
这样无论 DSH 外层还是 shim 内层,都按真实窗口压缩,不会再把压过的 prompt 发到真实窗口之外。
|
|
22
|
+
- 新增 `context-budget-real-window.test.ts` 钉住这个回归(含「hy3 不再声明 200K」)。
|
|
23
|
+
|
|
7
24
|
## 1.4.0 (2026-09-24)
|
|
8
25
|
|
|
9
26
|
### 长对话不再撞死在上下文上限上
|
package/lib/bin.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -2368,8 +2368,8 @@ const FALLBACK_WORKBUDDY_MODELS = [
|
|
|
2368
2368
|
{
|
|
2369
2369
|
id: "hy3",
|
|
2370
2370
|
name: "Hy3",
|
|
2371
|
-
contextWindow:
|
|
2372
|
-
maxOutputTokens:
|
|
2371
|
+
contextWindow: 32e3,
|
|
2372
|
+
maxOutputTokens: 8e3,
|
|
2373
2373
|
supportsImages: true
|
|
2374
2374
|
},
|
|
2375
2375
|
{
|
|
@@ -4495,7 +4495,8 @@ function createWorkBuddyShim(options) {
|
|
|
4495
4495
|
logger,
|
|
4496
4496
|
client,
|
|
4497
4497
|
pool,
|
|
4498
|
-
maxAttempts
|
|
4498
|
+
maxAttempts,
|
|
4499
|
+
contextWindow: modelId === void 0 ? void 0 : catalog.current().find((m) => m.id === modelId)?.contextWindow
|
|
4499
4500
|
});
|
|
4500
4501
|
if (recovered.ok) {
|
|
4501
4502
|
await serveSuccessfulStream(res, recovered.account, recovered.result, logger, refreshBalance, pool);
|
|
@@ -4599,7 +4600,8 @@ async function recoverFromContextOverrun(options) {
|
|
|
4599
4600
|
detail: "request carried no usable messages"
|
|
4600
4601
|
};
|
|
4601
4602
|
const overrunTokens = estimateMessagesTokens(messages);
|
|
4602
|
-
const
|
|
4603
|
+
const realWindow = options.contextWindow;
|
|
4604
|
+
const budget = realWindow !== void 0 && realWindow > 0 ? Math.max(512, Math.floor(realWindow * .8) - 2048) : Math.max(512, Math.floor(overrunTokens / 2));
|
|
4603
4605
|
logger?.warn(`dsh-workbuddy-xdpool: context overrun on ${modelId ?? "(no model)"} (~${overrunTokens} tokens); compacting to ~${budget} and retrying once`);
|
|
4604
4606
|
let summary;
|
|
4605
4607
|
let compacted = messages;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-workbuddy-xdpool",
|
|
3
3
|
"displayName": "DSH WorkBuddy XD Pool",
|
|
4
4
|
"description": "Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool (multi-account rotation, live credits, daily check-in and model catalog).",
|
|
5
|
-
"version": "1.4.
|
|
5
|
+
"version": "1.4.1",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "XDTrees",
|
|
8
8
|
"homepage": "https://github.com/XDTrees/dsh-workbuddy-xdpool#readme",
|