Open History to see the last commit
1---
2id: TanStackRunMetadata
3title: TanStackRunMetadata
4---
5
6Defined in: packages/ai/src/types.ts:757
7
8Shape of `metadata.tanstack` on run events.
9
10## Properties
11
12### args?
13
14```ts
15optional args?: string;
16```
17
18Defined in: packages/ai/src/types.ts:777
19
20The raw tool argument string on `TOOL_CALL_END`, as the provider sent it.
21
22***
23
24### finishReason?
25
26```ts
27optional finishReason?: "length" | "stop" | "content_filter" | "tool_calls" | null;
28```
29
30Defined in: packages/ai/src/types.ts:763
31
32***
33
34### index?
35
36```ts
37optional index?: number;
38```
39
40Defined in: packages/ai/src/types.ts:770
41
42***
43
44### input?
45
46```ts
47optional input?: unknown;
48```
49
50Defined in: packages/ai/src/types.ts:775
51
52Parsed `TOOL_CALL_END` input. Spec `TOOL_CALL_END` has no top-level `input`.
53
54***
55
56### interruptErrors?
57
58```ts
59optional interruptErrors?: readonly InterruptSubmissionError[];
60```
61
62Defined in: packages/ai/src/types.ts:766
63
64***
65
66### model?
67
68```ts
69optional model?: string;
70```
71
72Defined in: packages/ai/src/types.ts:759
73
74***
75
76### responseId?
77
78```ts
79optional responseId?: string;
80```
81
82Defined in: packages/ai/src/types.ts:760
83
84***
85
86### responseItems?
87
88```ts
89optional responseItems?: object[];
90```
91
92Defined in: packages/ai/src/types.ts:762
93
94The answer items of this model call. See `TanStackMessageMetadata.responseItems`.
95
96#### id
97
98```ts
99id: string;
100```
101
102#### phase?
103
104```ts
105optional phase?: string;
106```
107
108***
109
110### retryAfterMs?
111
112```ts
113optional retryAfterMs?: number;
114```
115
116Defined in: packages/ai/src/types.ts:772
117
118On a `RUN_ERROR`. See `RunErrorEvent.retryAfterMs`.
119
120***
121
122### runId?
123
124```ts
125optional runId?: string;
126```
127
128Defined in: packages/ai/src/types.ts:768
129
130***
131
132### sessionId?
133
134```ts
135optional sessionId?: string;
136```
137
138Defined in: packages/ai/src/types.ts:769
139
140***
141
142### source?
143
144```ts
145optional source?: MessageSource;
146```
147
148Defined in: packages/ai/src/types.ts:758
149
150***
151
152### state?
153
154```ts
155optional state?: ToolOutputState;
156```
157
158Defined in: packages/ai/src/types.ts:773
159
160***
161
162### threadId?
163
164```ts
165optional threadId?: string;
166```
167
168Defined in: packages/ai/src/types.ts:767
169
170***
171
172### usage?
173
174```ts
175optional usage?: TokenUsageLeftover;
176```
177
178Defined in: packages/ai/src/types.ts:765
179
180TokenUsage fields that have no AG-UI `usage[]` equivalent.