fix(core): respect model input limits (#39797)

This commit is contained in:
Aiden Cline 2026-07-31 10:41:36 -05:00 committed by GitHub
commit 7129ed6e62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 83 additions and 25 deletions

View file

@ -95,7 +95,7 @@ Add `compaction` to any [OpenCode configuration file](/config):
| `auto` | `true` | Runs the preflight context-size check. It does not disable manual compaction or one-shot provider-overflow recovery. |
| `prune` | None | Accepted by the V2 schema, but currently has no runtime effect. V2 does not prune old tool outputs in place. |
| `keep.tokens` | `8000` | Approximate number of tokens from the newest serialized conversation context to retain beside the summary. |
| `buffer` | `20000` | Token reserve used by the automatic threshold. The requested model output allowance wins when it is larger. |
| `buffer` | `20000` | Safety reserve below an explicit input limit. Without one, it is the minimum context reserve and the model output allowance wins when larger. |
`keep.tokens` and `buffer` accept non-negative integers. Larger `keep.tokens`
preserves more recent detail but leaves less room for future work. Larger