Skip to content
1 min read · 132 words

Interface: EstimatorOptions

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

Options shared by every entry point in this module that needs to measure a value's token cost — the injected estimator plus the encoding it measures under.

Extended by

Properties

PropertyTypeDescriptionDefined in
encoding?stringThe encoding to measure under. Default: DEFAULT_ENCODING.src/batteries/context/thrift/subtractive_pass.ts:194
estimateTokensEstimateTokensFnREQUIRED. Measures a rendered string's token cost under encoding, optionally resolved against a live dispatch context. There is no default — this battery ships with no bundled tokenizer, so a caller who omits this gets a clear thrown error naming the option, not a silent guess.src/batteries/context/thrift/subtractive_pass.ts:192