billion-context-pi 0.1.66-pr.363.154 → 0.1.66
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/dist/index.js +1 -18
- package/dist/index.js.map +1 -1
- package/dist/reasoning-drop.d.ts +0 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4084,13 +4084,6 @@ function resolveReasoningDrop(cfg) {
|
|
|
4084
4084
|
}
|
|
4085
4085
|
return { drop: cfg?.drop !== false, threshold };
|
|
4086
4086
|
}
|
|
4087
|
-
function isStrictReasoningEcho(provider, baseUrl) {
|
|
4088
|
-
return /deepseek/i.test(baseUrl ?? "") || /deepseek/i.test(provider ?? "");
|
|
4089
|
-
}
|
|
4090
|
-
function applyStrictReasoningGate(cfg, provider, baseUrl) {
|
|
4091
|
-
if (!cfg.drop || !isStrictReasoningEcho(provider, baseUrl)) return cfg;
|
|
4092
|
-
return { ...cfg, drop: false };
|
|
4093
|
-
}
|
|
4094
4087
|
function isThinking(part) {
|
|
4095
4088
|
const p = part;
|
|
4096
4089
|
return p?.type === "thinking" && typeof p.thinking === "string";
|
|
@@ -5340,7 +5333,6 @@ function createRuntime(adapter) {
|
|
|
5340
5333
|
function dropTokenScale(sid) {
|
|
5341
5334
|
tokenScaleStale.delete(sid);
|
|
5342
5335
|
}
|
|
5343
|
-
const strictEchoLogged = /* @__PURE__ */ new Set();
|
|
5344
5336
|
const compressOutcomeSeen = /* @__PURE__ */ new Set();
|
|
5345
5337
|
let compressFailTurnKey = null;
|
|
5346
5338
|
let compressFailCount = 0;
|
|
@@ -5395,16 +5387,7 @@ function createRuntime(adapter) {
|
|
|
5395
5387
|
}
|
|
5396
5388
|
function reasoningDropFor(ctx) {
|
|
5397
5389
|
const m2 = ctx.model;
|
|
5398
|
-
|
|
5399
|
-
const gated = applyStrictReasoningGate(resolved, m2?.provider, m2?.baseUrl);
|
|
5400
|
-
if (resolved.drop && !gated.drop) {
|
|
5401
|
-
const sid = ctx.sessionManager.getSessionId();
|
|
5402
|
-
if (!strictEchoLogged.has(sid)) {
|
|
5403
|
-
strictEchoLogged.add(sid);
|
|
5404
|
-
logInfo("runtime", { sid, event: "compress-reasoning-auto-disabled", reason: "strict-echo-upstream", provider: m2?.provider ?? null, issue: "#361" });
|
|
5405
|
-
}
|
|
5406
|
-
}
|
|
5407
|
-
return gated;
|
|
5390
|
+
return resolveReasoningDrop(resolveCompress(adapterRef.compress, m2?.provider, m2?.id).reasoning);
|
|
5408
5391
|
}
|
|
5409
5392
|
async function reloadConfig(cwd) {
|
|
5410
5393
|
let user;
|