@opencode/ai 2.0.19 → 2.0.21

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 (56) hide show
  1. package/dist/cache-policy.js +21 -3
  2. package/dist/llm.d.ts +1 -1
  3. package/dist/promise.d.ts +2 -2
  4. package/dist/protocols/alibaba-chat.d.ts +16 -10
  5. package/dist/protocols/alibaba-responses.d.ts +14 -14
  6. package/dist/protocols/anthropic-messages.js +2 -15
  7. package/dist/protocols/bedrock-converse.d.ts +1 -1
  8. package/dist/protocols/bedrock-converse.js +38 -12
  9. package/dist/protocols/meta-messages.d.ts +5 -1
  10. package/dist/protocols/meta-messages.js +11 -4
  11. package/dist/protocols/meta-responses.d.ts +16 -16
  12. package/dist/protocols/mistral-chat.d.ts +6 -0
  13. package/dist/protocols/mistral-chat.js +8 -5
  14. package/dist/protocols/open-responses.d.ts +31 -31
  15. package/dist/protocols/openai-chat.d.ts +114 -71
  16. package/dist/protocols/openai-chat.js +31 -32
  17. package/dist/protocols/openai-compatible-chat.d.ts +16 -10
  18. package/dist/protocols/openai-compatible-responses.d.ts +2 -2
  19. package/dist/protocols/openai-responses.d.ts +22 -22
  20. package/dist/protocols/utils/claude-model.d.ts +8 -0
  21. package/dist/protocols/utils/claude-model.js +15 -0
  22. package/dist/protocols/utils/tool-stream.d.ts +3 -3
  23. package/dist/protocols/xai-responses.d.ts +14 -14
  24. package/dist/protocols/zai-chat.d.ts +16 -10
  25. package/dist/provider-error.d.ts +1 -0
  26. package/dist/provider-error.js +23 -1
  27. package/dist/providers/alibaba.d.ts +18 -12
  28. package/dist/providers/amazon-bedrock-mantle.d.ts +18 -12
  29. package/dist/providers/azure.d.ts +20 -14
  30. package/dist/providers/baseten.d.ts +32 -20
  31. package/dist/providers/cerebras.d.ts +32 -20
  32. package/dist/providers/cloudflare-ai-gateway.d.ts +36 -24
  33. package/dist/providers/cloudflare-ai-gateway.js +43 -35
  34. package/dist/providers/cloudflare-workers-ai.d.ts +32 -20
  35. package/dist/providers/deepinfra.d.ts +32 -20
  36. package/dist/providers/deepseek.d.ts +32 -20
  37. package/dist/providers/fireworks.d.ts +32 -20
  38. package/dist/providers/google-vertex-chat.d.ts +16 -10
  39. package/dist/providers/google-vertex-responses.d.ts +2 -2
  40. package/dist/providers/groq.d.ts +32 -20
  41. package/dist/providers/meta.d.ts +23 -13
  42. package/dist/providers/minimax.d.ts +18 -12
  43. package/dist/providers/moonshot.d.ts +18 -12
  44. package/dist/providers/openai-compatible-responses.d.ts +2 -2
  45. package/dist/providers/openai-compatible.d.ts +16 -10
  46. package/dist/providers/openai.d.ts +18 -12
  47. package/dist/providers/openrouter.d.ts +64 -40
  48. package/dist/providers/togetherai.d.ts +32 -20
  49. package/dist/providers/xai.d.ts +16 -10
  50. package/dist/providers/zai-coding-plan.d.ts +18 -12
  51. package/dist/providers/zai.d.ts +16 -10
  52. package/dist/route/client.d.ts +1 -1
  53. package/dist/route/executor.js +12 -8
  54. package/dist/schema/events.d.ts +30 -30
  55. package/dist/testing.d.ts +8 -8
  56. package/package.json +3 -3
@@ -58,15 +58,18 @@ export declare const route: Route<{
58
58
  })[];
59
59
  } | {
60
60
  readonly [x: string]: unknown;
61
- readonly content: string | null;
61
+ readonly content: string | readonly {
62
+ readonly type: "text";
63
+ readonly text: string;
64
+ readonly cache_control?: {
65
+ readonly type: "ephemeral";
66
+ readonly ttl?: string | undefined;
67
+ } | undefined;
68
+ }[] | null;
62
69
  readonly role: "assistant";
63
70
  readonly reasoning?: string | undefined;
64
71
  readonly reasoning_content?: string | undefined;
65
72
  readonly reasoning_text?: string | undefined;
66
- readonly cache_control?: {
67
- readonly type: "ephemeral";
68
- readonly ttl?: string | undefined;
69
- } | undefined;
70
73
  readonly tool_calls?: readonly {
71
74
  readonly function: {
72
75
  readonly name: string;
@@ -82,13 +85,16 @@ export declare const route: Route<{
82
85
  }[] | undefined;
83
86
  readonly reasoning_details?: unknown;
84
87
  } | {
85
- readonly content: string;
86
88
  readonly role: "tool";
87
89
  readonly tool_call_id: string;
88
- readonly cache_control?: {
89
- readonly type: "ephemeral";
90
- readonly ttl?: string | undefined;
91
- } | undefined;
90
+ readonly content: string | readonly {
91
+ readonly type: "text";
92
+ readonly text: string;
93
+ readonly cache_control?: {
94
+ readonly type: "ephemeral";
95
+ readonly ttl?: string | undefined;
96
+ } | undefined;
97
+ }[];
92
98
  })[];
93
99
  readonly stream: true;
94
100
  readonly max_completion_tokens?: number | undefined;
@@ -174,15 +180,18 @@ export declare const routes: Route<{
174
180
  })[];
175
181
  } | {
176
182
  readonly [x: string]: unknown;
177
- readonly content: string | null;
183
+ readonly content: string | readonly {
184
+ readonly type: "text";
185
+ readonly text: string;
186
+ readonly cache_control?: {
187
+ readonly type: "ephemeral";
188
+ readonly ttl?: string | undefined;
189
+ } | undefined;
190
+ }[] | null;
178
191
  readonly role: "assistant";
179
192
  readonly reasoning?: string | undefined;
180
193
  readonly reasoning_content?: string | undefined;
181
194
  readonly reasoning_text?: string | undefined;
182
- readonly cache_control?: {
183
- readonly type: "ephemeral";
184
- readonly ttl?: string | undefined;
185
- } | undefined;
186
195
  readonly tool_calls?: readonly {
187
196
  readonly function: {
188
197
  readonly name: string;
@@ -198,13 +207,16 @@ export declare const routes: Route<{
198
207
  }[] | undefined;
199
208
  readonly reasoning_details?: unknown;
200
209
  } | {
201
- readonly content: string;
202
210
  readonly role: "tool";
203
211
  readonly tool_call_id: string;
204
- readonly cache_control?: {
205
- readonly type: "ephemeral";
206
- readonly ttl?: string | undefined;
207
- } | undefined;
212
+ readonly content: string | readonly {
213
+ readonly type: "text";
214
+ readonly text: string;
215
+ readonly cache_control?: {
216
+ readonly type: "ephemeral";
217
+ readonly ttl?: string | undefined;
218
+ } | undefined;
219
+ }[];
208
220
  })[];
209
221
  readonly stream: true;
210
222
  readonly max_completion_tokens?: number | undefined;
@@ -63,15 +63,18 @@ export declare const routes: Route<{
63
63
  })[];
64
64
  } | {
65
65
  readonly [x: string]: unknown;
66
- readonly content: string | null;
66
+ readonly content: string | readonly {
67
+ readonly type: "text";
68
+ readonly text: string;
69
+ readonly cache_control?: {
70
+ readonly type: "ephemeral";
71
+ readonly ttl?: string | undefined;
72
+ } | undefined;
73
+ }[] | null;
67
74
  readonly role: "assistant";
68
75
  readonly reasoning?: string | undefined;
69
76
  readonly reasoning_content?: string | undefined;
70
77
  readonly reasoning_text?: string | undefined;
71
- readonly cache_control?: {
72
- readonly type: "ephemeral";
73
- readonly ttl?: string | undefined;
74
- } | undefined;
75
78
  readonly tool_calls?: readonly {
76
79
  readonly function: {
77
80
  readonly name: string;
@@ -87,13 +90,16 @@ export declare const routes: Route<{
87
90
  }[] | undefined;
88
91
  readonly reasoning_details?: unknown;
89
92
  } | {
90
- readonly content: string;
91
93
  readonly role: "tool";
92
94
  readonly tool_call_id: string;
93
- readonly cache_control?: {
94
- readonly type: "ephemeral";
95
- readonly ttl?: string | undefined;
96
- } | undefined;
95
+ readonly content: string | readonly {
96
+ readonly type: "text";
97
+ readonly text: string;
98
+ readonly cache_control?: {
99
+ readonly type: "ephemeral";
100
+ readonly ttl?: string | undefined;
101
+ } | undefined;
102
+ }[];
97
103
  })[];
98
104
  readonly stream: true;
99
105
  readonly max_completion_tokens?: number | undefined;
@@ -84,8 +84,8 @@ export declare const routes: Route<{
84
84
  } | {
85
85
  readonly type: "input_file";
86
86
  readonly filename: string;
87
- readonly file_data?: string | undefined;
88
87
  readonly detail?: string | undefined;
88
+ readonly file_data?: string | undefined;
89
89
  readonly file_url?: string | undefined;
90
90
  } | {
91
91
  readonly type: "input_text";
@@ -121,8 +121,8 @@ export declare const routes: Route<{
121
121
  } | {
122
122
  readonly type: "input_file";
123
123
  readonly filename: string;
124
- readonly file_data?: string | undefined;
125
124
  readonly detail?: string | undefined;
125
+ readonly file_data?: string | undefined;
126
126
  readonly file_url?: string | undefined;
127
127
  } | {
128
128
  readonly type: "input_text";
@@ -67,15 +67,18 @@ export declare const protocol: Protocol<{
67
67
  })[];
68
68
  } | {
69
69
  readonly [x: string]: unknown;
70
- readonly content: string | null;
70
+ readonly content: string | readonly {
71
+ readonly type: "text";
72
+ readonly text: string;
73
+ readonly cache_control?: {
74
+ readonly type: "ephemeral";
75
+ readonly ttl?: string | undefined;
76
+ } | undefined;
77
+ }[] | null;
71
78
  readonly role: "assistant";
72
79
  readonly reasoning?: string | undefined;
73
80
  readonly reasoning_content?: string | undefined;
74
81
  readonly reasoning_text?: string | undefined;
75
- readonly cache_control?: {
76
- readonly type: "ephemeral";
77
- readonly ttl?: string | undefined;
78
- } | undefined;
79
82
  readonly tool_calls?: readonly {
80
83
  readonly function: {
81
84
  readonly name: string;
@@ -91,13 +94,16 @@ export declare const protocol: Protocol<{
91
94
  }[] | undefined;
92
95
  readonly reasoning_details?: unknown;
93
96
  } | {
94
- readonly content: string;
95
97
  readonly role: "tool";
96
98
  readonly tool_call_id: string;
97
- readonly cache_control?: {
98
- readonly type: "ephemeral";
99
- readonly ttl?: string | undefined;
100
- } | undefined;
99
+ readonly content: string | readonly {
100
+ readonly type: "text";
101
+ readonly text: string;
102
+ readonly cache_control?: {
103
+ readonly type: "ephemeral";
104
+ readonly ttl?: string | undefined;
105
+ } | undefined;
106
+ }[];
101
107
  })[];
102
108
  readonly stream: true;
103
109
  readonly max_completion_tokens?: number | undefined;
@@ -256,15 +262,18 @@ export declare const route: Route<{
256
262
  })[];
257
263
  } | {
258
264
  readonly [x: string]: unknown;
259
- readonly content: string | null;
265
+ readonly content: string | readonly {
266
+ readonly type: "text";
267
+ readonly text: string;
268
+ readonly cache_control?: {
269
+ readonly type: "ephemeral";
270
+ readonly ttl?: string | undefined;
271
+ } | undefined;
272
+ }[] | null;
260
273
  readonly role: "assistant";
261
274
  readonly reasoning?: string | undefined;
262
275
  readonly reasoning_content?: string | undefined;
263
276
  readonly reasoning_text?: string | undefined;
264
- readonly cache_control?: {
265
- readonly type: "ephemeral";
266
- readonly ttl?: string | undefined;
267
- } | undefined;
268
277
  readonly tool_calls?: readonly {
269
278
  readonly function: {
270
279
  readonly name: string;
@@ -280,13 +289,16 @@ export declare const route: Route<{
280
289
  }[] | undefined;
281
290
  readonly reasoning_details?: unknown;
282
291
  } | {
283
- readonly content: string;
284
292
  readonly role: "tool";
285
293
  readonly tool_call_id: string;
286
- readonly cache_control?: {
287
- readonly type: "ephemeral";
288
- readonly ttl?: string | undefined;
289
- } | undefined;
294
+ readonly content: string | readonly {
295
+ readonly type: "text";
296
+ readonly text: string;
297
+ readonly cache_control?: {
298
+ readonly type: "ephemeral";
299
+ readonly ttl?: string | undefined;
300
+ } | undefined;
301
+ }[];
290
302
  })[];
291
303
  readonly stream: true;
292
304
  readonly max_completion_tokens?: number | undefined;
@@ -84,15 +84,18 @@ export declare const routes: (Route<{
84
84
  })[];
85
85
  } | {
86
86
  readonly [x: string]: unknown;
87
- readonly content: string | null;
87
+ readonly content: string | readonly {
88
+ readonly type: "text";
89
+ readonly text: string;
90
+ readonly cache_control?: {
91
+ readonly type: "ephemeral";
92
+ readonly ttl?: string | undefined;
93
+ } | undefined;
94
+ }[] | null;
88
95
  readonly role: "assistant";
89
96
  readonly reasoning?: string | undefined;
90
97
  readonly reasoning_content?: string | undefined;
91
98
  readonly reasoning_text?: string | undefined;
92
- readonly cache_control?: {
93
- readonly type: "ephemeral";
94
- readonly ttl?: string | undefined;
95
- } | undefined;
96
99
  readonly tool_calls?: readonly {
97
100
  readonly function: {
98
101
  readonly name: string;
@@ -108,13 +111,16 @@ export declare const routes: (Route<{
108
111
  }[] | undefined;
109
112
  readonly reasoning_details?: unknown;
110
113
  } | {
111
- readonly content: string;
112
114
  readonly role: "tool";
113
115
  readonly tool_call_id: string;
114
- readonly cache_control?: {
115
- readonly type: "ephemeral";
116
- readonly ttl?: string | undefined;
117
- } | undefined;
116
+ readonly content: string | readonly {
117
+ readonly type: "text";
118
+ readonly text: string;
119
+ readonly cache_control?: {
120
+ readonly type: "ephemeral";
121
+ readonly ttl?: string | undefined;
122
+ } | undefined;
123
+ }[];
118
124
  })[];
119
125
  readonly stream: true;
120
126
  readonly max_completion_tokens?: number | undefined;
@@ -220,8 +226,8 @@ export declare const routes: (Route<{
220
226
  } | {
221
227
  readonly type: "input_file";
222
228
  readonly filename: string;
223
- readonly file_data?: string | undefined;
224
229
  readonly detail?: string | undefined;
230
+ readonly file_data?: string | undefined;
225
231
  readonly file_url?: string | undefined;
226
232
  } | {
227
233
  readonly type: "input_text";
@@ -257,8 +263,8 @@ export declare const routes: (Route<{
257
263
  } | {
258
264
  readonly type: "input_file";
259
265
  readonly filename: string;
260
- readonly file_data?: string | undefined;
261
266
  readonly detail?: string | undefined;
267
+ readonly file_data?: string | undefined;
262
268
  readonly file_url?: string | undefined;
263
269
  } | {
264
270
  readonly type: "input_text";
@@ -547,11 +553,15 @@ export declare const routes: (Route<{
547
553
  readonly timezone?: string | undefined;
548
554
  } | undefined;
549
555
  } | {
550
- readonly name: string;
551
556
  readonly description: string;
557
+ readonly name: string;
552
558
  readonly input_schema: {
553
559
  readonly [x: string]: unknown;
554
560
  };
561
+ readonly cache_control?: {
562
+ readonly type: "ephemeral";
563
+ readonly ttl?: "1h" | "5m" | undefined;
564
+ } | undefined;
555
565
  })[] | undefined;
556
566
  readonly system?: readonly {
557
567
  readonly type: "text";
@@ -372,8 +372,8 @@ export declare const routes: (Route<{
372
372
  } | {
373
373
  readonly type: "input_file";
374
374
  readonly filename: string;
375
- readonly file_data?: string | undefined;
376
375
  readonly detail?: string | undefined;
376
+ readonly file_data?: string | undefined;
377
377
  readonly file_url?: string | undefined;
378
378
  } | {
379
379
  readonly type: "input_text";
@@ -409,8 +409,8 @@ export declare const routes: (Route<{
409
409
  } | {
410
410
  readonly type: "input_file";
411
411
  readonly filename: string;
412
- readonly file_data?: string | undefined;
413
412
  readonly detail?: string | undefined;
413
+ readonly file_data?: string | undefined;
414
414
  readonly file_url?: string | undefined;
415
415
  } | {
416
416
  readonly type: "input_text";
@@ -516,15 +516,18 @@ export declare const routes: (Route<{
516
516
  })[];
517
517
  } | {
518
518
  readonly [x: string]: unknown;
519
- readonly content: string | null;
519
+ readonly content: string | readonly {
520
+ readonly type: "text";
521
+ readonly text: string;
522
+ readonly cache_control?: {
523
+ readonly type: "ephemeral";
524
+ readonly ttl?: string | undefined;
525
+ } | undefined;
526
+ }[] | null;
520
527
  readonly role: "assistant";
521
528
  readonly reasoning?: string | undefined;
522
529
  readonly reasoning_content?: string | undefined;
523
530
  readonly reasoning_text?: string | undefined;
524
- readonly cache_control?: {
525
- readonly type: "ephemeral";
526
- readonly ttl?: string | undefined;
527
- } | undefined;
528
531
  readonly tool_calls?: readonly {
529
532
  readonly function: {
530
533
  readonly name: string;
@@ -540,13 +543,16 @@ export declare const routes: (Route<{
540
543
  }[] | undefined;
541
544
  readonly reasoning_details?: unknown;
542
545
  } | {
543
- readonly content: string;
544
546
  readonly role: "tool";
545
547
  readonly tool_call_id: string;
546
- readonly cache_control?: {
547
- readonly type: "ephemeral";
548
- readonly ttl?: string | undefined;
549
- } | undefined;
548
+ readonly content: string | readonly {
549
+ readonly type: "text";
550
+ readonly text: string;
551
+ readonly cache_control?: {
552
+ readonly type: "ephemeral";
553
+ readonly ttl?: string | undefined;
554
+ } | undefined;
555
+ }[];
550
556
  })[];
551
557
  readonly stream: true;
552
558
  readonly reasoning_split: boolean;
@@ -370,8 +370,8 @@ export declare const routes: (Route<{
370
370
  } | {
371
371
  readonly type: "input_file";
372
372
  readonly filename: string;
373
- readonly file_data?: string | undefined;
374
373
  readonly detail?: string | undefined;
374
+ readonly file_data?: string | undefined;
375
375
  readonly file_url?: string | undefined;
376
376
  } | {
377
377
  readonly type: "input_text";
@@ -407,8 +407,8 @@ export declare const routes: (Route<{
407
407
  } | {
408
408
  readonly type: "input_file";
409
409
  readonly filename: string;
410
- readonly file_data?: string | undefined;
411
410
  readonly detail?: string | undefined;
411
+ readonly file_data?: string | undefined;
412
412
  readonly file_url?: string | undefined;
413
413
  } | {
414
414
  readonly type: "input_text";
@@ -514,15 +514,18 @@ export declare const routes: (Route<{
514
514
  })[];
515
515
  } | {
516
516
  readonly [x: string]: unknown;
517
- readonly content: string | null;
517
+ readonly content: string | readonly {
518
+ readonly type: "text";
519
+ readonly text: string;
520
+ readonly cache_control?: {
521
+ readonly type: "ephemeral";
522
+ readonly ttl?: string | undefined;
523
+ } | undefined;
524
+ }[] | null;
518
525
  readonly role: "assistant";
519
526
  readonly reasoning?: string | undefined;
520
527
  readonly reasoning_content?: string | undefined;
521
528
  readonly reasoning_text?: string | undefined;
522
- readonly cache_control?: {
523
- readonly type: "ephemeral";
524
- readonly ttl?: string | undefined;
525
- } | undefined;
526
529
  readonly tool_calls?: readonly {
527
530
  readonly function: {
528
531
  readonly name: string;
@@ -538,13 +541,16 @@ export declare const routes: (Route<{
538
541
  }[] | undefined;
539
542
  readonly reasoning_details?: unknown;
540
543
  } | {
541
- readonly content: string;
542
544
  readonly role: "tool";
543
545
  readonly tool_call_id: string;
544
- readonly cache_control?: {
545
- readonly type: "ephemeral";
546
- readonly ttl?: string | undefined;
547
- } | undefined;
546
+ readonly content: string | readonly {
547
+ readonly type: "text";
548
+ readonly text: string;
549
+ readonly cache_control?: {
550
+ readonly type: "ephemeral";
551
+ readonly ttl?: string | undefined;
552
+ } | undefined;
553
+ }[];
548
554
  })[];
549
555
  readonly stream: true;
550
556
  readonly max_completion_tokens?: number | undefined;
@@ -82,8 +82,8 @@ export declare const routes: import("../route/client.js").Route<{
82
82
  } | {
83
83
  readonly type: "input_file";
84
84
  readonly filename: string;
85
- readonly file_data?: string | undefined;
86
85
  readonly detail?: string | undefined;
86
+ readonly file_data?: string | undefined;
87
87
  readonly file_url?: string | undefined;
88
88
  } | {
89
89
  readonly type: "input_text";
@@ -119,8 +119,8 @@ export declare const routes: import("../route/client.js").Route<{
119
119
  } | {
120
120
  readonly type: "input_file";
121
121
  readonly filename: string;
122
- readonly file_data?: string | undefined;
123
122
  readonly detail?: string | undefined;
123
+ readonly file_data?: string | undefined;
124
124
  readonly file_url?: string | undefined;
125
125
  } | {
126
126
  readonly type: "input_text";
@@ -60,15 +60,18 @@ export declare const routes: import("../route/client.js").Route<{
60
60
  })[];
61
61
  } | {
62
62
  readonly [x: string]: unknown;
63
- readonly content: string | null;
63
+ readonly content: string | readonly {
64
+ readonly type: "text";
65
+ readonly text: string;
66
+ readonly cache_control?: {
67
+ readonly type: "ephemeral";
68
+ readonly ttl?: string | undefined;
69
+ } | undefined;
70
+ }[] | null;
64
71
  readonly role: "assistant";
65
72
  readonly reasoning?: string | undefined;
66
73
  readonly reasoning_content?: string | undefined;
67
74
  readonly reasoning_text?: string | undefined;
68
- readonly cache_control?: {
69
- readonly type: "ephemeral";
70
- readonly ttl?: string | undefined;
71
- } | undefined;
72
75
  readonly tool_calls?: readonly {
73
76
  readonly function: {
74
77
  readonly name: string;
@@ -84,13 +87,16 @@ export declare const routes: import("../route/client.js").Route<{
84
87
  }[] | undefined;
85
88
  readonly reasoning_details?: unknown;
86
89
  } | {
87
- readonly content: string;
88
90
  readonly role: "tool";
89
91
  readonly tool_call_id: string;
90
- readonly cache_control?: {
91
- readonly type: "ephemeral";
92
- readonly ttl?: string | undefined;
93
- } | undefined;
92
+ readonly content: string | readonly {
93
+ readonly type: "text";
94
+ readonly text: string;
95
+ readonly cache_control?: {
96
+ readonly type: "ephemeral";
97
+ readonly ttl?: string | undefined;
98
+ } | undefined;
99
+ }[];
94
100
  })[];
95
101
  readonly stream: true;
96
102
  readonly max_completion_tokens?: number | undefined;
@@ -55,15 +55,18 @@ export declare const routes: (Route<{
55
55
  })[];
56
56
  } | {
57
57
  readonly [x: string]: unknown;
58
- readonly content: string | null;
58
+ readonly content: string | readonly {
59
+ readonly type: "text";
60
+ readonly text: string;
61
+ readonly cache_control?: {
62
+ readonly type: "ephemeral";
63
+ readonly ttl?: string | undefined;
64
+ } | undefined;
65
+ }[] | null;
59
66
  readonly role: "assistant";
60
67
  readonly reasoning?: string | undefined;
61
68
  readonly reasoning_content?: string | undefined;
62
69
  readonly reasoning_text?: string | undefined;
63
- readonly cache_control?: {
64
- readonly type: "ephemeral";
65
- readonly ttl?: string | undefined;
66
- } | undefined;
67
70
  readonly tool_calls?: readonly {
68
71
  readonly function: {
69
72
  readonly name: string;
@@ -79,13 +82,16 @@ export declare const routes: (Route<{
79
82
  }[] | undefined;
80
83
  readonly reasoning_details?: unknown;
81
84
  } | {
82
- readonly content: string;
83
85
  readonly role: "tool";
84
86
  readonly tool_call_id: string;
85
- readonly cache_control?: {
86
- readonly type: "ephemeral";
87
- readonly ttl?: string | undefined;
88
- } | undefined;
87
+ readonly content: string | readonly {
88
+ readonly type: "text";
89
+ readonly text: string;
90
+ readonly cache_control?: {
91
+ readonly type: "ephemeral";
92
+ readonly ttl?: string | undefined;
93
+ } | undefined;
94
+ }[];
89
95
  })[];
90
96
  readonly stream: true;
91
97
  readonly max_completion_tokens?: number | undefined;
@@ -196,8 +202,8 @@ export declare const routes: (Route<{
196
202
  } | {
197
203
  readonly type: "input_file";
198
204
  readonly filename: string;
199
- readonly file_data?: string | undefined;
200
205
  readonly detail?: string | undefined;
206
+ readonly file_data?: string | undefined;
201
207
  readonly file_url?: string | undefined;
202
208
  } | {
203
209
  readonly type: "input_text";
@@ -233,8 +239,8 @@ export declare const routes: (Route<{
233
239
  } | {
234
240
  readonly type: "input_file";
235
241
  readonly filename: string;
236
- readonly file_data?: string | undefined;
237
242
  readonly detail?: string | undefined;
243
+ readonly file_data?: string | undefined;
238
244
  readonly file_url?: string | undefined;
239
245
  } | {
240
246
  readonly type: "input_text";