Skip to content

CountTokensOptions

Defined in: src/models/model.ts:128

Options for counting tokens in a set of messages.

optional systemPrompt?: SystemPrompt;

Defined in: src/models/model.ts:133

System prompt to guide the model’s behavior. Can be a simple string or an array of content blocks for advanced caching.


optional toolSpecs?: ToolSpec[];

Defined in: src/models/model.ts:138

Array of tool specifications to include in the count.