fix(core): ensure compaction is more reliable, add reserve token buffer to ensure that input window has enough room to compact (#12924)
Co-authored-by: James Lal <james@littlebearlabs.io>
This commit is contained in:
@@ -203,6 +203,7 @@ export type AssistantMessage = {
|
||||
summary?: boolean
|
||||
cost: number
|
||||
tokens: {
|
||||
total?: number
|
||||
input: number
|
||||
output: number
|
||||
reasoning: number
|
||||
@@ -418,6 +419,7 @@ export type StepFinishPart = {
|
||||
snapshot?: string
|
||||
cost: number
|
||||
tokens: {
|
||||
total?: number
|
||||
input: number
|
||||
output: number
|
||||
reasoning: number
|
||||
@@ -1822,6 +1824,10 @@ export type Config = {
|
||||
* Enable pruning of old tool outputs (default: true)
|
||||
*/
|
||||
prune?: boolean
|
||||
/**
|
||||
* Token buffer for compaction. Leaves enough window to avoid overflow during compaction.
|
||||
*/
|
||||
reserved?: number
|
||||
}
|
||||
experimental?: {
|
||||
disable_paste_summary?: boolean
|
||||
|
||||
Reference in New Issue
Block a user