We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2a33f7 commit 8c7b35aCopy full SHA for 8c7b35a
1 file changed
packages/opencode/src/session/compaction.ts
@@ -41,7 +41,9 @@ export namespace SessionCompaction {
41
42
const reserved =
43
config.compaction?.reserved ?? Math.min(COMPACTION_BUFFER, ProviderTransform.maxOutputTokens(input.model))
44
- const usable = input.model.limit.input ? input.model.limit.input - reserved : context - reserved
+ const usable = input.model.limit.input
45
+ ? input.model.limit.input - reserved
46
+ : context - ProviderTransform.maxOutputTokens(input.model)
47
return count >= usable
48
}
49
0 commit comments