---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/anthropic_messages/helpers/functions/fingerprintAnthropicMessagesPrefix.md
---

# Function: fingerprintAnthropicMessagesPrefix()

```ts
function fingerprintAnthropicMessagesPrefix(input: {
  messages: MessageParam[];
  model: string;
  system?: string | TextBlockParam[];
  throughBlock?: {
    contentIndex: number;
    messageIndex: number;
  };
  tools?: Tool[];
}): Promise<string>;
```

Defined in: [src/batteries/llm/anthropic\_messages/helpers.ts:394](https://github.com/NHTIO/ADK/blob/v1.20260726.0/src/src/batteries/llm/anthropic_messages/helpers.ts#L394)

Computes the SHA-256 fingerprint used for Anthropic thinking replay.

The input is the exact assembled request prefix: model, resolved system, tools, and messages
through the content block immediately before the thinking block. Object keys are recursively sorted;
array order and block boundaries are preserved.

## Parameters

| Parameter                         | Type                                                                                                                                                                                              |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`                           | { `messages`: `MessageParam`\[]; `model`: `string`; `system?`: `string` | `TextBlockParam`\[]; `throughBlock?`: { `contentIndex`: `number`; `messageIndex`: `number`; }; `tools?`: `Tool`\[]; } |
| `input.messages`                  | `MessageParam`\[]                                                                                                                                                                                  |
| `input.model`                     | `string`                                                                                                                                                                                          |
| `input.system?`                   | `string` | `TextBlockParam`\[]                                                                                                                                                                    |
| `input.throughBlock?`             | { `contentIndex`: `number`; `messageIndex`: `number`; }                                                                                                                                         |
| `input.throughBlock.contentIndex` | `number`                                                                                                                                                                                          |
| `input.throughBlock.messageIndex` | `number`                                                                                                                                                                                          |
| `input.tools?`                    | `Tool`\[]                                                                                                                                                                                          |

## Returns

`Promise`<`string`>
