You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 60be51d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/configuration_en.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@ The following are all the top-level fields supported in `settings.json`, along w
29
29
|`env`| object | Group of environment variables (see sub-field table below) |
30
30
|`contextWindow`| number/string | Context-window limit as an exact token count or `128K`/`1M` value |
31
31
|`autoCompactWindow`| number/string | Auto-compaction threshold; defaults to 80% of the context window |
32
+
|`retainRatio`| number | Budget for retaining recent conversation history after compaction, expressed as a fraction of the model's context window (default `0.16`, or 16%) |
33
+
|`retainTokens`| number | Budget for retaining recent conversation history after compaction, expressed as an absolute token count; mutually exclusive with `retainRatio`|
32
34
|`model`| string | Model name. Takes precedence over `env.MODEL`|
33
35
|`thinkingEnabled`| boolean | Whether to enable thinking mode (enabled by default for DeepSeek V4 series)|
@@ -75,7 +77,24 @@ The following are all the top-level fields supported in `settings.json`, along w
75
77
}
76
78
```
77
79
78
-
The default context window is `256K` for regular models and `1M` for DeepSeek V4 models. If the auto-compaction threshold is omitted, it is 50% of the final context window. Invalid values are ignored, and an auto-compaction threshold larger than the context window is capped at the context window.
80
+
The default context window is `256K` for regular models and `1M` for DeepSeek V4 models. If the auto-compaction threshold is omitted, it is 80% of the final context window. Invalid values are ignored, and an auto-compaction threshold larger than the context window is capped at the context window.
81
+
82
+
#### Compaction retention
83
+
84
+
`retainRatio` and `retainTokens` are top-level `settings.json` fields. Set at most one per configuration file. A project-level setting replaces the user-level retention choice; otherwise, the user setting is inherited. With neither set, `retainRatio` defaults to `0.16`.
85
+
86
+
`retainRatio` must be a number in `(0, 1]`. Its budget is the context window minus the output reserve, multiplied by the ratio and rounded down. `retainTokens` must be a non-negative integer; `0` requests no extra tail retention. Strings such as `"32K"` are not supported.
87
+
88
+
The resulting budget must be strictly below the effective auto-compaction threshold. Invalid configurations produce an error rather than silently reducing the retention budget. A low threshold may require an explicit smaller retention budget:
89
+
90
+
```json
91
+
{
92
+
"autoCompactWindow": "180K",
93
+
"retainTokens": 32768
94
+
}
95
+
```
96
+
97
+
These settings apply to automatic compaction. Tool calls and their results stay together, so the retained tail may exceed the budget. Manual compaction and context-overflow recovery continue to use no extra tail retention.
0 commit comments