feat(llm): add replay token metering (PR2 round 1)

This commit is contained in:
Hypatia May
2026-07-15 14:47:29 +08:00
parent c9efdf68f9
commit f038780ff6
61 files changed
+3393 -2369

No files matched your search

@@ -33,10 +33,15 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)('compaction: a long session compa
// Reasoning tokens require a larger generation cap than the retained checkpoint.
ctx = await codingHarness(workdir, {
persona: SYSTEM_PROMPT,
tokenMeter: {
models: {
'deepseek-v4-flash': { contextWindow: 2000 },
},
},
compact: {
contextWindow: 2000,
thresholdRatio: 0.5,
retainTokens: 400,
models: {
'deepseek-v4-flash': { thresholdRatio: 0.5, retainTokens: 400 },
},
summarizationModel: '',
maxTokens: 1024,
compactionRetries: 1,