@convex-dev/agent 0.6.3 → 0.7.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +60 -116
- package/dist/client/messages.d.ts +1 -398
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +3 -47
- package/dist/client/messages.js.map +1 -1
- package/dist/client/types.d.ts +1 -455
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/component.d.ts +805 -45
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/apiKeys.js +5 -5
- package/dist/component/apiKeys.js.map +1 -1
- package/dist/component/files.d.ts.map +1 -1
- package/dist/component/files.js +13 -11
- package/dist/component/files.js.map +1 -1
- package/dist/component/messages.d.ts +1252 -201
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/messages.js +83 -47
- package/dist/component/messages.js.map +1 -1
- package/dist/component/schema.d.ts +2593 -332
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/streams.d.ts +7 -1
- package/dist/component/streams.d.ts.map +1 -1
- package/dist/component/streams.js +46 -47
- package/dist/component/streams.js.map +1 -1
- package/dist/component/threads.d.ts.map +1 -1
- package/dist/component/threads.js +8 -9
- package/dist/component/threads.js.map +1 -1
- package/dist/component/users.js +2 -2
- package/dist/component/users.js.map +1 -1
- package/dist/component/vector/index.d.ts.map +1 -1
- package/dist/component/vector/index.js +14 -8
- package/dist/component/vector/index.js.map +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +5 -5
- package/dist/react/index.js.map +1 -1
- package/dist/shared.d.ts +19 -7
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +4 -4
- package/dist/shared.js.map +1 -1
- package/dist/streaming/materializePersistedUIMessageChunks.d.ts +16 -0
- package/dist/streaming/materializePersistedUIMessageChunks.d.ts.map +1 -0
- package/dist/streaming/materializePersistedUIMessageChunks.js +302 -0
- package/dist/streaming/materializePersistedUIMessageChunks.js.map +1 -0
- package/dist/streaming/persistedUIMessageChunks.d.ts +106 -0
- package/dist/streaming/persistedUIMessageChunks.d.ts.map +1 -0
- package/dist/streaming/persistedUIMessageChunks.js +475 -0
- package/dist/streaming/persistedUIMessageChunks.js.map +1 -0
- package/dist/validators.d.ts +10026 -1055
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +71 -9
- package/dist/validators.js.map +1 -1
- package/dist/{UIMessages.d.ts → vercel/UIMessages.d.ts} +1 -1
- package/dist/vercel/UIMessages.d.ts.map +1 -0
- package/dist/{UIMessages.js → vercel/UIMessages.js} +63 -1
- package/dist/vercel/UIMessages.js.map +1 -0
- package/dist/{client → vercel/client}/createTool.d.ts +23 -16
- package/dist/vercel/client/createTool.d.ts.map +1 -0
- package/dist/{client → vercel/client}/createTool.js +2 -0
- package/dist/vercel/client/createTool.js.map +1 -0
- package/dist/{client → vercel/client}/definePlaygroundAPI.d.ts +593 -134
- package/dist/{client → vercel/client}/definePlaygroundAPI.d.ts.map +1 -1
- package/dist/{client → vercel/client}/definePlaygroundAPI.js +13 -9
- package/dist/vercel/client/definePlaygroundAPI.js.map +1 -0
- package/dist/{client → vercel/client}/files.d.ts +2 -2
- package/dist/vercel/client/files.d.ts.map +1 -0
- package/dist/vercel/client/files.js.map +1 -0
- package/dist/vercel/client/messages.d.ts +542 -0
- package/dist/vercel/client/messages.d.ts.map +1 -0
- package/dist/vercel/client/messages.js +66 -0
- package/dist/vercel/client/messages.js.map +1 -0
- package/dist/{client → vercel/client}/mockModel.d.ts +17 -17
- package/dist/vercel/client/mockModel.d.ts.map +1 -0
- package/dist/{client → vercel/client}/mockModel.js +12 -13
- package/dist/vercel/client/mockModel.js.map +1 -0
- package/dist/{client → vercel/client}/saveInputMessages.d.ts +2 -2
- package/dist/vercel/client/saveInputMessages.d.ts.map +1 -0
- package/dist/vercel/client/saveInputMessages.js.map +1 -0
- package/dist/{client → vercel/client}/search.d.ts +119 -22
- package/dist/vercel/client/search.d.ts.map +1 -0
- package/dist/{client → vercel/client}/search.js +2 -2
- package/dist/vercel/client/search.js.map +1 -0
- package/dist/{client → vercel/client}/start.d.ts +26 -11
- package/dist/vercel/client/start.d.ts.map +1 -0
- package/dist/{client → vercel/client}/start.js +64 -22
- package/dist/vercel/client/start.js.map +1 -0
- package/dist/{client → vercel/client}/streamText.d.ts +13 -12
- package/dist/vercel/client/streamText.d.ts.map +1 -0
- package/dist/{client → vercel/client}/streamText.js +43 -9
- package/dist/vercel/client/streamText.js.map +1 -0
- package/dist/{client → vercel/client}/streaming.d.ts +1410 -183
- package/dist/vercel/client/streaming.d.ts.map +1 -0
- package/dist/{client → vercel/client}/streaming.js +120 -52
- package/dist/vercel/client/streaming.js.map +1 -0
- package/dist/vercel/client/types.d.ts +456 -0
- package/dist/vercel/client/types.d.ts.map +1 -0
- package/dist/vercel/client/types.js +3 -0
- package/dist/vercel/client/types.js.map +1 -0
- package/dist/{client → vercel/client}/utils.d.ts +3 -2
- package/dist/vercel/client/utils.d.ts.map +1 -0
- package/dist/{client → vercel/client}/utils.js +2 -2
- package/dist/vercel/client/utils.js.map +1 -0
- package/dist/vercel/deltas.d.ts +31 -0
- package/dist/vercel/deltas.d.ts.map +1 -0
- package/dist/vercel/deltas.js +525 -0
- package/dist/vercel/deltas.js.map +1 -0
- package/dist/{client → vercel}/index.d.ts +484 -97
- package/dist/vercel/index.d.ts.map +1 -0
- package/dist/{client → vercel}/index.js +65 -38
- package/dist/vercel/index.js.map +1 -0
- package/dist/{mapping.d.ts → vercel/mapping.d.ts} +5 -13
- package/dist/vercel/mapping.d.ts.map +1 -0
- package/dist/{mapping.js → vercel/mapping.js} +411 -112
- package/dist/vercel/mapping.js.map +1 -0
- package/dist/{react → vercel/react}/optimisticallySendMessage.d.ts +2 -2
- package/dist/vercel/react/optimisticallySendMessage.d.ts.map +1 -0
- package/dist/vercel/react/optimisticallySendMessage.js.map +1 -0
- package/dist/{react → vercel/react}/types.d.ts +1 -1
- package/dist/vercel/react/types.d.ts.map +1 -0
- package/dist/{react → vercel/react}/types.js.map +1 -1
- package/dist/{react → vercel/react}/useDeltaStreams.d.ts +1 -1
- package/dist/vercel/react/useDeltaStreams.d.ts.map +1 -0
- package/dist/{react → vercel/react}/useDeltaStreams.js +1 -1
- package/dist/vercel/react/useDeltaStreams.js.map +1 -0
- package/dist/{react → vercel/react}/useStreamingUIMessages.d.ts +1 -1
- package/dist/vercel/react/useStreamingUIMessages.d.ts.map +1 -0
- package/dist/vercel/react/useStreamingUIMessages.js +112 -0
- package/dist/vercel/react/useStreamingUIMessages.js.map +1 -0
- package/dist/{react → vercel/react}/useThreadMessages.d.ts +1 -1
- package/dist/vercel/react/useThreadMessages.d.ts.map +1 -0
- package/dist/{react → vercel/react}/useThreadMessages.js +1 -1
- package/dist/vercel/react/useThreadMessages.js.map +1 -0
- package/dist/{react → vercel/react}/useUIMessages.d.ts +2 -1
- package/dist/vercel/react/useUIMessages.d.ts.map +1 -0
- package/dist/{react → vercel/react}/useUIMessages.js +8 -4
- package/dist/vercel/react/useUIMessages.js.map +1 -0
- package/package.json +30 -22
- package/src/client/messages.ts +5 -107
- package/src/client/types.ts +0 -621
- package/src/component/_generated/component.ts +1089 -48
- package/src/component/apiKeys.ts +5 -5
- package/src/component/files.test.ts +1 -1
- package/src/component/files.ts +14 -12
- package/src/component/messages.test.ts +273 -1
- package/src/component/messages.ts +99 -57
- package/src/component/streams.ts +80 -64
- package/src/component/threads.ts +12 -9
- package/src/component/users.ts +2 -2
- package/src/component/vector/index.ts +14 -7
- package/src/eslintConfig.test.ts +44 -0
- package/src/react/index.ts +8 -5
- package/src/shared.ts +26 -36
- package/src/streaming/materializePersistedUIMessageChunks.test.ts +513 -0
- package/src/streaming/materializePersistedUIMessageChunks.ts +398 -0
- package/src/streaming/persistedUIMessageChunks.test.ts +205 -0
- package/src/streaming/persistedUIMessageChunks.ts +658 -0
- package/src/validators.test.ts +4 -1
- package/src/validators.ts +89 -8
- package/src/{UIMessages.combineUIMessages.test.ts → vercel/UIMessages.combineUIMessages.test.ts} +4 -1
- package/src/{UIMessages.ts → vercel/UIMessages.ts} +96 -5
- package/src/{client → vercel/client}/approval.test.ts +48 -19
- package/src/{client → vercel/client}/createTool.ts +63 -23
- package/src/{client → vercel/client}/definePlaygroundAPI.ts +44 -29
- package/src/{client → vercel/client}/files.ts +2 -2
- package/src/{client → vercel/client}/index.test.ts +162 -3
- package/src/vercel/client/messages.ts +182 -0
- package/src/{client → vercel/client}/mockModel.ts +38 -39
- package/src/{client → vercel/client}/saveInputMessages.test.ts +1 -1
- package/src/{client → vercel/client}/saveInputMessages.ts +7 -4
- package/src/{client → vercel/client}/search.test.ts +3 -3
- package/src/{client → vercel/client}/search.ts +4 -4
- package/src/{client → vercel/client}/setup.test.ts +6 -3
- package/src/vercel/client/start.test.ts +14 -0
- package/src/{client → vercel/client}/start.ts +147 -36
- package/src/vercel/client/streamText.test.ts +223 -0
- package/src/{client → vercel/client}/streamText.ts +102 -31
- package/src/{client → vercel/client}/streaming.integration.test.ts +40 -115
- package/src/{client → vercel/client}/streaming.test.ts +178 -4
- package/src/{client → vercel/client}/streaming.ts +114 -52
- package/src/vercel/client/types.test.ts +13 -0
- package/src/vercel/client/types.ts +679 -0
- package/src/{client → vercel/client}/utils.ts +13 -7
- package/src/vercel/deltas.test.ts +898 -0
- package/src/vercel/deltas.ts +633 -0
- package/src/{fromUIMessages.test.ts → vercel/fromUIMessages.test.ts} +17 -1
- package/src/{client → vercel}/index.ts +169 -62
- package/src/vercel/mapping.test.ts +965 -0
- package/src/{mapping.ts → vercel/mapping.ts} +501 -131
- package/src/{react → vercel/react}/optimisticallySendMessage.ts +2 -2
- package/src/{react → vercel/react}/types.ts +1 -1
- package/src/{react → vercel/react}/useDeltaStreams.ts +6 -2
- package/src/{react → vercel/react}/useStreamingUIMessages.ts +67 -35
- package/src/{react → vercel/react}/useThreadMessages.ts +2 -2
- package/src/{react → vercel/react}/useUIMessages.test.ts +80 -1
- package/src/{react → vercel/react}/useUIMessages.ts +13 -5
- package/src/{toUIMessages.test.ts → vercel/toUIMessages.test.ts} +49 -2
- package/dist/UIMessages.d.ts.map +0 -1
- package/dist/UIMessages.js.map +0 -1
- package/dist/client/createTool.d.ts.map +0 -1
- package/dist/client/createTool.js.map +0 -1
- package/dist/client/definePlaygroundAPI.js.map +0 -1
- package/dist/client/files.d.ts.map +0 -1
- package/dist/client/files.js.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/client/mockModel.d.ts.map +0 -1
- package/dist/client/mockModel.js.map +0 -1
- package/dist/client/saveInputMessages.d.ts.map +0 -1
- package/dist/client/saveInputMessages.js.map +0 -1
- package/dist/client/search.d.ts.map +0 -1
- package/dist/client/search.js.map +0 -1
- package/dist/client/start.d.ts.map +0 -1
- package/dist/client/start.js.map +0 -1
- package/dist/client/streamText.d.ts.map +0 -1
- package/dist/client/streamText.js.map +0 -1
- package/dist/client/streaming.d.ts.map +0 -1
- package/dist/client/streaming.js.map +0 -1
- package/dist/client/utils.d.ts.map +0 -1
- package/dist/client/utils.js.map +0 -1
- package/dist/deltas.d.ts +0 -43
- package/dist/deltas.d.ts.map +0 -1
- package/dist/deltas.js +0 -446
- package/dist/deltas.js.map +0 -1
- package/dist/mapping.d.ts.map +0 -1
- package/dist/mapping.js.map +0 -1
- package/dist/react/optimisticallySendMessage.d.ts.map +0 -1
- package/dist/react/optimisticallySendMessage.js.map +0 -1
- package/dist/react/types.d.ts.map +0 -1
- package/dist/react/useDeltaStreams.d.ts.map +0 -1
- package/dist/react/useDeltaStreams.js.map +0 -1
- package/dist/react/useStreamingUIMessages.d.ts.map +0 -1
- package/dist/react/useStreamingUIMessages.js +0 -92
- package/dist/react/useStreamingUIMessages.js.map +0 -1
- package/dist/react/useThreadMessages.d.ts.map +0 -1
- package/dist/react/useThreadMessages.js.map +0 -1
- package/dist/react/useUIMessages.d.ts.map +0 -1
- package/dist/react/useUIMessages.js.map +0 -1
- package/src/client/streamText.test.ts +0 -102
- package/src/deltas.test.ts +0 -626
- package/src/deltas.ts +0 -569
- package/src/mapping.test.ts +0 -402
- /package/dist/{client → vercel/client}/files.js +0 -0
- /package/dist/{client → vercel/client}/saveInputMessages.js +0 -0
- /package/dist/{react → vercel/react}/optimisticallySendMessage.js +0 -0
- /package/dist/{react → vercel/react}/types.js +0 -0
- /package/src/{UIMessages.test.ts → vercel/UIMessages.test.ts} +0 -0
|
@@ -185,7 +185,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
185
185
|
type: "text";
|
|
186
186
|
}
|
|
187
187
|
| {
|
|
188
|
-
image:
|
|
188
|
+
image:
|
|
189
|
+
| string
|
|
190
|
+
| ArrayBuffer
|
|
191
|
+
| {
|
|
192
|
+
reference: Record<string, string>;
|
|
193
|
+
type: "reference";
|
|
194
|
+
};
|
|
189
195
|
mediaType?: string;
|
|
190
196
|
mimeType?: string;
|
|
191
197
|
providerOptions?: Record<
|
|
@@ -195,7 +201,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
195
201
|
type: "image";
|
|
196
202
|
}
|
|
197
203
|
| {
|
|
198
|
-
data:
|
|
204
|
+
data:
|
|
205
|
+
| string
|
|
206
|
+
| ArrayBuffer
|
|
207
|
+
| {
|
|
208
|
+
reference: Record<string, string>;
|
|
209
|
+
type: "reference";
|
|
210
|
+
};
|
|
199
211
|
filename?: string;
|
|
200
212
|
mediaType?: string;
|
|
201
213
|
mimeType?: string;
|
|
@@ -230,7 +242,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
230
242
|
type: "text";
|
|
231
243
|
}
|
|
232
244
|
| {
|
|
233
|
-
data:
|
|
245
|
+
data:
|
|
246
|
+
| string
|
|
247
|
+
| ArrayBuffer
|
|
248
|
+
| {
|
|
249
|
+
reference: Record<string, string>;
|
|
250
|
+
type: "reference";
|
|
251
|
+
};
|
|
234
252
|
filename?: string;
|
|
235
253
|
mediaType?: string;
|
|
236
254
|
mimeType?: string;
|
|
@@ -257,6 +275,32 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
257
275
|
text: string;
|
|
258
276
|
type: "reasoning";
|
|
259
277
|
}
|
|
278
|
+
| {
|
|
279
|
+
data?: string | ArrayBuffer;
|
|
280
|
+
mediaType: string;
|
|
281
|
+
providerMetadata?: Record<
|
|
282
|
+
string,
|
|
283
|
+
Record<string, any>
|
|
284
|
+
>;
|
|
285
|
+
providerOptions?: Record<
|
|
286
|
+
string,
|
|
287
|
+
Record<string, any>
|
|
288
|
+
>;
|
|
289
|
+
type: "reasoning-file";
|
|
290
|
+
url?: string;
|
|
291
|
+
}
|
|
292
|
+
| {
|
|
293
|
+
kind: string;
|
|
294
|
+
providerMetadata?: Record<
|
|
295
|
+
string,
|
|
296
|
+
Record<string, any>
|
|
297
|
+
>;
|
|
298
|
+
providerOptions?: Record<
|
|
299
|
+
string,
|
|
300
|
+
Record<string, any>
|
|
301
|
+
>;
|
|
302
|
+
type: "custom";
|
|
303
|
+
}
|
|
260
304
|
| {
|
|
261
305
|
data: string;
|
|
262
306
|
providerMetadata?: Record<
|
|
@@ -281,7 +325,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
281
325
|
string,
|
|
282
326
|
Record<string, any>
|
|
283
327
|
>;
|
|
328
|
+
title?: string;
|
|
284
329
|
toolCallId: string;
|
|
330
|
+
toolMetadata?: Record<string, any>;
|
|
285
331
|
toolName: string;
|
|
286
332
|
type: "tool-call";
|
|
287
333
|
}
|
|
@@ -297,7 +343,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
297
343
|
string,
|
|
298
344
|
Record<string, any>
|
|
299
345
|
>;
|
|
346
|
+
title?: string;
|
|
300
347
|
toolCallId: string;
|
|
348
|
+
toolMetadata?: Record<string, any>;
|
|
301
349
|
toolName: string;
|
|
302
350
|
type: "tool-call";
|
|
303
351
|
}
|
|
@@ -364,6 +412,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
364
412
|
text: string;
|
|
365
413
|
type: "text";
|
|
366
414
|
}
|
|
415
|
+
| {
|
|
416
|
+
data:
|
|
417
|
+
| { type: "url"; url: string }
|
|
418
|
+
| {
|
|
419
|
+
reference: Record<string, string>;
|
|
420
|
+
type: "reference";
|
|
421
|
+
}
|
|
422
|
+
| {
|
|
423
|
+
data: string | ArrayBuffer;
|
|
424
|
+
type: "data";
|
|
425
|
+
}
|
|
426
|
+
| { text: string; type: "text" };
|
|
427
|
+
filename?: string;
|
|
428
|
+
mediaType: string;
|
|
429
|
+
providerOptions?: Record<
|
|
430
|
+
string,
|
|
431
|
+
Record<string, any>
|
|
432
|
+
>;
|
|
433
|
+
type: "file";
|
|
434
|
+
}
|
|
367
435
|
| {
|
|
368
436
|
data: string;
|
|
369
437
|
mediaType: string;
|
|
@@ -380,6 +448,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
380
448
|
type: "file-data";
|
|
381
449
|
}
|
|
382
450
|
| {
|
|
451
|
+
mediaType?: string;
|
|
383
452
|
providerOptions?: Record<
|
|
384
453
|
string,
|
|
385
454
|
Record<string, any>
|
|
@@ -395,6 +464,17 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
395
464
|
>;
|
|
396
465
|
type: "file-id";
|
|
397
466
|
}
|
|
467
|
+
| {
|
|
468
|
+
providerOptions?: Record<
|
|
469
|
+
string,
|
|
470
|
+
Record<string, any>
|
|
471
|
+
>;
|
|
472
|
+
providerReference: Record<
|
|
473
|
+
string,
|
|
474
|
+
string
|
|
475
|
+
>;
|
|
476
|
+
type: "file-reference";
|
|
477
|
+
}
|
|
398
478
|
| {
|
|
399
479
|
data: string;
|
|
400
480
|
mediaType: string;
|
|
@@ -404,6 +484,17 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
404
484
|
>;
|
|
405
485
|
type: "image-data";
|
|
406
486
|
}
|
|
487
|
+
| {
|
|
488
|
+
providerOptions?: Record<
|
|
489
|
+
string,
|
|
490
|
+
Record<string, any>
|
|
491
|
+
>;
|
|
492
|
+
providerReference: Record<
|
|
493
|
+
string,
|
|
494
|
+
string
|
|
495
|
+
>;
|
|
496
|
+
type: "image-file-reference";
|
|
497
|
+
}
|
|
407
498
|
| {
|
|
408
499
|
providerOptions?: Record<
|
|
409
500
|
string,
|
|
@@ -476,6 +567,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
476
567
|
}
|
|
477
568
|
| {
|
|
478
569
|
approvalId: string;
|
|
570
|
+
isAutomatic?: boolean;
|
|
479
571
|
providerMetadata?: Record<
|
|
480
572
|
string,
|
|
481
573
|
Record<string, any>
|
|
@@ -484,6 +576,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
484
576
|
string,
|
|
485
577
|
Record<string, any>
|
|
486
578
|
>;
|
|
579
|
+
signature?: string;
|
|
487
580
|
toolCallId: string;
|
|
488
581
|
type: "tool-approval-request";
|
|
489
582
|
}
|
|
@@ -552,6 +645,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
552
645
|
text: string;
|
|
553
646
|
type: "text";
|
|
554
647
|
}
|
|
648
|
+
| {
|
|
649
|
+
data:
|
|
650
|
+
| { type: "url"; url: string }
|
|
651
|
+
| {
|
|
652
|
+
reference: Record<string, string>;
|
|
653
|
+
type: "reference";
|
|
654
|
+
}
|
|
655
|
+
| {
|
|
656
|
+
data: string | ArrayBuffer;
|
|
657
|
+
type: "data";
|
|
658
|
+
}
|
|
659
|
+
| { text: string; type: "text" };
|
|
660
|
+
filename?: string;
|
|
661
|
+
mediaType: string;
|
|
662
|
+
providerOptions?: Record<
|
|
663
|
+
string,
|
|
664
|
+
Record<string, any>
|
|
665
|
+
>;
|
|
666
|
+
type: "file";
|
|
667
|
+
}
|
|
555
668
|
| {
|
|
556
669
|
data: string;
|
|
557
670
|
mediaType: string;
|
|
@@ -568,6 +681,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
568
681
|
type: "file-data";
|
|
569
682
|
}
|
|
570
683
|
| {
|
|
684
|
+
mediaType?: string;
|
|
571
685
|
providerOptions?: Record<
|
|
572
686
|
string,
|
|
573
687
|
Record<string, any>
|
|
@@ -583,6 +697,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
583
697
|
>;
|
|
584
698
|
type: "file-id";
|
|
585
699
|
}
|
|
700
|
+
| {
|
|
701
|
+
providerOptions?: Record<
|
|
702
|
+
string,
|
|
703
|
+
Record<string, any>
|
|
704
|
+
>;
|
|
705
|
+
providerReference: Record<string, string>;
|
|
706
|
+
type: "file-reference";
|
|
707
|
+
}
|
|
586
708
|
| {
|
|
587
709
|
data: string;
|
|
588
710
|
mediaType: string;
|
|
@@ -592,6 +714,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
592
714
|
>;
|
|
593
715
|
type: "image-data";
|
|
594
716
|
}
|
|
717
|
+
| {
|
|
718
|
+
providerOptions?: Record<
|
|
719
|
+
string,
|
|
720
|
+
Record<string, any>
|
|
721
|
+
>;
|
|
722
|
+
providerReference: Record<string, string>;
|
|
723
|
+
type: "image-file-reference";
|
|
724
|
+
}
|
|
595
725
|
| {
|
|
596
726
|
providerOptions?: Record<
|
|
597
727
|
string,
|
|
@@ -682,13 +812,20 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
682
812
|
status?: "pending" | "success" | "failed";
|
|
683
813
|
text?: string;
|
|
684
814
|
usage?: {
|
|
815
|
+
cacheWriteInputTokens?: number;
|
|
685
816
|
cachedInputTokens?: number;
|
|
686
|
-
completionTokens
|
|
687
|
-
|
|
817
|
+
completionTokens?: number;
|
|
818
|
+
nonCachedInputTokens?: number;
|
|
819
|
+
promptTokens?: number;
|
|
820
|
+
raw?: Record<string, any>;
|
|
688
821
|
reasoningTokens?: number;
|
|
689
|
-
|
|
822
|
+
textOutputTokens?: number;
|
|
823
|
+
totalTokens?: number;
|
|
690
824
|
};
|
|
691
825
|
warnings?: Array<
|
|
826
|
+
| { details?: string; feature: string; type: "unsupported" }
|
|
827
|
+
| { details?: string; feature: string; type: "compatibility" }
|
|
828
|
+
| { message: string; setting: string; type: "deprecated" }
|
|
692
829
|
| {
|
|
693
830
|
details?: string;
|
|
694
831
|
setting: string;
|
|
@@ -738,7 +875,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
738
875
|
type: "text";
|
|
739
876
|
}
|
|
740
877
|
| {
|
|
741
|
-
image:
|
|
878
|
+
image:
|
|
879
|
+
| string
|
|
880
|
+
| ArrayBuffer
|
|
881
|
+
| {
|
|
882
|
+
reference: Record<string, string>;
|
|
883
|
+
type: "reference";
|
|
884
|
+
};
|
|
742
885
|
mediaType?: string;
|
|
743
886
|
mimeType?: string;
|
|
744
887
|
providerOptions?: Record<
|
|
@@ -748,7 +891,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
748
891
|
type: "image";
|
|
749
892
|
}
|
|
750
893
|
| {
|
|
751
|
-
data:
|
|
894
|
+
data:
|
|
895
|
+
| string
|
|
896
|
+
| ArrayBuffer
|
|
897
|
+
| {
|
|
898
|
+
reference: Record<string, string>;
|
|
899
|
+
type: "reference";
|
|
900
|
+
};
|
|
752
901
|
filename?: string;
|
|
753
902
|
mediaType?: string;
|
|
754
903
|
mimeType?: string;
|
|
@@ -783,7 +932,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
783
932
|
type: "text";
|
|
784
933
|
}
|
|
785
934
|
| {
|
|
786
|
-
data:
|
|
935
|
+
data:
|
|
936
|
+
| string
|
|
937
|
+
| ArrayBuffer
|
|
938
|
+
| {
|
|
939
|
+
reference: Record<string, string>;
|
|
940
|
+
type: "reference";
|
|
941
|
+
};
|
|
787
942
|
filename?: string;
|
|
788
943
|
mediaType?: string;
|
|
789
944
|
mimeType?: string;
|
|
@@ -810,6 +965,32 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
810
965
|
text: string;
|
|
811
966
|
type: "reasoning";
|
|
812
967
|
}
|
|
968
|
+
| {
|
|
969
|
+
data?: string | ArrayBuffer;
|
|
970
|
+
mediaType: string;
|
|
971
|
+
providerMetadata?: Record<
|
|
972
|
+
string,
|
|
973
|
+
Record<string, any>
|
|
974
|
+
>;
|
|
975
|
+
providerOptions?: Record<
|
|
976
|
+
string,
|
|
977
|
+
Record<string, any>
|
|
978
|
+
>;
|
|
979
|
+
type: "reasoning-file";
|
|
980
|
+
url?: string;
|
|
981
|
+
}
|
|
982
|
+
| {
|
|
983
|
+
kind: string;
|
|
984
|
+
providerMetadata?: Record<
|
|
985
|
+
string,
|
|
986
|
+
Record<string, any>
|
|
987
|
+
>;
|
|
988
|
+
providerOptions?: Record<
|
|
989
|
+
string,
|
|
990
|
+
Record<string, any>
|
|
991
|
+
>;
|
|
992
|
+
type: "custom";
|
|
993
|
+
}
|
|
813
994
|
| {
|
|
814
995
|
data: string;
|
|
815
996
|
providerMetadata?: Record<
|
|
@@ -834,7 +1015,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
834
1015
|
string,
|
|
835
1016
|
Record<string, any>
|
|
836
1017
|
>;
|
|
1018
|
+
title?: string;
|
|
837
1019
|
toolCallId: string;
|
|
1020
|
+
toolMetadata?: Record<string, any>;
|
|
838
1021
|
toolName: string;
|
|
839
1022
|
type: "tool-call";
|
|
840
1023
|
}
|
|
@@ -850,7 +1033,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
850
1033
|
string,
|
|
851
1034
|
Record<string, any>
|
|
852
1035
|
>;
|
|
1036
|
+
title?: string;
|
|
853
1037
|
toolCallId: string;
|
|
1038
|
+
toolMetadata?: Record<string, any>;
|
|
854
1039
|
toolName: string;
|
|
855
1040
|
type: "tool-call";
|
|
856
1041
|
}
|
|
@@ -917,6 +1102,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
917
1102
|
text: string;
|
|
918
1103
|
type: "text";
|
|
919
1104
|
}
|
|
1105
|
+
| {
|
|
1106
|
+
data:
|
|
1107
|
+
| { type: "url"; url: string }
|
|
1108
|
+
| {
|
|
1109
|
+
reference: Record<string, string>;
|
|
1110
|
+
type: "reference";
|
|
1111
|
+
}
|
|
1112
|
+
| {
|
|
1113
|
+
data: string | ArrayBuffer;
|
|
1114
|
+
type: "data";
|
|
1115
|
+
}
|
|
1116
|
+
| { text: string; type: "text" };
|
|
1117
|
+
filename?: string;
|
|
1118
|
+
mediaType: string;
|
|
1119
|
+
providerOptions?: Record<
|
|
1120
|
+
string,
|
|
1121
|
+
Record<string, any>
|
|
1122
|
+
>;
|
|
1123
|
+
type: "file";
|
|
1124
|
+
}
|
|
920
1125
|
| {
|
|
921
1126
|
data: string;
|
|
922
1127
|
mediaType: string;
|
|
@@ -933,6 +1138,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
933
1138
|
type: "file-data";
|
|
934
1139
|
}
|
|
935
1140
|
| {
|
|
1141
|
+
mediaType?: string;
|
|
936
1142
|
providerOptions?: Record<
|
|
937
1143
|
string,
|
|
938
1144
|
Record<string, any>
|
|
@@ -948,6 +1154,17 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
948
1154
|
>;
|
|
949
1155
|
type: "file-id";
|
|
950
1156
|
}
|
|
1157
|
+
| {
|
|
1158
|
+
providerOptions?: Record<
|
|
1159
|
+
string,
|
|
1160
|
+
Record<string, any>
|
|
1161
|
+
>;
|
|
1162
|
+
providerReference: Record<
|
|
1163
|
+
string,
|
|
1164
|
+
string
|
|
1165
|
+
>;
|
|
1166
|
+
type: "file-reference";
|
|
1167
|
+
}
|
|
951
1168
|
| {
|
|
952
1169
|
data: string;
|
|
953
1170
|
mediaType: string;
|
|
@@ -957,6 +1174,17 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
957
1174
|
>;
|
|
958
1175
|
type: "image-data";
|
|
959
1176
|
}
|
|
1177
|
+
| {
|
|
1178
|
+
providerOptions?: Record<
|
|
1179
|
+
string,
|
|
1180
|
+
Record<string, any>
|
|
1181
|
+
>;
|
|
1182
|
+
providerReference: Record<
|
|
1183
|
+
string,
|
|
1184
|
+
string
|
|
1185
|
+
>;
|
|
1186
|
+
type: "image-file-reference";
|
|
1187
|
+
}
|
|
960
1188
|
| {
|
|
961
1189
|
providerOptions?: Record<
|
|
962
1190
|
string,
|
|
@@ -1029,6 +1257,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1029
1257
|
}
|
|
1030
1258
|
| {
|
|
1031
1259
|
approvalId: string;
|
|
1260
|
+
isAutomatic?: boolean;
|
|
1032
1261
|
providerMetadata?: Record<
|
|
1033
1262
|
string,
|
|
1034
1263
|
Record<string, any>
|
|
@@ -1037,6 +1266,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1037
1266
|
string,
|
|
1038
1267
|
Record<string, any>
|
|
1039
1268
|
>;
|
|
1269
|
+
signature?: string;
|
|
1040
1270
|
toolCallId: string;
|
|
1041
1271
|
type: "tool-approval-request";
|
|
1042
1272
|
}
|
|
@@ -1105,6 +1335,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1105
1335
|
text: string;
|
|
1106
1336
|
type: "text";
|
|
1107
1337
|
}
|
|
1338
|
+
| {
|
|
1339
|
+
data:
|
|
1340
|
+
| { type: "url"; url: string }
|
|
1341
|
+
| {
|
|
1342
|
+
reference: Record<string, string>;
|
|
1343
|
+
type: "reference";
|
|
1344
|
+
}
|
|
1345
|
+
| {
|
|
1346
|
+
data: string | ArrayBuffer;
|
|
1347
|
+
type: "data";
|
|
1348
|
+
}
|
|
1349
|
+
| { text: string; type: "text" };
|
|
1350
|
+
filename?: string;
|
|
1351
|
+
mediaType: string;
|
|
1352
|
+
providerOptions?: Record<
|
|
1353
|
+
string,
|
|
1354
|
+
Record<string, any>
|
|
1355
|
+
>;
|
|
1356
|
+
type: "file";
|
|
1357
|
+
}
|
|
1108
1358
|
| {
|
|
1109
1359
|
data: string;
|
|
1110
1360
|
mediaType: string;
|
|
@@ -1121,6 +1371,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1121
1371
|
type: "file-data";
|
|
1122
1372
|
}
|
|
1123
1373
|
| {
|
|
1374
|
+
mediaType?: string;
|
|
1124
1375
|
providerOptions?: Record<
|
|
1125
1376
|
string,
|
|
1126
1377
|
Record<string, any>
|
|
@@ -1136,6 +1387,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1136
1387
|
>;
|
|
1137
1388
|
type: "file-id";
|
|
1138
1389
|
}
|
|
1390
|
+
| {
|
|
1391
|
+
providerOptions?: Record<
|
|
1392
|
+
string,
|
|
1393
|
+
Record<string, any>
|
|
1394
|
+
>;
|
|
1395
|
+
providerReference: Record<string, string>;
|
|
1396
|
+
type: "file-reference";
|
|
1397
|
+
}
|
|
1139
1398
|
| {
|
|
1140
1399
|
data: string;
|
|
1141
1400
|
mediaType: string;
|
|
@@ -1145,6 +1404,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1145
1404
|
>;
|
|
1146
1405
|
type: "image-data";
|
|
1147
1406
|
}
|
|
1407
|
+
| {
|
|
1408
|
+
providerOptions?: Record<
|
|
1409
|
+
string,
|
|
1410
|
+
Record<string, any>
|
|
1411
|
+
>;
|
|
1412
|
+
providerReference: Record<string, string>;
|
|
1413
|
+
type: "image-file-reference";
|
|
1414
|
+
}
|
|
1148
1415
|
| {
|
|
1149
1416
|
providerOptions?: Record<
|
|
1150
1417
|
string,
|
|
@@ -1240,14 +1507,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1240
1507
|
threadId: string;
|
|
1241
1508
|
tool: boolean;
|
|
1242
1509
|
usage?: {
|
|
1510
|
+
cacheWriteInputTokens?: number;
|
|
1243
1511
|
cachedInputTokens?: number;
|
|
1244
|
-
completionTokens
|
|
1245
|
-
|
|
1512
|
+
completionTokens?: number;
|
|
1513
|
+
nonCachedInputTokens?: number;
|
|
1514
|
+
promptTokens?: number;
|
|
1515
|
+
raw?: Record<string, any>;
|
|
1246
1516
|
reasoningTokens?: number;
|
|
1247
|
-
|
|
1517
|
+
textOutputTokens?: number;
|
|
1518
|
+
totalTokens?: number;
|
|
1248
1519
|
};
|
|
1249
1520
|
userId?: string;
|
|
1250
1521
|
warnings?: Array<
|
|
1522
|
+
| { details?: string; feature: string; type: "unsupported" }
|
|
1523
|
+
| { details?: string; feature: string; type: "compatibility" }
|
|
1524
|
+
| { message: string; setting: string; type: "deprecated" }
|
|
1251
1525
|
| {
|
|
1252
1526
|
details?: string;
|
|
1253
1527
|
setting: string;
|
|
@@ -1342,14 +1616,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1342
1616
|
type: "text";
|
|
1343
1617
|
}
|
|
1344
1618
|
| {
|
|
1345
|
-
image:
|
|
1619
|
+
image:
|
|
1620
|
+
| string
|
|
1621
|
+
| ArrayBuffer
|
|
1622
|
+
| {
|
|
1623
|
+
reference: Record<string, string>;
|
|
1624
|
+
type: "reference";
|
|
1625
|
+
};
|
|
1346
1626
|
mediaType?: string;
|
|
1347
1627
|
mimeType?: string;
|
|
1348
1628
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1349
1629
|
type: "image";
|
|
1350
1630
|
}
|
|
1351
1631
|
| {
|
|
1352
|
-
data:
|
|
1632
|
+
data:
|
|
1633
|
+
| string
|
|
1634
|
+
| ArrayBuffer
|
|
1635
|
+
| {
|
|
1636
|
+
reference: Record<string, string>;
|
|
1637
|
+
type: "reference";
|
|
1638
|
+
};
|
|
1353
1639
|
filename?: string;
|
|
1354
1640
|
mediaType?: string;
|
|
1355
1641
|
mimeType?: string;
|
|
@@ -1378,7 +1664,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1378
1664
|
type: "text";
|
|
1379
1665
|
}
|
|
1380
1666
|
| {
|
|
1381
|
-
data:
|
|
1667
|
+
data:
|
|
1668
|
+
| string
|
|
1669
|
+
| ArrayBuffer
|
|
1670
|
+
| {
|
|
1671
|
+
reference: Record<string, string>;
|
|
1672
|
+
type: "reference";
|
|
1673
|
+
};
|
|
1382
1674
|
filename?: string;
|
|
1383
1675
|
mediaType?: string;
|
|
1384
1676
|
mimeType?: string;
|
|
@@ -1399,6 +1691,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1399
1691
|
text: string;
|
|
1400
1692
|
type: "reasoning";
|
|
1401
1693
|
}
|
|
1694
|
+
| {
|
|
1695
|
+
data?: string | ArrayBuffer;
|
|
1696
|
+
mediaType: string;
|
|
1697
|
+
providerMetadata?: Record<
|
|
1698
|
+
string,
|
|
1699
|
+
Record<string, any>
|
|
1700
|
+
>;
|
|
1701
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1702
|
+
type: "reasoning-file";
|
|
1703
|
+
url?: string;
|
|
1704
|
+
}
|
|
1705
|
+
| {
|
|
1706
|
+
kind: string;
|
|
1707
|
+
providerMetadata?: Record<
|
|
1708
|
+
string,
|
|
1709
|
+
Record<string, any>
|
|
1710
|
+
>;
|
|
1711
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1712
|
+
type: "custom";
|
|
1713
|
+
}
|
|
1402
1714
|
| {
|
|
1403
1715
|
data: string;
|
|
1404
1716
|
providerMetadata?: Record<
|
|
@@ -1417,7 +1729,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1417
1729
|
Record<string, any>
|
|
1418
1730
|
>;
|
|
1419
1731
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1732
|
+
title?: string;
|
|
1420
1733
|
toolCallId: string;
|
|
1734
|
+
toolMetadata?: Record<string, any>;
|
|
1421
1735
|
toolName: string;
|
|
1422
1736
|
type: "tool-call";
|
|
1423
1737
|
}
|
|
@@ -1430,7 +1744,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1430
1744
|
Record<string, any>
|
|
1431
1745
|
>;
|
|
1432
1746
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1747
|
+
title?: string;
|
|
1433
1748
|
toolCallId: string;
|
|
1749
|
+
toolMetadata?: Record<string, any>;
|
|
1434
1750
|
toolName: string;
|
|
1435
1751
|
type: "tool-call";
|
|
1436
1752
|
}
|
|
@@ -1493,6 +1809,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1493
1809
|
text: string;
|
|
1494
1810
|
type: "text";
|
|
1495
1811
|
}
|
|
1812
|
+
| {
|
|
1813
|
+
data:
|
|
1814
|
+
| { type: "url"; url: string }
|
|
1815
|
+
| {
|
|
1816
|
+
reference: Record<string, string>;
|
|
1817
|
+
type: "reference";
|
|
1818
|
+
}
|
|
1819
|
+
| {
|
|
1820
|
+
data: string | ArrayBuffer;
|
|
1821
|
+
type: "data";
|
|
1822
|
+
}
|
|
1823
|
+
| { text: string; type: "text" };
|
|
1824
|
+
filename?: string;
|
|
1825
|
+
mediaType: string;
|
|
1826
|
+
providerOptions?: Record<
|
|
1827
|
+
string,
|
|
1828
|
+
Record<string, any>
|
|
1829
|
+
>;
|
|
1830
|
+
type: "file";
|
|
1831
|
+
}
|
|
1496
1832
|
| {
|
|
1497
1833
|
data: string;
|
|
1498
1834
|
mediaType: string;
|
|
@@ -1509,6 +1845,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1509
1845
|
type: "file-data";
|
|
1510
1846
|
}
|
|
1511
1847
|
| {
|
|
1848
|
+
mediaType?: string;
|
|
1512
1849
|
providerOptions?: Record<
|
|
1513
1850
|
string,
|
|
1514
1851
|
Record<string, any>
|
|
@@ -1524,6 +1861,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1524
1861
|
>;
|
|
1525
1862
|
type: "file-id";
|
|
1526
1863
|
}
|
|
1864
|
+
| {
|
|
1865
|
+
providerOptions?: Record<
|
|
1866
|
+
string,
|
|
1867
|
+
Record<string, any>
|
|
1868
|
+
>;
|
|
1869
|
+
providerReference: Record<string, string>;
|
|
1870
|
+
type: "file-reference";
|
|
1871
|
+
}
|
|
1527
1872
|
| {
|
|
1528
1873
|
data: string;
|
|
1529
1874
|
mediaType: string;
|
|
@@ -1533,6 +1878,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1533
1878
|
>;
|
|
1534
1879
|
type: "image-data";
|
|
1535
1880
|
}
|
|
1881
|
+
| {
|
|
1882
|
+
providerOptions?: Record<
|
|
1883
|
+
string,
|
|
1884
|
+
Record<string, any>
|
|
1885
|
+
>;
|
|
1886
|
+
providerReference: Record<string, string>;
|
|
1887
|
+
type: "image-file-reference";
|
|
1888
|
+
}
|
|
1536
1889
|
| {
|
|
1537
1890
|
providerOptions?: Record<
|
|
1538
1891
|
string,
|
|
@@ -1596,11 +1949,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1596
1949
|
}
|
|
1597
1950
|
| {
|
|
1598
1951
|
approvalId: string;
|
|
1952
|
+
isAutomatic?: boolean;
|
|
1599
1953
|
providerMetadata?: Record<
|
|
1600
1954
|
string,
|
|
1601
1955
|
Record<string, any>
|
|
1602
1956
|
>;
|
|
1603
1957
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1958
|
+
signature?: string;
|
|
1604
1959
|
toolCallId: string;
|
|
1605
1960
|
type: "tool-approval-request";
|
|
1606
1961
|
}
|
|
@@ -1669,6 +2024,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1669
2024
|
text: string;
|
|
1670
2025
|
type: "text";
|
|
1671
2026
|
}
|
|
2027
|
+
| {
|
|
2028
|
+
data:
|
|
2029
|
+
| { type: "url"; url: string }
|
|
2030
|
+
| {
|
|
2031
|
+
reference: Record<string, string>;
|
|
2032
|
+
type: "reference";
|
|
2033
|
+
}
|
|
2034
|
+
| {
|
|
2035
|
+
data: string | ArrayBuffer;
|
|
2036
|
+
type: "data";
|
|
2037
|
+
}
|
|
2038
|
+
| { text: string; type: "text" };
|
|
2039
|
+
filename?: string;
|
|
2040
|
+
mediaType: string;
|
|
2041
|
+
providerOptions?: Record<
|
|
2042
|
+
string,
|
|
2043
|
+
Record<string, any>
|
|
2044
|
+
>;
|
|
2045
|
+
type: "file";
|
|
2046
|
+
}
|
|
1672
2047
|
| {
|
|
1673
2048
|
data: string;
|
|
1674
2049
|
mediaType: string;
|
|
@@ -1685,6 +2060,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1685
2060
|
type: "file-data";
|
|
1686
2061
|
}
|
|
1687
2062
|
| {
|
|
2063
|
+
mediaType?: string;
|
|
1688
2064
|
providerOptions?: Record<
|
|
1689
2065
|
string,
|
|
1690
2066
|
Record<string, any>
|
|
@@ -1700,6 +2076,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1700
2076
|
>;
|
|
1701
2077
|
type: "file-id";
|
|
1702
2078
|
}
|
|
2079
|
+
| {
|
|
2080
|
+
providerOptions?: Record<
|
|
2081
|
+
string,
|
|
2082
|
+
Record<string, any>
|
|
2083
|
+
>;
|
|
2084
|
+
providerReference: Record<string, string>;
|
|
2085
|
+
type: "file-reference";
|
|
2086
|
+
}
|
|
1703
2087
|
| {
|
|
1704
2088
|
data: string;
|
|
1705
2089
|
mediaType: string;
|
|
@@ -1709,6 +2093,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1709
2093
|
>;
|
|
1710
2094
|
type: "image-data";
|
|
1711
2095
|
}
|
|
2096
|
+
| {
|
|
2097
|
+
providerOptions?: Record<
|
|
2098
|
+
string,
|
|
2099
|
+
Record<string, any>
|
|
2100
|
+
>;
|
|
2101
|
+
providerReference: Record<string, string>;
|
|
2102
|
+
type: "image-file-reference";
|
|
2103
|
+
}
|
|
1712
2104
|
| {
|
|
1713
2105
|
providerOptions?: Record<
|
|
1714
2106
|
string,
|
|
@@ -1804,14 +2196,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1804
2196
|
threadId: string;
|
|
1805
2197
|
tool: boolean;
|
|
1806
2198
|
usage?: {
|
|
2199
|
+
cacheWriteInputTokens?: number;
|
|
1807
2200
|
cachedInputTokens?: number;
|
|
1808
|
-
completionTokens
|
|
1809
|
-
|
|
2201
|
+
completionTokens?: number;
|
|
2202
|
+
nonCachedInputTokens?: number;
|
|
2203
|
+
promptTokens?: number;
|
|
2204
|
+
raw?: Record<string, any>;
|
|
1810
2205
|
reasoningTokens?: number;
|
|
1811
|
-
|
|
2206
|
+
textOutputTokens?: number;
|
|
2207
|
+
totalTokens?: number;
|
|
1812
2208
|
};
|
|
1813
2209
|
userId?: string;
|
|
1814
2210
|
warnings?: Array<
|
|
2211
|
+
| { details?: string; feature: string; type: "unsupported" }
|
|
2212
|
+
| { details?: string; feature: string; type: "compatibility" }
|
|
2213
|
+
| { message: string; setting: string; type: "deprecated" }
|
|
1815
2214
|
| { details?: string; setting: string; type: "unsupported-setting" }
|
|
1816
2215
|
| { details?: string; tool: any; type: "unsupported-tool" }
|
|
1817
2216
|
| { message: string; type: "other" }
|
|
@@ -1881,7 +2280,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1881
2280
|
type: "text";
|
|
1882
2281
|
}
|
|
1883
2282
|
| {
|
|
1884
|
-
image:
|
|
2283
|
+
image:
|
|
2284
|
+
| string
|
|
2285
|
+
| ArrayBuffer
|
|
2286
|
+
| {
|
|
2287
|
+
reference: Record<string, string>;
|
|
2288
|
+
type: "reference";
|
|
2289
|
+
};
|
|
1885
2290
|
mediaType?: string;
|
|
1886
2291
|
mimeType?: string;
|
|
1887
2292
|
providerOptions?: Record<
|
|
@@ -1891,7 +2296,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1891
2296
|
type: "image";
|
|
1892
2297
|
}
|
|
1893
2298
|
| {
|
|
1894
|
-
data:
|
|
2299
|
+
data:
|
|
2300
|
+
| string
|
|
2301
|
+
| ArrayBuffer
|
|
2302
|
+
| {
|
|
2303
|
+
reference: Record<string, string>;
|
|
2304
|
+
type: "reference";
|
|
2305
|
+
};
|
|
1895
2306
|
filename?: string;
|
|
1896
2307
|
mediaType?: string;
|
|
1897
2308
|
mimeType?: string;
|
|
@@ -1926,7 +2337,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1926
2337
|
type: "text";
|
|
1927
2338
|
}
|
|
1928
2339
|
| {
|
|
1929
|
-
data:
|
|
2340
|
+
data:
|
|
2341
|
+
| string
|
|
2342
|
+
| ArrayBuffer
|
|
2343
|
+
| {
|
|
2344
|
+
reference: Record<string, string>;
|
|
2345
|
+
type: "reference";
|
|
2346
|
+
};
|
|
1930
2347
|
filename?: string;
|
|
1931
2348
|
mediaType?: string;
|
|
1932
2349
|
mimeType?: string;
|
|
@@ -1953,6 +2370,32 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1953
2370
|
text: string;
|
|
1954
2371
|
type: "reasoning";
|
|
1955
2372
|
}
|
|
2373
|
+
| {
|
|
2374
|
+
data?: string | ArrayBuffer;
|
|
2375
|
+
mediaType: string;
|
|
2376
|
+
providerMetadata?: Record<
|
|
2377
|
+
string,
|
|
2378
|
+
Record<string, any>
|
|
2379
|
+
>;
|
|
2380
|
+
providerOptions?: Record<
|
|
2381
|
+
string,
|
|
2382
|
+
Record<string, any>
|
|
2383
|
+
>;
|
|
2384
|
+
type: "reasoning-file";
|
|
2385
|
+
url?: string;
|
|
2386
|
+
}
|
|
2387
|
+
| {
|
|
2388
|
+
kind: string;
|
|
2389
|
+
providerMetadata?: Record<
|
|
2390
|
+
string,
|
|
2391
|
+
Record<string, any>
|
|
2392
|
+
>;
|
|
2393
|
+
providerOptions?: Record<
|
|
2394
|
+
string,
|
|
2395
|
+
Record<string, any>
|
|
2396
|
+
>;
|
|
2397
|
+
type: "custom";
|
|
2398
|
+
}
|
|
1956
2399
|
| {
|
|
1957
2400
|
data: string;
|
|
1958
2401
|
providerMetadata?: Record<
|
|
@@ -1977,7 +2420,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1977
2420
|
string,
|
|
1978
2421
|
Record<string, any>
|
|
1979
2422
|
>;
|
|
2423
|
+
title?: string;
|
|
1980
2424
|
toolCallId: string;
|
|
2425
|
+
toolMetadata?: Record<string, any>;
|
|
1981
2426
|
toolName: string;
|
|
1982
2427
|
type: "tool-call";
|
|
1983
2428
|
}
|
|
@@ -1993,7 +2438,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1993
2438
|
string,
|
|
1994
2439
|
Record<string, any>
|
|
1995
2440
|
>;
|
|
2441
|
+
title?: string;
|
|
1996
2442
|
toolCallId: string;
|
|
2443
|
+
toolMetadata?: Record<string, any>;
|
|
1997
2444
|
toolName: string;
|
|
1998
2445
|
type: "tool-call";
|
|
1999
2446
|
}
|
|
@@ -2060,6 +2507,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2060
2507
|
text: string;
|
|
2061
2508
|
type: "text";
|
|
2062
2509
|
}
|
|
2510
|
+
| {
|
|
2511
|
+
data:
|
|
2512
|
+
| { type: "url"; url: string }
|
|
2513
|
+
| {
|
|
2514
|
+
reference: Record<string, string>;
|
|
2515
|
+
type: "reference";
|
|
2516
|
+
}
|
|
2517
|
+
| {
|
|
2518
|
+
data: string | ArrayBuffer;
|
|
2519
|
+
type: "data";
|
|
2520
|
+
}
|
|
2521
|
+
| { text: string; type: "text" };
|
|
2522
|
+
filename?: string;
|
|
2523
|
+
mediaType: string;
|
|
2524
|
+
providerOptions?: Record<
|
|
2525
|
+
string,
|
|
2526
|
+
Record<string, any>
|
|
2527
|
+
>;
|
|
2528
|
+
type: "file";
|
|
2529
|
+
}
|
|
2063
2530
|
| {
|
|
2064
2531
|
data: string;
|
|
2065
2532
|
mediaType: string;
|
|
@@ -2076,6 +2543,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2076
2543
|
type: "file-data";
|
|
2077
2544
|
}
|
|
2078
2545
|
| {
|
|
2546
|
+
mediaType?: string;
|
|
2079
2547
|
providerOptions?: Record<
|
|
2080
2548
|
string,
|
|
2081
2549
|
Record<string, any>
|
|
@@ -2092,13 +2560,35 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2092
2560
|
type: "file-id";
|
|
2093
2561
|
}
|
|
2094
2562
|
| {
|
|
2095
|
-
data: string;
|
|
2096
|
-
mediaType: string;
|
|
2097
2563
|
providerOptions?: Record<
|
|
2098
2564
|
string,
|
|
2099
2565
|
Record<string, any>
|
|
2100
2566
|
>;
|
|
2101
|
-
|
|
2567
|
+
providerReference: Record<
|
|
2568
|
+
string,
|
|
2569
|
+
string
|
|
2570
|
+
>;
|
|
2571
|
+
type: "file-reference";
|
|
2572
|
+
}
|
|
2573
|
+
| {
|
|
2574
|
+
data: string;
|
|
2575
|
+
mediaType: string;
|
|
2576
|
+
providerOptions?: Record<
|
|
2577
|
+
string,
|
|
2578
|
+
Record<string, any>
|
|
2579
|
+
>;
|
|
2580
|
+
type: "image-data";
|
|
2581
|
+
}
|
|
2582
|
+
| {
|
|
2583
|
+
providerOptions?: Record<
|
|
2584
|
+
string,
|
|
2585
|
+
Record<string, any>
|
|
2586
|
+
>;
|
|
2587
|
+
providerReference: Record<
|
|
2588
|
+
string,
|
|
2589
|
+
string
|
|
2590
|
+
>;
|
|
2591
|
+
type: "image-file-reference";
|
|
2102
2592
|
}
|
|
2103
2593
|
| {
|
|
2104
2594
|
providerOptions?: Record<
|
|
@@ -2172,6 +2662,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2172
2662
|
}
|
|
2173
2663
|
| {
|
|
2174
2664
|
approvalId: string;
|
|
2665
|
+
isAutomatic?: boolean;
|
|
2175
2666
|
providerMetadata?: Record<
|
|
2176
2667
|
string,
|
|
2177
2668
|
Record<string, any>
|
|
@@ -2180,6 +2671,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2180
2671
|
string,
|
|
2181
2672
|
Record<string, any>
|
|
2182
2673
|
>;
|
|
2674
|
+
signature?: string;
|
|
2183
2675
|
toolCallId: string;
|
|
2184
2676
|
type: "tool-approval-request";
|
|
2185
2677
|
}
|
|
@@ -2248,6 +2740,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2248
2740
|
text: string;
|
|
2249
2741
|
type: "text";
|
|
2250
2742
|
}
|
|
2743
|
+
| {
|
|
2744
|
+
data:
|
|
2745
|
+
| { type: "url"; url: string }
|
|
2746
|
+
| {
|
|
2747
|
+
reference: Record<string, string>;
|
|
2748
|
+
type: "reference";
|
|
2749
|
+
}
|
|
2750
|
+
| {
|
|
2751
|
+
data: string | ArrayBuffer;
|
|
2752
|
+
type: "data";
|
|
2753
|
+
}
|
|
2754
|
+
| { text: string; type: "text" };
|
|
2755
|
+
filename?: string;
|
|
2756
|
+
mediaType: string;
|
|
2757
|
+
providerOptions?: Record<
|
|
2758
|
+
string,
|
|
2759
|
+
Record<string, any>
|
|
2760
|
+
>;
|
|
2761
|
+
type: "file";
|
|
2762
|
+
}
|
|
2251
2763
|
| {
|
|
2252
2764
|
data: string;
|
|
2253
2765
|
mediaType: string;
|
|
@@ -2264,6 +2776,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2264
2776
|
type: "file-data";
|
|
2265
2777
|
}
|
|
2266
2778
|
| {
|
|
2779
|
+
mediaType?: string;
|
|
2267
2780
|
providerOptions?: Record<
|
|
2268
2781
|
string,
|
|
2269
2782
|
Record<string, any>
|
|
@@ -2279,6 +2792,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2279
2792
|
>;
|
|
2280
2793
|
type: "file-id";
|
|
2281
2794
|
}
|
|
2795
|
+
| {
|
|
2796
|
+
providerOptions?: Record<
|
|
2797
|
+
string,
|
|
2798
|
+
Record<string, any>
|
|
2799
|
+
>;
|
|
2800
|
+
providerReference: Record<string, string>;
|
|
2801
|
+
type: "file-reference";
|
|
2802
|
+
}
|
|
2282
2803
|
| {
|
|
2283
2804
|
data: string;
|
|
2284
2805
|
mediaType: string;
|
|
@@ -2288,6 +2809,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2288
2809
|
>;
|
|
2289
2810
|
type: "image-data";
|
|
2290
2811
|
}
|
|
2812
|
+
| {
|
|
2813
|
+
providerOptions?: Record<
|
|
2814
|
+
string,
|
|
2815
|
+
Record<string, any>
|
|
2816
|
+
>;
|
|
2817
|
+
providerReference: Record<string, string>;
|
|
2818
|
+
type: "image-file-reference";
|
|
2819
|
+
}
|
|
2291
2820
|
| {
|
|
2292
2821
|
providerOptions?: Record<
|
|
2293
2822
|
string,
|
|
@@ -2383,14 +2912,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2383
2912
|
threadId: string;
|
|
2384
2913
|
tool: boolean;
|
|
2385
2914
|
usage?: {
|
|
2915
|
+
cacheWriteInputTokens?: number;
|
|
2386
2916
|
cachedInputTokens?: number;
|
|
2387
|
-
completionTokens
|
|
2388
|
-
|
|
2917
|
+
completionTokens?: number;
|
|
2918
|
+
nonCachedInputTokens?: number;
|
|
2919
|
+
promptTokens?: number;
|
|
2920
|
+
raw?: Record<string, any>;
|
|
2389
2921
|
reasoningTokens?: number;
|
|
2390
|
-
|
|
2922
|
+
textOutputTokens?: number;
|
|
2923
|
+
totalTokens?: number;
|
|
2391
2924
|
};
|
|
2392
2925
|
userId?: string;
|
|
2393
2926
|
warnings?: Array<
|
|
2927
|
+
| { details?: string; feature: string; type: "unsupported" }
|
|
2928
|
+
| { details?: string; feature: string; type: "compatibility" }
|
|
2929
|
+
| { message: string; setting: string; type: "deprecated" }
|
|
2394
2930
|
| {
|
|
2395
2931
|
details?: string;
|
|
2396
2932
|
setting: string;
|
|
@@ -2452,14 +2988,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2452
2988
|
type: "text";
|
|
2453
2989
|
}
|
|
2454
2990
|
| {
|
|
2455
|
-
image:
|
|
2991
|
+
image:
|
|
2992
|
+
| string
|
|
2993
|
+
| ArrayBuffer
|
|
2994
|
+
| {
|
|
2995
|
+
reference: Record<string, string>;
|
|
2996
|
+
type: "reference";
|
|
2997
|
+
};
|
|
2456
2998
|
mediaType?: string;
|
|
2457
2999
|
mimeType?: string;
|
|
2458
3000
|
providerOptions?: Record<string, Record<string, any>>;
|
|
2459
3001
|
type: "image";
|
|
2460
3002
|
}
|
|
2461
3003
|
| {
|
|
2462
|
-
data:
|
|
3004
|
+
data:
|
|
3005
|
+
| string
|
|
3006
|
+
| ArrayBuffer
|
|
3007
|
+
| {
|
|
3008
|
+
reference: Record<string, string>;
|
|
3009
|
+
type: "reference";
|
|
3010
|
+
};
|
|
2463
3011
|
filename?: string;
|
|
2464
3012
|
mediaType?: string;
|
|
2465
3013
|
mimeType?: string;
|
|
@@ -2488,7 +3036,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2488
3036
|
type: "text";
|
|
2489
3037
|
}
|
|
2490
3038
|
| {
|
|
2491
|
-
data:
|
|
3039
|
+
data:
|
|
3040
|
+
| string
|
|
3041
|
+
| ArrayBuffer
|
|
3042
|
+
| {
|
|
3043
|
+
reference: Record<string, string>;
|
|
3044
|
+
type: "reference";
|
|
3045
|
+
};
|
|
2492
3046
|
filename?: string;
|
|
2493
3047
|
mediaType?: string;
|
|
2494
3048
|
mimeType?: string;
|
|
@@ -2509,6 +3063,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2509
3063
|
text: string;
|
|
2510
3064
|
type: "reasoning";
|
|
2511
3065
|
}
|
|
3066
|
+
| {
|
|
3067
|
+
data?: string | ArrayBuffer;
|
|
3068
|
+
mediaType: string;
|
|
3069
|
+
providerMetadata?: Record<
|
|
3070
|
+
string,
|
|
3071
|
+
Record<string, any>
|
|
3072
|
+
>;
|
|
3073
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3074
|
+
type: "reasoning-file";
|
|
3075
|
+
url?: string;
|
|
3076
|
+
}
|
|
3077
|
+
| {
|
|
3078
|
+
kind: string;
|
|
3079
|
+
providerMetadata?: Record<
|
|
3080
|
+
string,
|
|
3081
|
+
Record<string, any>
|
|
3082
|
+
>;
|
|
3083
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3084
|
+
type: "custom";
|
|
3085
|
+
}
|
|
2512
3086
|
| {
|
|
2513
3087
|
data: string;
|
|
2514
3088
|
providerMetadata?: Record<
|
|
@@ -2527,7 +3101,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2527
3101
|
Record<string, any>
|
|
2528
3102
|
>;
|
|
2529
3103
|
providerOptions?: Record<string, Record<string, any>>;
|
|
3104
|
+
title?: string;
|
|
2530
3105
|
toolCallId: string;
|
|
3106
|
+
toolMetadata?: Record<string, any>;
|
|
2531
3107
|
toolName: string;
|
|
2532
3108
|
type: "tool-call";
|
|
2533
3109
|
}
|
|
@@ -2540,7 +3116,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2540
3116
|
Record<string, any>
|
|
2541
3117
|
>;
|
|
2542
3118
|
providerOptions?: Record<string, Record<string, any>>;
|
|
3119
|
+
title?: string;
|
|
2543
3120
|
toolCallId: string;
|
|
3121
|
+
toolMetadata?: Record<string, any>;
|
|
2544
3122
|
toolName: string;
|
|
2545
3123
|
type: "tool-call";
|
|
2546
3124
|
}
|
|
@@ -2603,6 +3181,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2603
3181
|
text: string;
|
|
2604
3182
|
type: "text";
|
|
2605
3183
|
}
|
|
3184
|
+
| {
|
|
3185
|
+
data:
|
|
3186
|
+
| { type: "url"; url: string }
|
|
3187
|
+
| {
|
|
3188
|
+
reference: Record<string, string>;
|
|
3189
|
+
type: "reference";
|
|
3190
|
+
}
|
|
3191
|
+
| {
|
|
3192
|
+
data: string | ArrayBuffer;
|
|
3193
|
+
type: "data";
|
|
3194
|
+
}
|
|
3195
|
+
| { text: string; type: "text" };
|
|
3196
|
+
filename?: string;
|
|
3197
|
+
mediaType: string;
|
|
3198
|
+
providerOptions?: Record<
|
|
3199
|
+
string,
|
|
3200
|
+
Record<string, any>
|
|
3201
|
+
>;
|
|
3202
|
+
type: "file";
|
|
3203
|
+
}
|
|
2606
3204
|
| {
|
|
2607
3205
|
data: string;
|
|
2608
3206
|
mediaType: string;
|
|
@@ -2619,6 +3217,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2619
3217
|
type: "file-data";
|
|
2620
3218
|
}
|
|
2621
3219
|
| {
|
|
3220
|
+
mediaType?: string;
|
|
2622
3221
|
providerOptions?: Record<
|
|
2623
3222
|
string,
|
|
2624
3223
|
Record<string, any>
|
|
@@ -2634,6 +3233,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2634
3233
|
>;
|
|
2635
3234
|
type: "file-id";
|
|
2636
3235
|
}
|
|
3236
|
+
| {
|
|
3237
|
+
providerOptions?: Record<
|
|
3238
|
+
string,
|
|
3239
|
+
Record<string, any>
|
|
3240
|
+
>;
|
|
3241
|
+
providerReference: Record<string, string>;
|
|
3242
|
+
type: "file-reference";
|
|
3243
|
+
}
|
|
2637
3244
|
| {
|
|
2638
3245
|
data: string;
|
|
2639
3246
|
mediaType: string;
|
|
@@ -2643,6 +3250,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2643
3250
|
>;
|
|
2644
3251
|
type: "image-data";
|
|
2645
3252
|
}
|
|
3253
|
+
| {
|
|
3254
|
+
providerOptions?: Record<
|
|
3255
|
+
string,
|
|
3256
|
+
Record<string, any>
|
|
3257
|
+
>;
|
|
3258
|
+
providerReference: Record<string, string>;
|
|
3259
|
+
type: "image-file-reference";
|
|
3260
|
+
}
|
|
2646
3261
|
| {
|
|
2647
3262
|
providerOptions?: Record<
|
|
2648
3263
|
string,
|
|
@@ -2706,11 +3321,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2706
3321
|
}
|
|
2707
3322
|
| {
|
|
2708
3323
|
approvalId: string;
|
|
3324
|
+
isAutomatic?: boolean;
|
|
2709
3325
|
providerMetadata?: Record<
|
|
2710
3326
|
string,
|
|
2711
3327
|
Record<string, any>
|
|
2712
3328
|
>;
|
|
2713
3329
|
providerOptions?: Record<string, Record<string, any>>;
|
|
3330
|
+
signature?: string;
|
|
2714
3331
|
toolCallId: string;
|
|
2715
3332
|
type: "tool-approval-request";
|
|
2716
3333
|
}
|
|
@@ -2779,6 +3396,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2779
3396
|
text: string;
|
|
2780
3397
|
type: "text";
|
|
2781
3398
|
}
|
|
3399
|
+
| {
|
|
3400
|
+
data:
|
|
3401
|
+
| { type: "url"; url: string }
|
|
3402
|
+
| {
|
|
3403
|
+
reference: Record<string, string>;
|
|
3404
|
+
type: "reference";
|
|
3405
|
+
}
|
|
3406
|
+
| {
|
|
3407
|
+
data: string | ArrayBuffer;
|
|
3408
|
+
type: "data";
|
|
3409
|
+
}
|
|
3410
|
+
| { text: string; type: "text" };
|
|
3411
|
+
filename?: string;
|
|
3412
|
+
mediaType: string;
|
|
3413
|
+
providerOptions?: Record<
|
|
3414
|
+
string,
|
|
3415
|
+
Record<string, any>
|
|
3416
|
+
>;
|
|
3417
|
+
type: "file";
|
|
3418
|
+
}
|
|
2782
3419
|
| {
|
|
2783
3420
|
data: string;
|
|
2784
3421
|
mediaType: string;
|
|
@@ -2795,6 +3432,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2795
3432
|
type: "file-data";
|
|
2796
3433
|
}
|
|
2797
3434
|
| {
|
|
3435
|
+
mediaType?: string;
|
|
2798
3436
|
providerOptions?: Record<
|
|
2799
3437
|
string,
|
|
2800
3438
|
Record<string, any>
|
|
@@ -2810,6 +3448,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2810
3448
|
>;
|
|
2811
3449
|
type: "file-id";
|
|
2812
3450
|
}
|
|
3451
|
+
| {
|
|
3452
|
+
providerOptions?: Record<
|
|
3453
|
+
string,
|
|
3454
|
+
Record<string, any>
|
|
3455
|
+
>;
|
|
3456
|
+
providerReference: Record<string, string>;
|
|
3457
|
+
type: "file-reference";
|
|
3458
|
+
}
|
|
2813
3459
|
| {
|
|
2814
3460
|
data: string;
|
|
2815
3461
|
mediaType: string;
|
|
@@ -2819,6 +3465,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2819
3465
|
>;
|
|
2820
3466
|
type: "image-data";
|
|
2821
3467
|
}
|
|
3468
|
+
| {
|
|
3469
|
+
providerOptions?: Record<
|
|
3470
|
+
string,
|
|
3471
|
+
Record<string, any>
|
|
3472
|
+
>;
|
|
3473
|
+
providerReference: Record<string, string>;
|
|
3474
|
+
type: "image-file-reference";
|
|
3475
|
+
}
|
|
2822
3476
|
| {
|
|
2823
3477
|
providerOptions?: Record<
|
|
2824
3478
|
string,
|
|
@@ -2914,14 +3568,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2914
3568
|
threadId: string;
|
|
2915
3569
|
tool: boolean;
|
|
2916
3570
|
usage?: {
|
|
3571
|
+
cacheWriteInputTokens?: number;
|
|
2917
3572
|
cachedInputTokens?: number;
|
|
2918
|
-
completionTokens
|
|
2919
|
-
|
|
3573
|
+
completionTokens?: number;
|
|
3574
|
+
nonCachedInputTokens?: number;
|
|
3575
|
+
promptTokens?: number;
|
|
3576
|
+
raw?: Record<string, any>;
|
|
2920
3577
|
reasoningTokens?: number;
|
|
2921
|
-
|
|
3578
|
+
textOutputTokens?: number;
|
|
3579
|
+
totalTokens?: number;
|
|
2922
3580
|
};
|
|
2923
3581
|
userId?: string;
|
|
2924
3582
|
warnings?: Array<
|
|
3583
|
+
| { details?: string; feature: string; type: "unsupported" }
|
|
3584
|
+
| { details?: string; feature: string; type: "compatibility" }
|
|
3585
|
+
| { message: string; setting: string; type: "deprecated" }
|
|
2925
3586
|
| { details?: string; setting: string; type: "unsupported-setting" }
|
|
2926
3587
|
| { details?: string; tool: any; type: "unsupported-tool" }
|
|
2927
3588
|
| { message: string; type: "other" }
|
|
@@ -2970,14 +3631,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2970
3631
|
type: "text";
|
|
2971
3632
|
}
|
|
2972
3633
|
| {
|
|
2973
|
-
image:
|
|
3634
|
+
image:
|
|
3635
|
+
| string
|
|
3636
|
+
| ArrayBuffer
|
|
3637
|
+
| {
|
|
3638
|
+
reference: Record<string, string>;
|
|
3639
|
+
type: "reference";
|
|
3640
|
+
};
|
|
2974
3641
|
mediaType?: string;
|
|
2975
3642
|
mimeType?: string;
|
|
2976
3643
|
providerOptions?: Record<string, Record<string, any>>;
|
|
2977
3644
|
type: "image";
|
|
2978
3645
|
}
|
|
2979
3646
|
| {
|
|
2980
|
-
data:
|
|
3647
|
+
data:
|
|
3648
|
+
| string
|
|
3649
|
+
| ArrayBuffer
|
|
3650
|
+
| {
|
|
3651
|
+
reference: Record<string, string>;
|
|
3652
|
+
type: "reference";
|
|
3653
|
+
};
|
|
2981
3654
|
filename?: string;
|
|
2982
3655
|
mediaType?: string;
|
|
2983
3656
|
mimeType?: string;
|
|
@@ -3006,7 +3679,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3006
3679
|
type: "text";
|
|
3007
3680
|
}
|
|
3008
3681
|
| {
|
|
3009
|
-
data:
|
|
3682
|
+
data:
|
|
3683
|
+
| string
|
|
3684
|
+
| ArrayBuffer
|
|
3685
|
+
| {
|
|
3686
|
+
reference: Record<string, string>;
|
|
3687
|
+
type: "reference";
|
|
3688
|
+
};
|
|
3010
3689
|
filename?: string;
|
|
3011
3690
|
mediaType?: string;
|
|
3012
3691
|
mimeType?: string;
|
|
@@ -3027,6 +3706,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3027
3706
|
text: string;
|
|
3028
3707
|
type: "reasoning";
|
|
3029
3708
|
}
|
|
3709
|
+
| {
|
|
3710
|
+
data?: string | ArrayBuffer;
|
|
3711
|
+
mediaType: string;
|
|
3712
|
+
providerMetadata?: Record<
|
|
3713
|
+
string,
|
|
3714
|
+
Record<string, any>
|
|
3715
|
+
>;
|
|
3716
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3717
|
+
type: "reasoning-file";
|
|
3718
|
+
url?: string;
|
|
3719
|
+
}
|
|
3720
|
+
| {
|
|
3721
|
+
kind: string;
|
|
3722
|
+
providerMetadata?: Record<
|
|
3723
|
+
string,
|
|
3724
|
+
Record<string, any>
|
|
3725
|
+
>;
|
|
3726
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3727
|
+
type: "custom";
|
|
3728
|
+
}
|
|
3030
3729
|
| {
|
|
3031
3730
|
data: string;
|
|
3032
3731
|
providerMetadata?: Record<
|
|
@@ -3045,7 +3744,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3045
3744
|
Record<string, any>
|
|
3046
3745
|
>;
|
|
3047
3746
|
providerOptions?: Record<string, Record<string, any>>;
|
|
3747
|
+
title?: string;
|
|
3048
3748
|
toolCallId: string;
|
|
3749
|
+
toolMetadata?: Record<string, any>;
|
|
3049
3750
|
toolName: string;
|
|
3050
3751
|
type: "tool-call";
|
|
3051
3752
|
}
|
|
@@ -3058,7 +3759,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3058
3759
|
Record<string, any>
|
|
3059
3760
|
>;
|
|
3060
3761
|
providerOptions?: Record<string, Record<string, any>>;
|
|
3762
|
+
title?: string;
|
|
3061
3763
|
toolCallId: string;
|
|
3764
|
+
toolMetadata?: Record<string, any>;
|
|
3062
3765
|
toolName: string;
|
|
3063
3766
|
type: "tool-call";
|
|
3064
3767
|
}
|
|
@@ -3121,6 +3824,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3121
3824
|
text: string;
|
|
3122
3825
|
type: "text";
|
|
3123
3826
|
}
|
|
3827
|
+
| {
|
|
3828
|
+
data:
|
|
3829
|
+
| { type: "url"; url: string }
|
|
3830
|
+
| {
|
|
3831
|
+
reference: Record<string, string>;
|
|
3832
|
+
type: "reference";
|
|
3833
|
+
}
|
|
3834
|
+
| {
|
|
3835
|
+
data: string | ArrayBuffer;
|
|
3836
|
+
type: "data";
|
|
3837
|
+
}
|
|
3838
|
+
| { text: string; type: "text" };
|
|
3839
|
+
filename?: string;
|
|
3840
|
+
mediaType: string;
|
|
3841
|
+
providerOptions?: Record<
|
|
3842
|
+
string,
|
|
3843
|
+
Record<string, any>
|
|
3844
|
+
>;
|
|
3845
|
+
type: "file";
|
|
3846
|
+
}
|
|
3124
3847
|
| {
|
|
3125
3848
|
data: string;
|
|
3126
3849
|
mediaType: string;
|
|
@@ -3137,6 +3860,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3137
3860
|
type: "file-data";
|
|
3138
3861
|
}
|
|
3139
3862
|
| {
|
|
3863
|
+
mediaType?: string;
|
|
3140
3864
|
providerOptions?: Record<
|
|
3141
3865
|
string,
|
|
3142
3866
|
Record<string, any>
|
|
@@ -3152,6 +3876,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3152
3876
|
>;
|
|
3153
3877
|
type: "file-id";
|
|
3154
3878
|
}
|
|
3879
|
+
| {
|
|
3880
|
+
providerOptions?: Record<
|
|
3881
|
+
string,
|
|
3882
|
+
Record<string, any>
|
|
3883
|
+
>;
|
|
3884
|
+
providerReference: Record<string, string>;
|
|
3885
|
+
type: "file-reference";
|
|
3886
|
+
}
|
|
3155
3887
|
| {
|
|
3156
3888
|
data: string;
|
|
3157
3889
|
mediaType: string;
|
|
@@ -3161,6 +3893,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3161
3893
|
>;
|
|
3162
3894
|
type: "image-data";
|
|
3163
3895
|
}
|
|
3896
|
+
| {
|
|
3897
|
+
providerOptions?: Record<
|
|
3898
|
+
string,
|
|
3899
|
+
Record<string, any>
|
|
3900
|
+
>;
|
|
3901
|
+
providerReference: Record<string, string>;
|
|
3902
|
+
type: "image-file-reference";
|
|
3903
|
+
}
|
|
3164
3904
|
| {
|
|
3165
3905
|
providerOptions?: Record<
|
|
3166
3906
|
string,
|
|
@@ -3224,11 +3964,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3224
3964
|
}
|
|
3225
3965
|
| {
|
|
3226
3966
|
approvalId: string;
|
|
3967
|
+
isAutomatic?: boolean;
|
|
3227
3968
|
providerMetadata?: Record<
|
|
3228
3969
|
string,
|
|
3229
3970
|
Record<string, any>
|
|
3230
3971
|
>;
|
|
3231
3972
|
providerOptions?: Record<string, Record<string, any>>;
|
|
3973
|
+
signature?: string;
|
|
3232
3974
|
toolCallId: string;
|
|
3233
3975
|
type: "tool-approval-request";
|
|
3234
3976
|
}
|
|
@@ -3297,6 +4039,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3297
4039
|
text: string;
|
|
3298
4040
|
type: "text";
|
|
3299
4041
|
}
|
|
4042
|
+
| {
|
|
4043
|
+
data:
|
|
4044
|
+
| { type: "url"; url: string }
|
|
4045
|
+
| {
|
|
4046
|
+
reference: Record<string, string>;
|
|
4047
|
+
type: "reference";
|
|
4048
|
+
}
|
|
4049
|
+
| {
|
|
4050
|
+
data: string | ArrayBuffer;
|
|
4051
|
+
type: "data";
|
|
4052
|
+
}
|
|
4053
|
+
| { text: string; type: "text" };
|
|
4054
|
+
filename?: string;
|
|
4055
|
+
mediaType: string;
|
|
4056
|
+
providerOptions?: Record<
|
|
4057
|
+
string,
|
|
4058
|
+
Record<string, any>
|
|
4059
|
+
>;
|
|
4060
|
+
type: "file";
|
|
4061
|
+
}
|
|
3300
4062
|
| {
|
|
3301
4063
|
data: string;
|
|
3302
4064
|
mediaType: string;
|
|
@@ -3313,6 +4075,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3313
4075
|
type: "file-data";
|
|
3314
4076
|
}
|
|
3315
4077
|
| {
|
|
4078
|
+
mediaType?: string;
|
|
3316
4079
|
providerOptions?: Record<
|
|
3317
4080
|
string,
|
|
3318
4081
|
Record<string, any>
|
|
@@ -3328,6 +4091,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3328
4091
|
>;
|
|
3329
4092
|
type: "file-id";
|
|
3330
4093
|
}
|
|
4094
|
+
| {
|
|
4095
|
+
providerOptions?: Record<
|
|
4096
|
+
string,
|
|
4097
|
+
Record<string, any>
|
|
4098
|
+
>;
|
|
4099
|
+
providerReference: Record<string, string>;
|
|
4100
|
+
type: "file-reference";
|
|
4101
|
+
}
|
|
3331
4102
|
| {
|
|
3332
4103
|
data: string;
|
|
3333
4104
|
mediaType: string;
|
|
@@ -3337,6 +4108,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3337
4108
|
>;
|
|
3338
4109
|
type: "image-data";
|
|
3339
4110
|
}
|
|
4111
|
+
| {
|
|
4112
|
+
providerOptions?: Record<
|
|
4113
|
+
string,
|
|
4114
|
+
Record<string, any>
|
|
4115
|
+
>;
|
|
4116
|
+
providerReference: Record<string, string>;
|
|
4117
|
+
type: "image-file-reference";
|
|
4118
|
+
}
|
|
3340
4119
|
| {
|
|
3341
4120
|
providerOptions?: Record<
|
|
3342
4121
|
string,
|
|
@@ -3432,14 +4211,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3432
4211
|
threadId: string;
|
|
3433
4212
|
tool: boolean;
|
|
3434
4213
|
usage?: {
|
|
4214
|
+
cacheWriteInputTokens?: number;
|
|
3435
4215
|
cachedInputTokens?: number;
|
|
3436
|
-
completionTokens
|
|
3437
|
-
|
|
4216
|
+
completionTokens?: number;
|
|
4217
|
+
nonCachedInputTokens?: number;
|
|
4218
|
+
promptTokens?: number;
|
|
4219
|
+
raw?: Record<string, any>;
|
|
3438
4220
|
reasoningTokens?: number;
|
|
3439
|
-
|
|
4221
|
+
textOutputTokens?: number;
|
|
4222
|
+
totalTokens?: number;
|
|
3440
4223
|
};
|
|
3441
4224
|
userId?: string;
|
|
3442
4225
|
warnings?: Array<
|
|
4226
|
+
| { details?: string; feature: string; type: "unsupported" }
|
|
4227
|
+
| { details?: string; feature: string; type: "compatibility" }
|
|
4228
|
+
| { message: string; setting: string; type: "deprecated" }
|
|
3443
4229
|
| { details?: string; setting: string; type: "unsupported-setting" }
|
|
3444
4230
|
| { details?: string; tool: any; type: "unsupported-tool" }
|
|
3445
4231
|
| { message: string; type: "other" }
|
|
@@ -3481,7 +4267,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3481
4267
|
type: "text";
|
|
3482
4268
|
}
|
|
3483
4269
|
| {
|
|
3484
|
-
image:
|
|
4270
|
+
image:
|
|
4271
|
+
| string
|
|
4272
|
+
| ArrayBuffer
|
|
4273
|
+
| {
|
|
4274
|
+
reference: Record<string, string>;
|
|
4275
|
+
type: "reference";
|
|
4276
|
+
};
|
|
3485
4277
|
mediaType?: string;
|
|
3486
4278
|
mimeType?: string;
|
|
3487
4279
|
providerOptions?: Record<
|
|
@@ -3491,7 +4283,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3491
4283
|
type: "image";
|
|
3492
4284
|
}
|
|
3493
4285
|
| {
|
|
3494
|
-
data:
|
|
4286
|
+
data:
|
|
4287
|
+
| string
|
|
4288
|
+
| ArrayBuffer
|
|
4289
|
+
| {
|
|
4290
|
+
reference: Record<string, string>;
|
|
4291
|
+
type: "reference";
|
|
4292
|
+
};
|
|
3495
4293
|
filename?: string;
|
|
3496
4294
|
mediaType?: string;
|
|
3497
4295
|
mimeType?: string;
|
|
@@ -3526,7 +4324,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3526
4324
|
type: "text";
|
|
3527
4325
|
}
|
|
3528
4326
|
| {
|
|
3529
|
-
data:
|
|
4327
|
+
data:
|
|
4328
|
+
| string
|
|
4329
|
+
| ArrayBuffer
|
|
4330
|
+
| {
|
|
4331
|
+
reference: Record<string, string>;
|
|
4332
|
+
type: "reference";
|
|
4333
|
+
};
|
|
3530
4334
|
filename?: string;
|
|
3531
4335
|
mediaType?: string;
|
|
3532
4336
|
mimeType?: string;
|
|
@@ -3553,6 +4357,32 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3553
4357
|
text: string;
|
|
3554
4358
|
type: "reasoning";
|
|
3555
4359
|
}
|
|
4360
|
+
| {
|
|
4361
|
+
data?: string | ArrayBuffer;
|
|
4362
|
+
mediaType: string;
|
|
4363
|
+
providerMetadata?: Record<
|
|
4364
|
+
string,
|
|
4365
|
+
Record<string, any>
|
|
4366
|
+
>;
|
|
4367
|
+
providerOptions?: Record<
|
|
4368
|
+
string,
|
|
4369
|
+
Record<string, any>
|
|
4370
|
+
>;
|
|
4371
|
+
type: "reasoning-file";
|
|
4372
|
+
url?: string;
|
|
4373
|
+
}
|
|
4374
|
+
| {
|
|
4375
|
+
kind: string;
|
|
4376
|
+
providerMetadata?: Record<
|
|
4377
|
+
string,
|
|
4378
|
+
Record<string, any>
|
|
4379
|
+
>;
|
|
4380
|
+
providerOptions?: Record<
|
|
4381
|
+
string,
|
|
4382
|
+
Record<string, any>
|
|
4383
|
+
>;
|
|
4384
|
+
type: "custom";
|
|
4385
|
+
}
|
|
3556
4386
|
| {
|
|
3557
4387
|
data: string;
|
|
3558
4388
|
providerMetadata?: Record<
|
|
@@ -3577,7 +4407,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3577
4407
|
string,
|
|
3578
4408
|
Record<string, any>
|
|
3579
4409
|
>;
|
|
4410
|
+
title?: string;
|
|
3580
4411
|
toolCallId: string;
|
|
4412
|
+
toolMetadata?: Record<string, any>;
|
|
3581
4413
|
toolName: string;
|
|
3582
4414
|
type: "tool-call";
|
|
3583
4415
|
}
|
|
@@ -3593,7 +4425,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3593
4425
|
string,
|
|
3594
4426
|
Record<string, any>
|
|
3595
4427
|
>;
|
|
4428
|
+
title?: string;
|
|
3596
4429
|
toolCallId: string;
|
|
4430
|
+
toolMetadata?: Record<string, any>;
|
|
3597
4431
|
toolName: string;
|
|
3598
4432
|
type: "tool-call";
|
|
3599
4433
|
}
|
|
@@ -3660,6 +4494,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3660
4494
|
text: string;
|
|
3661
4495
|
type: "text";
|
|
3662
4496
|
}
|
|
4497
|
+
| {
|
|
4498
|
+
data:
|
|
4499
|
+
| { type: "url"; url: string }
|
|
4500
|
+
| {
|
|
4501
|
+
reference: Record<string, string>;
|
|
4502
|
+
type: "reference";
|
|
4503
|
+
}
|
|
4504
|
+
| {
|
|
4505
|
+
data: string | ArrayBuffer;
|
|
4506
|
+
type: "data";
|
|
4507
|
+
}
|
|
4508
|
+
| { text: string; type: "text" };
|
|
4509
|
+
filename?: string;
|
|
4510
|
+
mediaType: string;
|
|
4511
|
+
providerOptions?: Record<
|
|
4512
|
+
string,
|
|
4513
|
+
Record<string, any>
|
|
4514
|
+
>;
|
|
4515
|
+
type: "file";
|
|
4516
|
+
}
|
|
3663
4517
|
| {
|
|
3664
4518
|
data: string;
|
|
3665
4519
|
mediaType: string;
|
|
@@ -3676,6 +4530,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3676
4530
|
type: "file-data";
|
|
3677
4531
|
}
|
|
3678
4532
|
| {
|
|
4533
|
+
mediaType?: string;
|
|
3679
4534
|
providerOptions?: Record<
|
|
3680
4535
|
string,
|
|
3681
4536
|
Record<string, any>
|
|
@@ -3691,6 +4546,17 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3691
4546
|
>;
|
|
3692
4547
|
type: "file-id";
|
|
3693
4548
|
}
|
|
4549
|
+
| {
|
|
4550
|
+
providerOptions?: Record<
|
|
4551
|
+
string,
|
|
4552
|
+
Record<string, any>
|
|
4553
|
+
>;
|
|
4554
|
+
providerReference: Record<
|
|
4555
|
+
string,
|
|
4556
|
+
string
|
|
4557
|
+
>;
|
|
4558
|
+
type: "file-reference";
|
|
4559
|
+
}
|
|
3694
4560
|
| {
|
|
3695
4561
|
data: string;
|
|
3696
4562
|
mediaType: string;
|
|
@@ -3700,6 +4566,17 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3700
4566
|
>;
|
|
3701
4567
|
type: "image-data";
|
|
3702
4568
|
}
|
|
4569
|
+
| {
|
|
4570
|
+
providerOptions?: Record<
|
|
4571
|
+
string,
|
|
4572
|
+
Record<string, any>
|
|
4573
|
+
>;
|
|
4574
|
+
providerReference: Record<
|
|
4575
|
+
string,
|
|
4576
|
+
string
|
|
4577
|
+
>;
|
|
4578
|
+
type: "image-file-reference";
|
|
4579
|
+
}
|
|
3703
4580
|
| {
|
|
3704
4581
|
providerOptions?: Record<
|
|
3705
4582
|
string,
|
|
@@ -3772,6 +4649,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3772
4649
|
}
|
|
3773
4650
|
| {
|
|
3774
4651
|
approvalId: string;
|
|
4652
|
+
isAutomatic?: boolean;
|
|
3775
4653
|
providerMetadata?: Record<
|
|
3776
4654
|
string,
|
|
3777
4655
|
Record<string, any>
|
|
@@ -3780,6 +4658,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3780
4658
|
string,
|
|
3781
4659
|
Record<string, any>
|
|
3782
4660
|
>;
|
|
4661
|
+
signature?: string;
|
|
3783
4662
|
toolCallId: string;
|
|
3784
4663
|
type: "tool-approval-request";
|
|
3785
4664
|
}
|
|
@@ -3848,6 +4727,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3848
4727
|
text: string;
|
|
3849
4728
|
type: "text";
|
|
3850
4729
|
}
|
|
4730
|
+
| {
|
|
4731
|
+
data:
|
|
4732
|
+
| { type: "url"; url: string }
|
|
4733
|
+
| {
|
|
4734
|
+
reference: Record<string, string>;
|
|
4735
|
+
type: "reference";
|
|
4736
|
+
}
|
|
4737
|
+
| {
|
|
4738
|
+
data: string | ArrayBuffer;
|
|
4739
|
+
type: "data";
|
|
4740
|
+
}
|
|
4741
|
+
| { text: string; type: "text" };
|
|
4742
|
+
filename?: string;
|
|
4743
|
+
mediaType: string;
|
|
4744
|
+
providerOptions?: Record<
|
|
4745
|
+
string,
|
|
4746
|
+
Record<string, any>
|
|
4747
|
+
>;
|
|
4748
|
+
type: "file";
|
|
4749
|
+
}
|
|
3851
4750
|
| {
|
|
3852
4751
|
data: string;
|
|
3853
4752
|
mediaType: string;
|
|
@@ -3864,6 +4763,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3864
4763
|
type: "file-data";
|
|
3865
4764
|
}
|
|
3866
4765
|
| {
|
|
4766
|
+
mediaType?: string;
|
|
3867
4767
|
providerOptions?: Record<
|
|
3868
4768
|
string,
|
|
3869
4769
|
Record<string, any>
|
|
@@ -3879,6 +4779,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3879
4779
|
>;
|
|
3880
4780
|
type: "file-id";
|
|
3881
4781
|
}
|
|
4782
|
+
| {
|
|
4783
|
+
providerOptions?: Record<
|
|
4784
|
+
string,
|
|
4785
|
+
Record<string, any>
|
|
4786
|
+
>;
|
|
4787
|
+
providerReference: Record<string, string>;
|
|
4788
|
+
type: "file-reference";
|
|
4789
|
+
}
|
|
3882
4790
|
| {
|
|
3883
4791
|
data: string;
|
|
3884
4792
|
mediaType: string;
|
|
@@ -3888,6 +4796,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3888
4796
|
>;
|
|
3889
4797
|
type: "image-data";
|
|
3890
4798
|
}
|
|
4799
|
+
| {
|
|
4800
|
+
providerOptions?: Record<
|
|
4801
|
+
string,
|
|
4802
|
+
Record<string, any>
|
|
4803
|
+
>;
|
|
4804
|
+
providerReference: Record<string, string>;
|
|
4805
|
+
type: "image-file-reference";
|
|
4806
|
+
}
|
|
3891
4807
|
| {
|
|
3892
4808
|
providerOptions?: Record<
|
|
3893
4809
|
string,
|
|
@@ -3976,14 +4892,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3976
4892
|
type: "text";
|
|
3977
4893
|
}
|
|
3978
4894
|
| {
|
|
3979
|
-
image:
|
|
4895
|
+
image:
|
|
4896
|
+
| string
|
|
4897
|
+
| ArrayBuffer
|
|
4898
|
+
| {
|
|
4899
|
+
reference: Record<string, string>;
|
|
4900
|
+
type: "reference";
|
|
4901
|
+
};
|
|
3980
4902
|
mediaType?: string;
|
|
3981
4903
|
mimeType?: string;
|
|
3982
4904
|
providerOptions?: Record<string, Record<string, any>>;
|
|
3983
4905
|
type: "image";
|
|
3984
4906
|
}
|
|
3985
4907
|
| {
|
|
3986
|
-
data:
|
|
4908
|
+
data:
|
|
4909
|
+
| string
|
|
4910
|
+
| ArrayBuffer
|
|
4911
|
+
| {
|
|
4912
|
+
reference: Record<string, string>;
|
|
4913
|
+
type: "reference";
|
|
4914
|
+
};
|
|
3987
4915
|
filename?: string;
|
|
3988
4916
|
mediaType?: string;
|
|
3989
4917
|
mimeType?: string;
|
|
@@ -4012,7 +4940,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4012
4940
|
type: "text";
|
|
4013
4941
|
}
|
|
4014
4942
|
| {
|
|
4015
|
-
data:
|
|
4943
|
+
data:
|
|
4944
|
+
| string
|
|
4945
|
+
| ArrayBuffer
|
|
4946
|
+
| {
|
|
4947
|
+
reference: Record<string, string>;
|
|
4948
|
+
type: "reference";
|
|
4949
|
+
};
|
|
4016
4950
|
filename?: string;
|
|
4017
4951
|
mediaType?: string;
|
|
4018
4952
|
mimeType?: string;
|
|
@@ -4033,6 +4967,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4033
4967
|
text: string;
|
|
4034
4968
|
type: "reasoning";
|
|
4035
4969
|
}
|
|
4970
|
+
| {
|
|
4971
|
+
data?: string | ArrayBuffer;
|
|
4972
|
+
mediaType: string;
|
|
4973
|
+
providerMetadata?: Record<
|
|
4974
|
+
string,
|
|
4975
|
+
Record<string, any>
|
|
4976
|
+
>;
|
|
4977
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
4978
|
+
type: "reasoning-file";
|
|
4979
|
+
url?: string;
|
|
4980
|
+
}
|
|
4981
|
+
| {
|
|
4982
|
+
kind: string;
|
|
4983
|
+
providerMetadata?: Record<
|
|
4984
|
+
string,
|
|
4985
|
+
Record<string, any>
|
|
4986
|
+
>;
|
|
4987
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
4988
|
+
type: "custom";
|
|
4989
|
+
}
|
|
4036
4990
|
| {
|
|
4037
4991
|
data: string;
|
|
4038
4992
|
providerMetadata?: Record<
|
|
@@ -4051,7 +5005,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4051
5005
|
Record<string, any>
|
|
4052
5006
|
>;
|
|
4053
5007
|
providerOptions?: Record<string, Record<string, any>>;
|
|
5008
|
+
title?: string;
|
|
4054
5009
|
toolCallId: string;
|
|
5010
|
+
toolMetadata?: Record<string, any>;
|
|
4055
5011
|
toolName: string;
|
|
4056
5012
|
type: "tool-call";
|
|
4057
5013
|
}
|
|
@@ -4064,7 +5020,9 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4064
5020
|
Record<string, any>
|
|
4065
5021
|
>;
|
|
4066
5022
|
providerOptions?: Record<string, Record<string, any>>;
|
|
5023
|
+
title?: string;
|
|
4067
5024
|
toolCallId: string;
|
|
5025
|
+
toolMetadata?: Record<string, any>;
|
|
4068
5026
|
toolName: string;
|
|
4069
5027
|
type: "tool-call";
|
|
4070
5028
|
}
|
|
@@ -4127,6 +5085,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4127
5085
|
text: string;
|
|
4128
5086
|
type: "text";
|
|
4129
5087
|
}
|
|
5088
|
+
| {
|
|
5089
|
+
data:
|
|
5090
|
+
| { type: "url"; url: string }
|
|
5091
|
+
| {
|
|
5092
|
+
reference: Record<string, string>;
|
|
5093
|
+
type: "reference";
|
|
5094
|
+
}
|
|
5095
|
+
| {
|
|
5096
|
+
data: string | ArrayBuffer;
|
|
5097
|
+
type: "data";
|
|
5098
|
+
}
|
|
5099
|
+
| { text: string; type: "text" };
|
|
5100
|
+
filename?: string;
|
|
5101
|
+
mediaType: string;
|
|
5102
|
+
providerOptions?: Record<
|
|
5103
|
+
string,
|
|
5104
|
+
Record<string, any>
|
|
5105
|
+
>;
|
|
5106
|
+
type: "file";
|
|
5107
|
+
}
|
|
4130
5108
|
| {
|
|
4131
5109
|
data: string;
|
|
4132
5110
|
mediaType: string;
|
|
@@ -4143,6 +5121,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4143
5121
|
type: "file-data";
|
|
4144
5122
|
}
|
|
4145
5123
|
| {
|
|
5124
|
+
mediaType?: string;
|
|
4146
5125
|
providerOptions?: Record<
|
|
4147
5126
|
string,
|
|
4148
5127
|
Record<string, any>
|
|
@@ -4158,6 +5137,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4158
5137
|
>;
|
|
4159
5138
|
type: "file-id";
|
|
4160
5139
|
}
|
|
5140
|
+
| {
|
|
5141
|
+
providerOptions?: Record<
|
|
5142
|
+
string,
|
|
5143
|
+
Record<string, any>
|
|
5144
|
+
>;
|
|
5145
|
+
providerReference: Record<string, string>;
|
|
5146
|
+
type: "file-reference";
|
|
5147
|
+
}
|
|
4161
5148
|
| {
|
|
4162
5149
|
data: string;
|
|
4163
5150
|
mediaType: string;
|
|
@@ -4167,6 +5154,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4167
5154
|
>;
|
|
4168
5155
|
type: "image-data";
|
|
4169
5156
|
}
|
|
5157
|
+
| {
|
|
5158
|
+
providerOptions?: Record<
|
|
5159
|
+
string,
|
|
5160
|
+
Record<string, any>
|
|
5161
|
+
>;
|
|
5162
|
+
providerReference: Record<string, string>;
|
|
5163
|
+
type: "image-file-reference";
|
|
5164
|
+
}
|
|
4170
5165
|
| {
|
|
4171
5166
|
providerOptions?: Record<
|
|
4172
5167
|
string,
|
|
@@ -4230,11 +5225,13 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4230
5225
|
}
|
|
4231
5226
|
| {
|
|
4232
5227
|
approvalId: string;
|
|
5228
|
+
isAutomatic?: boolean;
|
|
4233
5229
|
providerMetadata?: Record<
|
|
4234
5230
|
string,
|
|
4235
5231
|
Record<string, any>
|
|
4236
5232
|
>;
|
|
4237
5233
|
providerOptions?: Record<string, Record<string, any>>;
|
|
5234
|
+
signature?: string;
|
|
4238
5235
|
toolCallId: string;
|
|
4239
5236
|
type: "tool-approval-request";
|
|
4240
5237
|
}
|
|
@@ -4303,6 +5300,26 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4303
5300
|
text: string;
|
|
4304
5301
|
type: "text";
|
|
4305
5302
|
}
|
|
5303
|
+
| {
|
|
5304
|
+
data:
|
|
5305
|
+
| { type: "url"; url: string }
|
|
5306
|
+
| {
|
|
5307
|
+
reference: Record<string, string>;
|
|
5308
|
+
type: "reference";
|
|
5309
|
+
}
|
|
5310
|
+
| {
|
|
5311
|
+
data: string | ArrayBuffer;
|
|
5312
|
+
type: "data";
|
|
5313
|
+
}
|
|
5314
|
+
| { text: string; type: "text" };
|
|
5315
|
+
filename?: string;
|
|
5316
|
+
mediaType: string;
|
|
5317
|
+
providerOptions?: Record<
|
|
5318
|
+
string,
|
|
5319
|
+
Record<string, any>
|
|
5320
|
+
>;
|
|
5321
|
+
type: "file";
|
|
5322
|
+
}
|
|
4306
5323
|
| {
|
|
4307
5324
|
data: string;
|
|
4308
5325
|
mediaType: string;
|
|
@@ -4319,6 +5336,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4319
5336
|
type: "file-data";
|
|
4320
5337
|
}
|
|
4321
5338
|
| {
|
|
5339
|
+
mediaType?: string;
|
|
4322
5340
|
providerOptions?: Record<
|
|
4323
5341
|
string,
|
|
4324
5342
|
Record<string, any>
|
|
@@ -4334,6 +5352,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4334
5352
|
>;
|
|
4335
5353
|
type: "file-id";
|
|
4336
5354
|
}
|
|
5355
|
+
| {
|
|
5356
|
+
providerOptions?: Record<
|
|
5357
|
+
string,
|
|
5358
|
+
Record<string, any>
|
|
5359
|
+
>;
|
|
5360
|
+
providerReference: Record<string, string>;
|
|
5361
|
+
type: "file-reference";
|
|
5362
|
+
}
|
|
4337
5363
|
| {
|
|
4338
5364
|
data: string;
|
|
4339
5365
|
mediaType: string;
|
|
@@ -4343,6 +5369,14 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4343
5369
|
>;
|
|
4344
5370
|
type: "image-data";
|
|
4345
5371
|
}
|
|
5372
|
+
| {
|
|
5373
|
+
providerOptions?: Record<
|
|
5374
|
+
string,
|
|
5375
|
+
Record<string, any>
|
|
5376
|
+
>;
|
|
5377
|
+
providerReference: Record<string, string>;
|
|
5378
|
+
type: "image-file-reference";
|
|
5379
|
+
}
|
|
4346
5380
|
| {
|
|
4347
5381
|
providerOptions?: Record<
|
|
4348
5382
|
string,
|
|
@@ -4438,14 +5472,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
4438
5472
|
threadId: string;
|
|
4439
5473
|
tool: boolean;
|
|
4440
5474
|
usage?: {
|
|
5475
|
+
cacheWriteInputTokens?: number;
|
|
4441
5476
|
cachedInputTokens?: number;
|
|
4442
|
-
completionTokens
|
|
4443
|
-
|
|
5477
|
+
completionTokens?: number;
|
|
5478
|
+
nonCachedInputTokens?: number;
|
|
5479
|
+
promptTokens?: number;
|
|
5480
|
+
raw?: Record<string, any>;
|
|
4444
5481
|
reasoningTokens?: number;
|
|
4445
|
-
|
|
5482
|
+
textOutputTokens?: number;
|
|
5483
|
+
totalTokens?: number;
|
|
4446
5484
|
};
|
|
4447
5485
|
userId?: string;
|
|
4448
5486
|
warnings?: Array<
|
|
5487
|
+
| { details?: string; feature: string; type: "unsupported" }
|
|
5488
|
+
| { details?: string; feature: string; type: "compatibility" }
|
|
5489
|
+
| { message: string; setting: string; type: "deprecated" }
|
|
4449
5490
|
| { details?: string; setting: string; type: "unsupported-setting" }
|
|
4450
5491
|
| { details?: string; tool: any; type: "unsupported-tool" }
|
|
4451
5492
|
| { message: string; type: "other" }
|