Are you an LLM? You can read better optimized documentation at /api/@nhtio/adk/batteries/llm/anthropic_messages/count_tokens/functions/countAnthropicMessagesTokensWithResolvedOptions.md for this page in Markdown format
Function: countAnthropicMessagesTokensWithResolvedOptions()
ts
function countAnthropicMessagesTokensWithResolvedOptions(
resolved: AnthropicMessagesAdapterOptions,
input:
| AnthropicMessagesCountTokensRequestInput
| AnthropicMessagesCountTokensInput,
deps?: AnthropicMessagesCountTokensDeps,
): Promise<{
inputTokens: number;
raw: unknown;
}>;Defined in: src/batteries/llm/anthropic_messages/count_tokens.ts:383
Counts tokens using already-resolved Anthropic adapter options.
Parameters
| Parameter | Type | Description |
|---|---|---|
resolved | AnthropicMessagesAdapterOptions | Fully merged and validated adapter options. |
input | | AnthropicMessagesCountTokensRequestInput | AnthropicMessagesCountTokensInput | Either a DispatchContext or a pre-built Anthropic-shaped input object. |
deps? | AnthropicMessagesCountTokensDeps | Optional helper dependencies, including the structured log channel. |
Returns
Promise<{ inputTokens: number; raw: unknown; }>
The named token-count field plus the raw SDK response.