@convex-dev/agent 0.2.2 → 0.2.3

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.
Files changed (62) hide show
  1. package/dist/client/definePlaygroundAPI.d.ts +144 -13
  2. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  3. package/dist/client/files.d.ts +1 -1
  4. package/dist/client/files.d.ts.map +1 -1
  5. package/dist/client/files.js.map +1 -1
  6. package/dist/client/index.d.ts +130 -10
  7. package/dist/client/index.d.ts.map +1 -1
  8. package/dist/client/index.js +17 -7
  9. package/dist/client/index.js.map +1 -1
  10. package/dist/client/messages.d.ts +32 -5
  11. package/dist/client/messages.d.ts.map +1 -1
  12. package/dist/client/messages.js +7 -4
  13. package/dist/client/messages.js.map +1 -1
  14. package/dist/client/search.d.ts +31 -4
  15. package/dist/client/search.d.ts.map +1 -1
  16. package/dist/client/search.js +2 -4
  17. package/dist/client/search.js.map +1 -1
  18. package/dist/client/streaming.d.ts +322 -39
  19. package/dist/client/streaming.d.ts.map +1 -1
  20. package/dist/component/_generated/api.d.ts +301 -15
  21. package/dist/component/messages.d.ts +336 -41
  22. package/dist/component/messages.d.ts.map +1 -1
  23. package/dist/component/messages.js +4 -4
  24. package/dist/component/messages.js.map +1 -1
  25. package/dist/component/schema.d.ts +874 -133
  26. package/dist/component/schema.d.ts.map +1 -1
  27. package/dist/mapping.d.ts +4 -4
  28. package/dist/mapping.d.ts.map +1 -1
  29. package/dist/mapping.js +68 -38
  30. package/dist/mapping.js.map +1 -1
  31. package/dist/react/deltas.d.ts +3 -3
  32. package/dist/react/deltas.d.ts.map +1 -1
  33. package/dist/react/deltas.js +321 -28
  34. package/dist/react/deltas.js.map +1 -1
  35. package/dist/react/toUIMessages.d.ts.map +1 -1
  36. package/dist/react/toUIMessages.js +289 -180
  37. package/dist/react/toUIMessages.js.map +1 -1
  38. package/dist/react/useSmoothText.d.ts.map +1 -1
  39. package/dist/react/useSmoothText.js +15 -6
  40. package/dist/react/useSmoothText.js.map +1 -1
  41. package/dist/shared.d.ts +4 -0
  42. package/dist/shared.d.ts.map +1 -1
  43. package/dist/shared.js +8 -0
  44. package/dist/shared.js.map +1 -1
  45. package/dist/validators.d.ts +1887 -249
  46. package/dist/validators.d.ts.map +1 -1
  47. package/dist/validators.js +10 -3
  48. package/dist/validators.js.map +1 -1
  49. package/package.json +1 -1
  50. package/src/client/files.ts +4 -4
  51. package/src/client/index.ts +41 -15
  52. package/src/client/messages.ts +12 -4
  53. package/src/client/search.ts +2 -6
  54. package/src/component/_generated/api.d.ts +301 -15
  55. package/src/component/messages.ts +4 -3
  56. package/src/mapping.ts +105 -56
  57. package/src/react/deltas.ts +391 -46
  58. package/src/react/toUIMessages.test.ts +234 -4
  59. package/src/react/toUIMessages.ts +366 -192
  60. package/src/react/useSmoothText.ts +25 -13
  61. package/src/shared.ts +14 -0
  62. package/src/validators.ts +23 -15
@@ -35,6 +35,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
35
35
  model?: string | undefined;
36
36
  provider?: string | undefined;
37
37
  text?: string | undefined;
38
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
38
39
  reasoning?: string | undefined;
39
40
  usage?: {
40
41
  reasoningTokens?: number | undefined;
@@ -43,17 +44,18 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
43
44
  completionTokens: number;
44
45
  totalTokens: number;
45
46
  } | undefined;
46
- providerMetadata?: Record<string, Record<string, any>> | undefined;
47
47
  sources?: ({
48
48
  title?: string | undefined;
49
49
  type?: "source" | undefined;
50
50
  providerOptions?: Record<string, Record<string, any>> | undefined;
51
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
51
52
  id: string;
52
53
  sourceType: "url";
53
54
  url: string;
54
55
  } | {
55
- filename?: string | undefined;
56
+ providerOptions?: Record<string, Record<string, any>> | undefined;
56
57
  providerMetadata?: Record<string, Record<string, any>> | undefined;
58
+ filename?: string | undefined;
57
59
  id: string;
58
60
  title: string;
59
61
  type: "source";
@@ -75,8 +77,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
75
77
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
76
78
  reasoningDetails?: ({
77
79
  providerOptions?: Record<string, Record<string, any>> | undefined;
80
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
78
81
  signature?: string | undefined;
79
- state?: "streaming" | "done" | undefined;
80
82
  type: "reasoning";
81
83
  text: string;
82
84
  } | {
@@ -92,6 +94,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
92
94
  role: "user";
93
95
  content: string | ({
94
96
  providerOptions?: Record<string, Record<string, any>> | undefined;
97
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
95
98
  type: "text";
96
99
  text: string;
97
100
  } | {
@@ -101,6 +104,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
101
104
  image: string | ArrayBuffer;
102
105
  } | {
103
106
  providerOptions?: Record<string, Record<string, any>> | undefined;
107
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
104
108
  filename?: string | undefined;
105
109
  type: "file";
106
110
  mimeType: string;
@@ -111,37 +115,60 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
111
115
  role: "assistant";
112
116
  content: string | ({
113
117
  providerOptions?: Record<string, Record<string, any>> | undefined;
118
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
114
119
  type: "text";
115
120
  text: string;
116
121
  } | {
117
122
  providerOptions?: Record<string, Record<string, any>> | undefined;
123
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
118
124
  filename?: string | undefined;
119
125
  type: "file";
120
126
  mimeType: string;
121
127
  data: string | ArrayBuffer;
122
128
  } | {
123
129
  providerOptions?: Record<string, Record<string, any>> | undefined;
130
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
124
131
  signature?: string | undefined;
125
- state?: "streaming" | "done" | undefined;
126
132
  type: "reasoning";
127
133
  text: string;
128
134
  } | {
129
135
  providerOptions?: Record<string, Record<string, any>> | undefined;
136
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
130
137
  type: "redacted-reasoning";
131
138
  data: string;
132
139
  } | {
133
140
  providerOptions?: Record<string, Record<string, any>> | undefined;
141
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
134
142
  providerExecuted?: boolean | undefined;
135
143
  type: "tool-call";
136
144
  toolCallId: string;
137
145
  toolName: string;
138
146
  args: any;
147
+ } | {
148
+ providerOptions?: Record<string, Record<string, any>> | undefined;
149
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
150
+ args?: any;
151
+ providerExecuted?: boolean | undefined;
152
+ isError?: boolean | undefined;
153
+ experimental_content?: ({
154
+ type: "text";
155
+ text: string;
156
+ } | {
157
+ mimeType?: string | undefined;
158
+ type: "image";
159
+ data: string;
160
+ })[] | undefined;
161
+ type: "tool-result";
162
+ toolCallId: string;
163
+ toolName: string;
164
+ result: any;
139
165
  })[];
140
166
  } | {
141
167
  providerOptions?: Record<string, Record<string, any>> | undefined;
142
168
  role: "tool";
143
169
  content: {
144
170
  providerOptions?: Record<string, Record<string, any>> | undefined;
171
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
145
172
  args?: any;
146
173
  providerExecuted?: boolean | undefined;
147
174
  isError?: boolean | undefined;
@@ -180,6 +207,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
180
207
  role: "user";
181
208
  content: string | ({
182
209
  providerOptions?: Record<string, Record<string, any>> | undefined;
210
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
183
211
  type: "text";
184
212
  text: string;
185
213
  } | {
@@ -189,6 +217,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
189
217
  image: string | ArrayBuffer;
190
218
  } | {
191
219
  providerOptions?: Record<string, Record<string, any>> | undefined;
220
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
192
221
  filename?: string | undefined;
193
222
  type: "file";
194
223
  mimeType: string;
@@ -199,37 +228,60 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
199
228
  role: "assistant";
200
229
  content: string | ({
201
230
  providerOptions?: Record<string, Record<string, any>> | undefined;
231
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
202
232
  type: "text";
203
233
  text: string;
204
234
  } | {
205
235
  providerOptions?: Record<string, Record<string, any>> | undefined;
236
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
206
237
  filename?: string | undefined;
207
238
  type: "file";
208
239
  mimeType: string;
209
240
  data: string | ArrayBuffer;
210
241
  } | {
211
242
  providerOptions?: Record<string, Record<string, any>> | undefined;
243
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
212
244
  signature?: string | undefined;
213
- state?: "streaming" | "done" | undefined;
214
245
  type: "reasoning";
215
246
  text: string;
216
247
  } | {
217
248
  providerOptions?: Record<string, Record<string, any>> | undefined;
249
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
218
250
  type: "redacted-reasoning";
219
251
  data: string;
220
252
  } | {
221
253
  providerOptions?: Record<string, Record<string, any>> | undefined;
254
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
222
255
  providerExecuted?: boolean | undefined;
223
256
  type: "tool-call";
224
257
  toolCallId: string;
225
258
  toolName: string;
226
259
  args: any;
260
+ } | {
261
+ providerOptions?: Record<string, Record<string, any>> | undefined;
262
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
263
+ args?: any;
264
+ providerExecuted?: boolean | undefined;
265
+ isError?: boolean | undefined;
266
+ experimental_content?: ({
267
+ type: "text";
268
+ text: string;
269
+ } | {
270
+ mimeType?: string | undefined;
271
+ type: "image";
272
+ data: string;
273
+ })[] | undefined;
274
+ type: "tool-result";
275
+ toolCallId: string;
276
+ toolName: string;
277
+ result: any;
227
278
  })[];
228
279
  } | {
229
280
  providerOptions?: Record<string, Record<string, any>> | undefined;
230
281
  role: "tool";
231
282
  content: {
232
283
  providerOptions?: Record<string, Record<string, any>> | undefined;
284
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
233
285
  args?: any;
234
286
  providerExecuted?: boolean | undefined;
235
287
  isError?: boolean | undefined;
@@ -252,6 +304,7 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
252
304
  content: string;
253
305
  } | undefined;
254
306
  text?: string | undefined;
307
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
255
308
  reasoning?: string | undefined;
256
309
  usage?: {
257
310
  reasoningTokens?: number | undefined;
@@ -260,17 +313,18 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
260
313
  completionTokens: number;
261
314
  totalTokens: number;
262
315
  } | undefined;
263
- providerMetadata?: Record<string, Record<string, any>> | undefined;
264
316
  sources?: ({
265
317
  title?: string | undefined;
266
318
  type?: "source" | undefined;
267
319
  providerOptions?: Record<string, Record<string, any>> | undefined;
320
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
268
321
  id: string;
269
322
  sourceType: "url";
270
323
  url: string;
271
324
  } | {
272
- filename?: string | undefined;
325
+ providerOptions?: Record<string, Record<string, any>> | undefined;
273
326
  providerMetadata?: Record<string, Record<string, any>> | undefined;
327
+ filename?: string | undefined;
274
328
  id: string;
275
329
  title: string;
276
330
  type: "source";
@@ -292,8 +346,8 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
292
346
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
293
347
  reasoningDetails?: ({
294
348
  providerOptions?: Record<string, Record<string, any>> | undefined;
349
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
295
350
  signature?: string | undefined;
296
- state?: "streaming" | "done" | undefined;
297
351
  type: "reasoning";
298
352
  text: string;
299
353
  } | {
@@ -331,6 +385,7 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
331
385
  role: "user";
332
386
  content: string | ({
333
387
  providerOptions?: Record<string, Record<string, any>> | undefined;
388
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
334
389
  type: "text";
335
390
  text: string;
336
391
  } | {
@@ -340,6 +395,7 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
340
395
  image: string | ArrayBuffer;
341
396
  } | {
342
397
  providerOptions?: Record<string, Record<string, any>> | undefined;
398
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
343
399
  filename?: string | undefined;
344
400
  type: "file";
345
401
  mimeType: string;
@@ -350,37 +406,60 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
350
406
  role: "assistant";
351
407
  content: string | ({
352
408
  providerOptions?: Record<string, Record<string, any>> | undefined;
409
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
353
410
  type: "text";
354
411
  text: string;
355
412
  } | {
356
413
  providerOptions?: Record<string, Record<string, any>> | undefined;
414
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
357
415
  filename?: string | undefined;
358
416
  type: "file";
359
417
  mimeType: string;
360
418
  data: string | ArrayBuffer;
361
419
  } | {
362
420
  providerOptions?: Record<string, Record<string, any>> | undefined;
421
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
363
422
  signature?: string | undefined;
364
- state?: "streaming" | "done" | undefined;
365
423
  type: "reasoning";
366
424
  text: string;
367
425
  } | {
368
426
  providerOptions?: Record<string, Record<string, any>> | undefined;
427
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
369
428
  type: "redacted-reasoning";
370
429
  data: string;
371
430
  } | {
372
431
  providerOptions?: Record<string, Record<string, any>> | undefined;
432
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
373
433
  providerExecuted?: boolean | undefined;
374
434
  type: "tool-call";
375
435
  toolCallId: string;
376
436
  toolName: string;
377
437
  args: any;
438
+ } | {
439
+ providerOptions?: Record<string, Record<string, any>> | undefined;
440
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
441
+ args?: any;
442
+ providerExecuted?: boolean | undefined;
443
+ isError?: boolean | undefined;
444
+ experimental_content?: ({
445
+ type: "text";
446
+ text: string;
447
+ } | {
448
+ mimeType?: string | undefined;
449
+ type: "image";
450
+ data: string;
451
+ })[] | undefined;
452
+ type: "tool-result";
453
+ toolCallId: string;
454
+ toolName: string;
455
+ result: any;
378
456
  })[];
379
457
  } | {
380
458
  providerOptions?: Record<string, Record<string, any>> | undefined;
381
459
  role: "tool";
382
460
  content: {
383
461
  providerOptions?: Record<string, Record<string, any>> | undefined;
462
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
384
463
  args?: any;
385
464
  providerExecuted?: boolean | undefined;
386
465
  isError?: boolean | undefined;
@@ -403,6 +482,7 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
403
482
  content: string;
404
483
  } | undefined;
405
484
  text?: string | undefined;
485
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
406
486
  reasoning?: string | undefined;
407
487
  usage?: {
408
488
  reasoningTokens?: number | undefined;
@@ -411,17 +491,18 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
411
491
  completionTokens: number;
412
492
  totalTokens: number;
413
493
  } | undefined;
414
- providerMetadata?: Record<string, Record<string, any>> | undefined;
415
494
  sources?: ({
416
495
  title?: string | undefined;
417
496
  type?: "source" | undefined;
418
497
  providerOptions?: Record<string, Record<string, any>> | undefined;
498
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
419
499
  id: string;
420
500
  sourceType: "url";
421
501
  url: string;
422
502
  } | {
423
- filename?: string | undefined;
503
+ providerOptions?: Record<string, Record<string, any>> | undefined;
424
504
  providerMetadata?: Record<string, Record<string, any>> | undefined;
505
+ filename?: string | undefined;
425
506
  id: string;
426
507
  title: string;
427
508
  type: "source";
@@ -443,8 +524,8 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
443
524
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
444
525
  reasoningDetails?: ({
445
526
  providerOptions?: Record<string, Record<string, any>> | undefined;
527
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
446
528
  signature?: string | undefined;
447
- state?: "streaming" | "done" | undefined;
448
529
  type: "reasoning";
449
530
  text: string;
450
531
  } | {
@@ -486,6 +567,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
486
567
  role: "user";
487
568
  content: string | ({
488
569
  providerOptions?: Record<string, Record<string, any>> | undefined;
570
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
489
571
  type: "text";
490
572
  text: string;
491
573
  } | {
@@ -495,6 +577,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
495
577
  image: string | ArrayBuffer;
496
578
  } | {
497
579
  providerOptions?: Record<string, Record<string, any>> | undefined;
580
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
498
581
  filename?: string | undefined;
499
582
  type: "file";
500
583
  mimeType: string;
@@ -505,37 +588,60 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
505
588
  role: "assistant";
506
589
  content: string | ({
507
590
  providerOptions?: Record<string, Record<string, any>> | undefined;
591
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
508
592
  type: "text";
509
593
  text: string;
510
594
  } | {
511
595
  providerOptions?: Record<string, Record<string, any>> | undefined;
596
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
512
597
  filename?: string | undefined;
513
598
  type: "file";
514
599
  mimeType: string;
515
600
  data: string | ArrayBuffer;
516
601
  } | {
517
602
  providerOptions?: Record<string, Record<string, any>> | undefined;
603
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
518
604
  signature?: string | undefined;
519
- state?: "streaming" | "done" | undefined;
520
605
  type: "reasoning";
521
606
  text: string;
522
607
  } | {
523
608
  providerOptions?: Record<string, Record<string, any>> | undefined;
609
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
524
610
  type: "redacted-reasoning";
525
611
  data: string;
526
612
  } | {
527
613
  providerOptions?: Record<string, Record<string, any>> | undefined;
614
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
528
615
  providerExecuted?: boolean | undefined;
529
616
  type: "tool-call";
530
617
  toolCallId: string;
531
618
  toolName: string;
532
619
  args: any;
620
+ } | {
621
+ providerOptions?: Record<string, Record<string, any>> | undefined;
622
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
623
+ args?: any;
624
+ providerExecuted?: boolean | undefined;
625
+ isError?: boolean | undefined;
626
+ experimental_content?: ({
627
+ type: "text";
628
+ text: string;
629
+ } | {
630
+ mimeType?: string | undefined;
631
+ type: "image";
632
+ data: string;
633
+ })[] | undefined;
634
+ type: "tool-result";
635
+ toolCallId: string;
636
+ toolName: string;
637
+ result: any;
533
638
  })[];
534
639
  } | {
535
640
  providerOptions?: Record<string, Record<string, any>> | undefined;
536
641
  role: "tool";
537
642
  content: {
538
643
  providerOptions?: Record<string, Record<string, any>> | undefined;
644
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
539
645
  args?: any;
540
646
  providerExecuted?: boolean | undefined;
541
647
  isError?: boolean | undefined;
@@ -574,6 +680,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
574
680
  role: "user";
575
681
  content: string | ({
576
682
  providerOptions?: Record<string, Record<string, any>> | undefined;
683
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
577
684
  type: "text";
578
685
  text: string;
579
686
  } | {
@@ -583,6 +690,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
583
690
  image: string | ArrayBuffer;
584
691
  } | {
585
692
  providerOptions?: Record<string, Record<string, any>> | undefined;
693
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
586
694
  filename?: string | undefined;
587
695
  type: "file";
588
696
  mimeType: string;
@@ -593,37 +701,60 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
593
701
  role: "assistant";
594
702
  content: string | ({
595
703
  providerOptions?: Record<string, Record<string, any>> | undefined;
704
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
596
705
  type: "text";
597
706
  text: string;
598
707
  } | {
599
708
  providerOptions?: Record<string, Record<string, any>> | undefined;
709
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
600
710
  filename?: string | undefined;
601
711
  type: "file";
602
712
  mimeType: string;
603
713
  data: string | ArrayBuffer;
604
714
  } | {
605
715
  providerOptions?: Record<string, Record<string, any>> | undefined;
716
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
606
717
  signature?: string | undefined;
607
- state?: "streaming" | "done" | undefined;
608
718
  type: "reasoning";
609
719
  text: string;
610
720
  } | {
611
721
  providerOptions?: Record<string, Record<string, any>> | undefined;
722
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
612
723
  type: "redacted-reasoning";
613
724
  data: string;
614
725
  } | {
615
726
  providerOptions?: Record<string, Record<string, any>> | undefined;
727
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
616
728
  providerExecuted?: boolean | undefined;
617
729
  type: "tool-call";
618
730
  toolCallId: string;
619
731
  toolName: string;
620
732
  args: any;
733
+ } | {
734
+ providerOptions?: Record<string, Record<string, any>> | undefined;
735
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
736
+ args?: any;
737
+ providerExecuted?: boolean | undefined;
738
+ isError?: boolean | undefined;
739
+ experimental_content?: ({
740
+ type: "text";
741
+ text: string;
742
+ } | {
743
+ mimeType?: string | undefined;
744
+ type: "image";
745
+ data: string;
746
+ })[] | undefined;
747
+ type: "tool-result";
748
+ toolCallId: string;
749
+ toolName: string;
750
+ result: any;
621
751
  })[];
622
752
  } | {
623
753
  providerOptions?: Record<string, Record<string, any>> | undefined;
624
754
  role: "tool";
625
755
  content: {
626
756
  providerOptions?: Record<string, Record<string, any>> | undefined;
757
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
627
758
  args?: any;
628
759
  providerExecuted?: boolean | undefined;
629
760
  isError?: boolean | undefined;
@@ -646,6 +777,7 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
646
777
  content: string;
647
778
  } | undefined;
648
779
  text?: string | undefined;
780
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
649
781
  reasoning?: string | undefined;
650
782
  usage?: {
651
783
  reasoningTokens?: number | undefined;
@@ -654,17 +786,18 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
654
786
  completionTokens: number;
655
787
  totalTokens: number;
656
788
  } | undefined;
657
- providerMetadata?: Record<string, Record<string, any>> | undefined;
658
789
  sources?: ({
659
790
  title?: string | undefined;
660
791
  type?: "source" | undefined;
661
792
  providerOptions?: Record<string, Record<string, any>> | undefined;
793
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
662
794
  id: string;
663
795
  sourceType: "url";
664
796
  url: string;
665
797
  } | {
666
- filename?: string | undefined;
798
+ providerOptions?: Record<string, Record<string, any>> | undefined;
667
799
  providerMetadata?: Record<string, Record<string, any>> | undefined;
800
+ filename?: string | undefined;
668
801
  id: string;
669
802
  title: string;
670
803
  type: "source";
@@ -686,8 +819,8 @@ export declare const updateMessage: import("convex/server").RegisteredMutation<"
686
819
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
687
820
  reasoningDetails?: ({
688
821
  providerOptions?: Record<string, Record<string, any>> | undefined;
822
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
689
823
  signature?: string | undefined;
690
- state?: "streaming" | "done" | undefined;
691
824
  type: "reasoning";
692
825
  text: string;
693
826
  } | {
@@ -736,6 +869,7 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
736
869
  role: "user";
737
870
  content: string | ({
738
871
  providerOptions?: Record<string, Record<string, any>> | undefined;
872
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
739
873
  type: "text";
740
874
  text: string;
741
875
  } | {
@@ -745,6 +879,7 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
745
879
  image: string | ArrayBuffer;
746
880
  } | {
747
881
  providerOptions?: Record<string, Record<string, any>> | undefined;
882
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
748
883
  filename?: string | undefined;
749
884
  type: "file";
750
885
  mimeType: string;
@@ -755,37 +890,60 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
755
890
  role: "assistant";
756
891
  content: string | ({
757
892
  providerOptions?: Record<string, Record<string, any>> | undefined;
893
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
758
894
  type: "text";
759
895
  text: string;
760
896
  } | {
761
897
  providerOptions?: Record<string, Record<string, any>> | undefined;
898
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
762
899
  filename?: string | undefined;
763
900
  type: "file";
764
901
  mimeType: string;
765
902
  data: string | ArrayBuffer;
766
903
  } | {
767
904
  providerOptions?: Record<string, Record<string, any>> | undefined;
905
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
768
906
  signature?: string | undefined;
769
- state?: "streaming" | "done" | undefined;
770
907
  type: "reasoning";
771
908
  text: string;
772
909
  } | {
773
910
  providerOptions?: Record<string, Record<string, any>> | undefined;
911
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
774
912
  type: "redacted-reasoning";
775
913
  data: string;
776
914
  } | {
777
915
  providerOptions?: Record<string, Record<string, any>> | undefined;
916
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
778
917
  providerExecuted?: boolean | undefined;
779
918
  type: "tool-call";
780
919
  toolCallId: string;
781
920
  toolName: string;
782
921
  args: any;
922
+ } | {
923
+ providerOptions?: Record<string, Record<string, any>> | undefined;
924
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
925
+ args?: any;
926
+ providerExecuted?: boolean | undefined;
927
+ isError?: boolean | undefined;
928
+ experimental_content?: ({
929
+ type: "text";
930
+ text: string;
931
+ } | {
932
+ mimeType?: string | undefined;
933
+ type: "image";
934
+ data: string;
935
+ })[] | undefined;
936
+ type: "tool-result";
937
+ toolCallId: string;
938
+ toolName: string;
939
+ result: any;
783
940
  })[];
784
941
  } | {
785
942
  providerOptions?: Record<string, Record<string, any>> | undefined;
786
943
  role: "tool";
787
944
  content: {
788
945
  providerOptions?: Record<string, Record<string, any>> | undefined;
946
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
789
947
  args?: any;
790
948
  providerExecuted?: boolean | undefined;
791
949
  isError?: boolean | undefined;
@@ -808,6 +966,7 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
808
966
  content: string;
809
967
  } | undefined;
810
968
  text?: string | undefined;
969
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
811
970
  reasoning?: string | undefined;
812
971
  usage?: {
813
972
  reasoningTokens?: number | undefined;
@@ -816,17 +975,18 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
816
975
  completionTokens: number;
817
976
  totalTokens: number;
818
977
  } | undefined;
819
- providerMetadata?: Record<string, Record<string, any>> | undefined;
820
978
  sources?: ({
821
979
  title?: string | undefined;
822
980
  type?: "source" | undefined;
823
981
  providerOptions?: Record<string, Record<string, any>> | undefined;
982
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
824
983
  id: string;
825
984
  sourceType: "url";
826
985
  url: string;
827
986
  } | {
828
- filename?: string | undefined;
987
+ providerOptions?: Record<string, Record<string, any>> | undefined;
829
988
  providerMetadata?: Record<string, Record<string, any>> | undefined;
989
+ filename?: string | undefined;
830
990
  id: string;
831
991
  title: string;
832
992
  type: "source";
@@ -848,8 +1008,8 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
848
1008
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
849
1009
  reasoningDetails?: ({
850
1010
  providerOptions?: Record<string, Record<string, any>> | undefined;
1011
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
851
1012
  signature?: string | undefined;
852
- state?: "streaming" | "done" | undefined;
853
1013
  type: "reasoning";
854
1014
  text: string;
855
1015
  } | {
@@ -890,6 +1050,7 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
890
1050
  role: "user";
891
1051
  content: string | ({
892
1052
  providerOptions?: Record<string, Record<string, any>> | undefined;
1053
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
893
1054
  type: "text";
894
1055
  text: string;
895
1056
  } | {
@@ -899,6 +1060,7 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
899
1060
  image: string | ArrayBuffer;
900
1061
  } | {
901
1062
  providerOptions?: Record<string, Record<string, any>> | undefined;
1063
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
902
1064
  filename?: string | undefined;
903
1065
  type: "file";
904
1066
  mimeType: string;
@@ -909,37 +1071,60 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
909
1071
  role: "assistant";
910
1072
  content: string | ({
911
1073
  providerOptions?: Record<string, Record<string, any>> | undefined;
1074
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
912
1075
  type: "text";
913
1076
  text: string;
914
1077
  } | {
915
1078
  providerOptions?: Record<string, Record<string, any>> | undefined;
1079
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
916
1080
  filename?: string | undefined;
917
1081
  type: "file";
918
1082
  mimeType: string;
919
1083
  data: string | ArrayBuffer;
920
1084
  } | {
921
1085
  providerOptions?: Record<string, Record<string, any>> | undefined;
1086
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
922
1087
  signature?: string | undefined;
923
- state?: "streaming" | "done" | undefined;
924
1088
  type: "reasoning";
925
1089
  text: string;
926
1090
  } | {
927
1091
  providerOptions?: Record<string, Record<string, any>> | undefined;
1092
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
928
1093
  type: "redacted-reasoning";
929
1094
  data: string;
930
1095
  } | {
931
1096
  providerOptions?: Record<string, Record<string, any>> | undefined;
1097
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
932
1098
  providerExecuted?: boolean | undefined;
933
1099
  type: "tool-call";
934
1100
  toolCallId: string;
935
1101
  toolName: string;
936
1102
  args: any;
1103
+ } | {
1104
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1105
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1106
+ args?: any;
1107
+ providerExecuted?: boolean | undefined;
1108
+ isError?: boolean | undefined;
1109
+ experimental_content?: ({
1110
+ type: "text";
1111
+ text: string;
1112
+ } | {
1113
+ mimeType?: string | undefined;
1114
+ type: "image";
1115
+ data: string;
1116
+ })[] | undefined;
1117
+ type: "tool-result";
1118
+ toolCallId: string;
1119
+ toolName: string;
1120
+ result: any;
937
1121
  })[];
938
1122
  } | {
939
1123
  providerOptions?: Record<string, Record<string, any>> | undefined;
940
1124
  role: "tool";
941
1125
  content: {
942
1126
  providerOptions?: Record<string, Record<string, any>> | undefined;
1127
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
943
1128
  args?: any;
944
1129
  providerExecuted?: boolean | undefined;
945
1130
  isError?: boolean | undefined;
@@ -962,6 +1147,7 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
962
1147
  content: string;
963
1148
  } | undefined;
964
1149
  text?: string | undefined;
1150
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
965
1151
  reasoning?: string | undefined;
966
1152
  usage?: {
967
1153
  reasoningTokens?: number | undefined;
@@ -970,17 +1156,18 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
970
1156
  completionTokens: number;
971
1157
  totalTokens: number;
972
1158
  } | undefined;
973
- providerMetadata?: Record<string, Record<string, any>> | undefined;
974
1159
  sources?: ({
975
1160
  title?: string | undefined;
976
1161
  type?: "source" | undefined;
977
1162
  providerOptions?: Record<string, Record<string, any>> | undefined;
1163
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
978
1164
  id: string;
979
1165
  sourceType: "url";
980
1166
  url: string;
981
1167
  } | {
982
- filename?: string | undefined;
1168
+ providerOptions?: Record<string, Record<string, any>> | undefined;
983
1169
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1170
+ filename?: string | undefined;
984
1171
  id: string;
985
1172
  title: string;
986
1173
  type: "source";
@@ -1002,8 +1189,8 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
1002
1189
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1003
1190
  reasoningDetails?: ({
1004
1191
  providerOptions?: Record<string, Record<string, any>> | undefined;
1192
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1005
1193
  signature?: string | undefined;
1006
- state?: "streaming" | "done" | undefined;
1007
1194
  type: "reasoning";
1008
1195
  text: string;
1009
1196
  } | {
@@ -1050,6 +1237,7 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1050
1237
  role: "user";
1051
1238
  content: string | ({
1052
1239
  providerOptions?: Record<string, Record<string, any>> | undefined;
1240
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1053
1241
  type: "text";
1054
1242
  text: string;
1055
1243
  } | {
@@ -1059,6 +1247,7 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1059
1247
  image: string | ArrayBuffer;
1060
1248
  } | {
1061
1249
  providerOptions?: Record<string, Record<string, any>> | undefined;
1250
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1062
1251
  filename?: string | undefined;
1063
1252
  type: "file";
1064
1253
  mimeType: string;
@@ -1069,37 +1258,60 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1069
1258
  role: "assistant";
1070
1259
  content: string | ({
1071
1260
  providerOptions?: Record<string, Record<string, any>> | undefined;
1261
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1072
1262
  type: "text";
1073
1263
  text: string;
1074
1264
  } | {
1075
1265
  providerOptions?: Record<string, Record<string, any>> | undefined;
1266
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1076
1267
  filename?: string | undefined;
1077
1268
  type: "file";
1078
1269
  mimeType: string;
1079
1270
  data: string | ArrayBuffer;
1080
1271
  } | {
1081
1272
  providerOptions?: Record<string, Record<string, any>> | undefined;
1273
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1082
1274
  signature?: string | undefined;
1083
- state?: "streaming" | "done" | undefined;
1084
1275
  type: "reasoning";
1085
1276
  text: string;
1086
1277
  } | {
1087
1278
  providerOptions?: Record<string, Record<string, any>> | undefined;
1279
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1088
1280
  type: "redacted-reasoning";
1089
1281
  data: string;
1090
1282
  } | {
1091
1283
  providerOptions?: Record<string, Record<string, any>> | undefined;
1284
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1092
1285
  providerExecuted?: boolean | undefined;
1093
1286
  type: "tool-call";
1094
1287
  toolCallId: string;
1095
1288
  toolName: string;
1096
1289
  args: any;
1290
+ } | {
1291
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1292
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1293
+ args?: any;
1294
+ providerExecuted?: boolean | undefined;
1295
+ isError?: boolean | undefined;
1296
+ experimental_content?: ({
1297
+ type: "text";
1298
+ text: string;
1299
+ } | {
1300
+ mimeType?: string | undefined;
1301
+ type: "image";
1302
+ data: string;
1303
+ })[] | undefined;
1304
+ type: "tool-result";
1305
+ toolCallId: string;
1306
+ toolName: string;
1307
+ result: any;
1097
1308
  })[];
1098
1309
  } | {
1099
1310
  providerOptions?: Record<string, Record<string, any>> | undefined;
1100
1311
  role: "tool";
1101
1312
  content: {
1102
1313
  providerOptions?: Record<string, Record<string, any>> | undefined;
1314
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1103
1315
  args?: any;
1104
1316
  providerExecuted?: boolean | undefined;
1105
1317
  isError?: boolean | undefined;
@@ -1122,6 +1334,7 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1122
1334
  content: string;
1123
1335
  } | undefined;
1124
1336
  text?: string | undefined;
1337
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1125
1338
  reasoning?: string | undefined;
1126
1339
  usage?: {
1127
1340
  reasoningTokens?: number | undefined;
@@ -1130,17 +1343,18 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1130
1343
  completionTokens: number;
1131
1344
  totalTokens: number;
1132
1345
  } | undefined;
1133
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1134
1346
  sources?: ({
1135
1347
  title?: string | undefined;
1136
1348
  type?: "source" | undefined;
1137
1349
  providerOptions?: Record<string, Record<string, any>> | undefined;
1350
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1138
1351
  id: string;
1139
1352
  sourceType: "url";
1140
1353
  url: string;
1141
1354
  } | {
1142
- filename?: string | undefined;
1355
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1143
1356
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1357
+ filename?: string | undefined;
1144
1358
  id: string;
1145
1359
  title: string;
1146
1360
  type: "source";
@@ -1162,8 +1376,8 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
1162
1376
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1163
1377
  reasoningDetails?: ({
1164
1378
  providerOptions?: Record<string, Record<string, any>> | undefined;
1379
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1165
1380
  signature?: string | undefined;
1166
- state?: "streaming" | "done" | undefined;
1167
1381
  type: "reasoning";
1168
1382
  text: string;
1169
1383
  } | {
@@ -1201,6 +1415,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1201
1415
  role: "user";
1202
1416
  content: string | ({
1203
1417
  providerOptions?: Record<string, Record<string, any>> | undefined;
1418
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1204
1419
  type: "text";
1205
1420
  text: string;
1206
1421
  } | {
@@ -1210,6 +1425,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1210
1425
  image: string | ArrayBuffer;
1211
1426
  } | {
1212
1427
  providerOptions?: Record<string, Record<string, any>> | undefined;
1428
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1213
1429
  filename?: string | undefined;
1214
1430
  type: "file";
1215
1431
  mimeType: string;
@@ -1220,37 +1436,60 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1220
1436
  role: "assistant";
1221
1437
  content: string | ({
1222
1438
  providerOptions?: Record<string, Record<string, any>> | undefined;
1439
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1223
1440
  type: "text";
1224
1441
  text: string;
1225
1442
  } | {
1226
1443
  providerOptions?: Record<string, Record<string, any>> | undefined;
1444
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1227
1445
  filename?: string | undefined;
1228
1446
  type: "file";
1229
1447
  mimeType: string;
1230
1448
  data: string | ArrayBuffer;
1231
1449
  } | {
1232
1450
  providerOptions?: Record<string, Record<string, any>> | undefined;
1451
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1233
1452
  signature?: string | undefined;
1234
- state?: "streaming" | "done" | undefined;
1235
1453
  type: "reasoning";
1236
1454
  text: string;
1237
1455
  } | {
1238
1456
  providerOptions?: Record<string, Record<string, any>> | undefined;
1457
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1239
1458
  type: "redacted-reasoning";
1240
1459
  data: string;
1241
1460
  } | {
1242
1461
  providerOptions?: Record<string, Record<string, any>> | undefined;
1462
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1243
1463
  providerExecuted?: boolean | undefined;
1244
1464
  type: "tool-call";
1245
1465
  toolCallId: string;
1246
1466
  toolName: string;
1247
1467
  args: any;
1468
+ } | {
1469
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1470
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1471
+ args?: any;
1472
+ providerExecuted?: boolean | undefined;
1473
+ isError?: boolean | undefined;
1474
+ experimental_content?: ({
1475
+ type: "text";
1476
+ text: string;
1477
+ } | {
1478
+ mimeType?: string | undefined;
1479
+ type: "image";
1480
+ data: string;
1481
+ })[] | undefined;
1482
+ type: "tool-result";
1483
+ toolCallId: string;
1484
+ toolName: string;
1485
+ result: any;
1248
1486
  })[];
1249
1487
  } | {
1250
1488
  providerOptions?: Record<string, Record<string, any>> | undefined;
1251
1489
  role: "tool";
1252
1490
  content: {
1253
1491
  providerOptions?: Record<string, Record<string, any>> | undefined;
1492
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1254
1493
  args?: any;
1255
1494
  providerExecuted?: boolean | undefined;
1256
1495
  isError?: boolean | undefined;
@@ -1273,6 +1512,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1273
1512
  content: string;
1274
1513
  } | undefined;
1275
1514
  text?: string | undefined;
1515
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1276
1516
  reasoning?: string | undefined;
1277
1517
  usage?: {
1278
1518
  reasoningTokens?: number | undefined;
@@ -1281,17 +1521,18 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1281
1521
  completionTokens: number;
1282
1522
  totalTokens: number;
1283
1523
  } | undefined;
1284
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1285
1524
  sources?: ({
1286
1525
  title?: string | undefined;
1287
1526
  type?: "source" | undefined;
1288
1527
  providerOptions?: Record<string, Record<string, any>> | undefined;
1528
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1289
1529
  id: string;
1290
1530
  sourceType: "url";
1291
1531
  url: string;
1292
1532
  } | {
1293
- filename?: string | undefined;
1533
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1294
1534
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1535
+ filename?: string | undefined;
1295
1536
  id: string;
1296
1537
  title: string;
1297
1538
  type: "source";
@@ -1313,8 +1554,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1313
1554
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1314
1555
  reasoningDetails?: ({
1315
1556
  providerOptions?: Record<string, Record<string, any>> | undefined;
1557
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1316
1558
  signature?: string | undefined;
1317
- state?: "streaming" | "done" | undefined;
1318
1559
  type: "reasoning";
1319
1560
  text: string;
1320
1561
  } | {
@@ -1354,6 +1595,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1354
1595
  role: "user";
1355
1596
  content: string | ({
1356
1597
  providerOptions?: Record<string, Record<string, any>> | undefined;
1598
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1357
1599
  type: "text";
1358
1600
  text: string;
1359
1601
  } | {
@@ -1363,6 +1605,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1363
1605
  image: string | ArrayBuffer;
1364
1606
  } | {
1365
1607
  providerOptions?: Record<string, Record<string, any>> | undefined;
1608
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1366
1609
  filename?: string | undefined;
1367
1610
  type: "file";
1368
1611
  mimeType: string;
@@ -1373,37 +1616,60 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1373
1616
  role: "assistant";
1374
1617
  content: string | ({
1375
1618
  providerOptions?: Record<string, Record<string, any>> | undefined;
1619
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1376
1620
  type: "text";
1377
1621
  text: string;
1378
1622
  } | {
1379
1623
  providerOptions?: Record<string, Record<string, any>> | undefined;
1624
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1380
1625
  filename?: string | undefined;
1381
1626
  type: "file";
1382
1627
  mimeType: string;
1383
1628
  data: string | ArrayBuffer;
1384
1629
  } | {
1385
1630
  providerOptions?: Record<string, Record<string, any>> | undefined;
1631
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1386
1632
  signature?: string | undefined;
1387
- state?: "streaming" | "done" | undefined;
1388
1633
  type: "reasoning";
1389
1634
  text: string;
1390
1635
  } | {
1391
1636
  providerOptions?: Record<string, Record<string, any>> | undefined;
1637
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1392
1638
  type: "redacted-reasoning";
1393
1639
  data: string;
1394
1640
  } | {
1395
1641
  providerOptions?: Record<string, Record<string, any>> | undefined;
1642
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1396
1643
  providerExecuted?: boolean | undefined;
1397
1644
  type: "tool-call";
1398
1645
  toolCallId: string;
1399
1646
  toolName: string;
1400
1647
  args: any;
1648
+ } | {
1649
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1650
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1651
+ args?: any;
1652
+ providerExecuted?: boolean | undefined;
1653
+ isError?: boolean | undefined;
1654
+ experimental_content?: ({
1655
+ type: "text";
1656
+ text: string;
1657
+ } | {
1658
+ mimeType?: string | undefined;
1659
+ type: "image";
1660
+ data: string;
1661
+ })[] | undefined;
1662
+ type: "tool-result";
1663
+ toolCallId: string;
1664
+ toolName: string;
1665
+ result: any;
1401
1666
  })[];
1402
1667
  } | {
1403
1668
  providerOptions?: Record<string, Record<string, any>> | undefined;
1404
1669
  role: "tool";
1405
1670
  content: {
1406
1671
  providerOptions?: Record<string, Record<string, any>> | undefined;
1672
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1407
1673
  args?: any;
1408
1674
  providerExecuted?: boolean | undefined;
1409
1675
  isError?: boolean | undefined;
@@ -1426,6 +1692,7 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1426
1692
  content: string;
1427
1693
  } | undefined;
1428
1694
  text?: string | undefined;
1695
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1429
1696
  reasoning?: string | undefined;
1430
1697
  usage?: {
1431
1698
  reasoningTokens?: number | undefined;
@@ -1434,17 +1701,18 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1434
1701
  completionTokens: number;
1435
1702
  totalTokens: number;
1436
1703
  } | undefined;
1437
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1438
1704
  sources?: ({
1439
1705
  title?: string | undefined;
1440
1706
  type?: "source" | undefined;
1441
1707
  providerOptions?: Record<string, Record<string, any>> | undefined;
1708
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1442
1709
  id: string;
1443
1710
  sourceType: "url";
1444
1711
  url: string;
1445
1712
  } | {
1446
- filename?: string | undefined;
1713
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1447
1714
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1715
+ filename?: string | undefined;
1448
1716
  id: string;
1449
1717
  title: string;
1450
1718
  type: "source";
@@ -1466,8 +1734,8 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1466
1734
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1467
1735
  reasoningDetails?: ({
1468
1736
  providerOptions?: Record<string, Record<string, any>> | undefined;
1737
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1469
1738
  signature?: string | undefined;
1470
- state?: "streaming" | "done" | undefined;
1471
1739
  type: "reasoning";
1472
1740
  text: string;
1473
1741
  } | {
@@ -1507,6 +1775,7 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1507
1775
  role: "user";
1508
1776
  content: string | ({
1509
1777
  providerOptions?: Record<string, Record<string, any>> | undefined;
1778
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1510
1779
  type: "text";
1511
1780
  text: string;
1512
1781
  } | {
@@ -1516,6 +1785,7 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1516
1785
  image: string | ArrayBuffer;
1517
1786
  } | {
1518
1787
  providerOptions?: Record<string, Record<string, any>> | undefined;
1788
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1519
1789
  filename?: string | undefined;
1520
1790
  type: "file";
1521
1791
  mimeType: string;
@@ -1526,37 +1796,60 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1526
1796
  role: "assistant";
1527
1797
  content: string | ({
1528
1798
  providerOptions?: Record<string, Record<string, any>> | undefined;
1799
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1529
1800
  type: "text";
1530
1801
  text: string;
1531
1802
  } | {
1532
1803
  providerOptions?: Record<string, Record<string, any>> | undefined;
1804
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1533
1805
  filename?: string | undefined;
1534
1806
  type: "file";
1535
1807
  mimeType: string;
1536
1808
  data: string | ArrayBuffer;
1537
1809
  } | {
1538
1810
  providerOptions?: Record<string, Record<string, any>> | undefined;
1811
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1539
1812
  signature?: string | undefined;
1540
- state?: "streaming" | "done" | undefined;
1541
1813
  type: "reasoning";
1542
1814
  text: string;
1543
1815
  } | {
1544
1816
  providerOptions?: Record<string, Record<string, any>> | undefined;
1817
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1545
1818
  type: "redacted-reasoning";
1546
1819
  data: string;
1547
1820
  } | {
1548
1821
  providerOptions?: Record<string, Record<string, any>> | undefined;
1822
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1549
1823
  providerExecuted?: boolean | undefined;
1550
1824
  type: "tool-call";
1551
1825
  toolCallId: string;
1552
1826
  toolName: string;
1553
1827
  args: any;
1828
+ } | {
1829
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1830
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1831
+ args?: any;
1832
+ providerExecuted?: boolean | undefined;
1833
+ isError?: boolean | undefined;
1834
+ experimental_content?: ({
1835
+ type: "text";
1836
+ text: string;
1837
+ } | {
1838
+ mimeType?: string | undefined;
1839
+ type: "image";
1840
+ data: string;
1841
+ })[] | undefined;
1842
+ type: "tool-result";
1843
+ toolCallId: string;
1844
+ toolName: string;
1845
+ result: any;
1554
1846
  })[];
1555
1847
  } | {
1556
1848
  providerOptions?: Record<string, Record<string, any>> | undefined;
1557
1849
  role: "tool";
1558
1850
  content: {
1559
1851
  providerOptions?: Record<string, Record<string, any>> | undefined;
1852
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1560
1853
  args?: any;
1561
1854
  providerExecuted?: boolean | undefined;
1562
1855
  isError?: boolean | undefined;
@@ -1579,6 +1872,7 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1579
1872
  content: string;
1580
1873
  } | undefined;
1581
1874
  text?: string | undefined;
1875
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1582
1876
  reasoning?: string | undefined;
1583
1877
  usage?: {
1584
1878
  reasoningTokens?: number | undefined;
@@ -1587,17 +1881,18 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1587
1881
  completionTokens: number;
1588
1882
  totalTokens: number;
1589
1883
  } | undefined;
1590
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1591
1884
  sources?: ({
1592
1885
  title?: string | undefined;
1593
1886
  type?: "source" | undefined;
1594
1887
  providerOptions?: Record<string, Record<string, any>> | undefined;
1888
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1595
1889
  id: string;
1596
1890
  sourceType: "url";
1597
1891
  url: string;
1598
1892
  } | {
1599
- filename?: string | undefined;
1893
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1600
1894
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1895
+ filename?: string | undefined;
1601
1896
  id: string;
1602
1897
  title: string;
1603
1898
  type: "source";
@@ -1619,8 +1914,8 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1619
1914
  finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1620
1915
  reasoningDetails?: ({
1621
1916
  providerOptions?: Record<string, Record<string, any>> | undefined;
1917
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
1622
1918
  signature?: string | undefined;
1623
- state?: "streaming" | "done" | undefined;
1624
1919
  type: "reasoning";
1625
1920
  text: string;
1626
1921
  } | {