billion-context-pi 0.1.53-pr.259.47 → 0.1.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/dist/floor-stale.d.ts +3 -4
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/floor-stale.d.ts
CHANGED
|
@@ -18,9 +18,8 @@ type AnchorEntry = {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
/** True when the last valid assistant usage anchor comes strictly BEFORE the
|
|
21
|
-
* last successful compress toolResult —
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* (nothing was reclaimed, the anchor is still accurate). */
|
|
21
|
+
* last successful compress toolResult — the host's provider-usage number
|
|
22
|
+
* still reflects the pre-compression request. Failed/no-op compresses don't
|
|
23
|
+
* count (nothing was reclaimed). */
|
|
25
24
|
export declare function usageAnchorPredatesCompression(entries: AnchorEntry[]): boolean;
|
|
26
25
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -12077,10 +12077,7 @@ function wireContextTransform(pi, runtime) {
|
|
|
12077
12077
|
const sentTokens = estimateTokens(coreMessages, coveredIds, collectImageTokens(entries, modelSupportsImages(ctx.model))) + systemPromptTokens;
|
|
12078
12078
|
let tokenCount = sentTokens;
|
|
12079
12079
|
const realPromptTokens = realUsage?.tokens ?? 0;
|
|
12080
|
-
|
|
12081
|
-
if (anchorStale && realPromptTokens > sentTokens) {
|
|
12082
|
-
logInfo("floor", { sid, event: "stale-anchor-skip", sentTokens, realPromptTokens });
|
|
12083
|
-
} else if (realPromptTokens > tokenCount) {
|
|
12080
|
+
if (!usageAnchorPredatesCompression(entries) && realPromptTokens > tokenCount) {
|
|
12084
12081
|
tokenCount = realPromptTokens;
|
|
12085
12082
|
}
|
|
12086
12083
|
if (ov.armed && config.modelContextLimit > 0) {
|