Skip to content

Commit 70203ed

Browse files
committed
feat: default compress limits to percentages of model context
Absolute 100K/50K defaults trigger compression reminders far too early on modern large-context models (256K-1M). Use 85%/60% of the model context by default; falls back gracefully when the limit is unknown.
1 parent 4027ffd commit 70203ed

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,10 @@ const defaultConfig: PluginConfig = {
681681
permission: "allow",
682682
showCompression: false,
683683
summaryBuffer: true,
684-
maxContextLimit: 100000,
685-
minContextLimit: 50000,
684+
// 默认按模型 context 的百分比计算阈值:绝对 100K/50K 对现代大 context 模型
685+
// (256K~1M)过小,会在上下文很早期就触发压缩提醒。
686+
maxContextLimit: "85%",
687+
minContextLimit: "60%",
686688
nudgeFrequency: 5,
687689
iterationNudgeThreshold: 15,
688690
nudgeForce: "soft",

0 commit comments

Comments
 (0)