Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

ThinkingPart.md

66 lines1.5 KB

1---
2id: ThinkingPart
3title: ThinkingPart
4---
5​
6Defined in: [packages/ai/src/types.ts:538](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L538)
7​
8## Properties
9​
10### content
11​
12```ts
13content: string;
14```
15​
16Defined in: [packages/ai/src/types.ts:540](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L540)
17​
18***
19​
20### redacted?
21​
22```ts
23optional redacted?: boolean;
24```
25​
26Defined in: [packages/ai/src/types.ts:555](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L555)
27​
28The provider encrypted this thinking block (Anthropic `redacted_thinking`).
29`content` is empty, and `signature` holds the opaque data that goes back
30to the provider unchanged. On the AG-UI wire, the reasoning message id
31starts with `redacted_thinking-` instead.
32​
33***
34​
35### signature?
36​
37```ts
38optional signature?: string;
39```
40​
41Defined in: [packages/ai/src/types.ts:548](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L548)
42​
43The provider's opaque reasoning artefact, sent back unchanged: an
44Anthropic signature, Anthropic redacted data, or OpenAI encrypted content.
45TODO(#1581): rename to `encryptedValue` to match AG-UI's `ReasoningMessage`.
46Renaming breaks stored messages, so it needs a read shim for `signature`.
47​
48***
49​
50### stepId?
51​
52```ts
53optional stepId?: string;
54```
55​
56Defined in: [packages/ai/src/types.ts:541](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L541)
57​
58***
59​
60### type
61​
62```ts
63type: "thinking";
64```
65​
66Defined in: [packages/ai/src/types.ts:539](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L539)