feat: add compaction ratio setting to control partial context compaction

Allow users to configure what percentage of older messages to compact,
keeping the most recent portion intact. Default ratio is 80%, meaning
the oldest 80% of uncompacted messages are summarized while the newest
20% remain as-is for full-fidelity context.
This commit is contained in:
Acbox
2026-03-29 19:14:43 +08:00
parent fc1ef4ddb3
commit 0e646625bf
23 changed files with 181 additions and 37 deletions
+6
View File
@@ -12392,6 +12392,9 @@
"compaction_model_id": {
"type": "string"
},
"compaction_ratio": {
"type": "integer"
},
"compaction_threshold": {
"type": "integer"
},
@@ -12445,6 +12448,9 @@
"compaction_model_id": {
"type": "string"
},
"compaction_ratio": {
"type": "integer"
},
"compaction_threshold": {
"type": "integer"
},