Skip to content

Commit 3db6c4d

Browse files
author
testikun
committed
fix(runtime): align compaction dedup with current contract
Generated-by: OpenAI Codex
1 parent 8d9e307 commit 3db6c4d

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

packages/runtime/src/__tests__/ai-sdk-backend.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4545,7 +4545,6 @@ describe('AiSdkBackend model history', () => {
45454545
now: monotonicClock(),
45464546
contextBudget: {
45474547
name: 'in-flight-dedup-test',
4548-
maxHistoryEstimatedTokens: 10_000,
45494548
charsPerToken: 1,
45504549
},
45514550
summarizeHistoryCompact: async () => {

packages/runtime/src/ai-sdk-compaction.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,6 @@ export class AiSdkCompaction {
418418
},
419419
newlyFoldedRuntimeEvents: [...newlyFoldedRuntimeEvents],
420420
...(previousCheckpoint ? { previousCheckpoint } : {}),
421-
inputBudget: {
422-
maxEstimatedTokens: policy.maxHistoryEstimatedTokens ?? estimatedTokensBefore,
423-
charsPerToken,
424-
},
425421
abortSignal: historyCompactAbortController.signal,
426422
...(tracker ? { providerRequestTracker: tracker } : {}),
427423
},
@@ -1160,12 +1156,6 @@ export class AiSdkCompaction {
11601156
},
11611157
...(previousCheckpoint ? { previousCheckpoint } : {}),
11621158
newlyFoldedRuntimeEvents: [...newlyFoldedRuntimeEvents],
1163-
inputBudget: {
1164-
...(state.capacity !== undefined
1165-
? { maxEstimatedTokens: Math.max(1, state.capacity - reserveTokens) }
1166-
: {}),
1167-
charsPerToken,
1168-
},
11691159
...(abortSignal ? { abortSignal } : {}),
11701160
...(midTurnTracker ? { providerRequestTracker: midTurnTracker } : {}),
11711161
},

0 commit comments

Comments
 (0)