Skip to content
1 min read · 226 words

Interface: ThriftTrace

Defined in: src/batteries/context/thrift/subtractive_pass.ts:121

The full record of one subtractive pass — before/after weights per bucket, and whether the dispatch ultimately fits the budget.

Properties

PropertyTypeDescriptionDefined in
bucketsBucketTrace[]One entry per step of the pass, in the order the steps ran, for diagnostics/tracing.src/batteries/context/thrift/subtractive_pass.ts:138
budgetnumberThe INPUT token budget — contextWindow - reserve.src/batteries/context/thrift/subtractive_pass.ts:127
contextWindownumberThe active model's context window this pass was run against.src/batteries/context/thrift/subtractive_pass.ts:123
fitsbooleanWhether totalAfter fits within budget.src/batteries/context/thrift/subtractive_pass.ts:133
refusedbooleanThe dispatch should be refused: !fits — even after every possible shed, the irreducible floor (system prompt + standing instructions + newest turn + output reserve) still exceeds the window.src/batteries/context/thrift/subtractive_pass.ts:136
reservenumberTokens held back for the model's own output (see resolveBudget).src/batteries/context/thrift/subtractive_pass.ts:125
totalAfternumberTotal measured token weight AFTER every shedding step ran.src/batteries/context/thrift/subtractive_pass.ts:131
totalBeforenumberTotal measured token weight BEFORE any shedding (the "everything reasonable" starting point).src/batteries/context/thrift/subtractive_pass.ts:129