---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/context/thrift/subtractive_pass/interfaces/EstimatorOptions.md
description: >-
  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.
---

# Interface: EstimatorOptions

Defined in: [src/batteries/context/thrift/subtractive\_pass.ts:186](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L186)

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

* [`SubtractToFitOptions`](SubtractToFitOptions.md)

## Properties

| Property                                              | Type                                                                   | Description                                                                                                                                                                                                                                                                              | Defined in                                                                                                                                                        |
| ----------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `encoding?`            | `string`                                                               | The encoding to measure under. Default: [DEFAULT\_ENCODING](../variables/DEFAULT_ENCODING.md).                                                                                                                                                                                            | [src/batteries/context/thrift/subtractive\_pass.ts:194](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L194) |
|  `estimateTokens` | [`EstimateTokensFn`](../../contracts/type-aliases/EstimateTokensFn.md) | REQUIRED. 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](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/context/thrift/subtractive_pass.ts#L192) |
