---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/openai_responses/functions/canonicalFingerprint.md
---

# Function: canonicalFingerprint()

```ts
function canonicalFingerprint(value: unknown): Promise<string>;
```

Defined in: [src/batteries/llm/chat\_common/helpers.ts:967](https://github.com/NHTIO/ADK/blob/v1.20260901.0/src/src/batteries/llm/chat_common/helpers.ts#L967)

Computes a SHA-256 fingerprint of `value` via canonical canonicalisation, over its UTF-8
bytes, using `globalThis.crypto.subtle.digest`.

## Parameters

| Parameter | Type      |
| --------- | --------- |
| `value`   | `unknown` |

## Returns

`Promise`<`string`>

## Remarks

Wire-shape-agnostic replay-prefix fingerprinting primitive shared across the Chat-family LLM
batteries' "reasoning replay" features (Anthropic's signed `thinking` blocks, and any sibling
battery's equivalent). Each battery assembles its own wire-shaped prefix object — e.g. `{ model,
system, tools, messages }` for Anthropic Messages — and passes it here; this primitive carries no
knowledge of any individual wire shape.
