@opencode/ai 0.0.0-dev-172 → 0.0.0-dev-176

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 (67) hide show
  1. package/README.md +48 -3
  2. package/dist/effect.d.ts +1 -1
  3. package/dist/effect.js +1 -1
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.js +1 -0
  6. package/dist/protocols/alibaba-chat.d.ts +39 -4
  7. package/dist/protocols/alibaba-responses.d.ts +20 -3
  8. package/dist/protocols/fal-images.d.ts +2 -0
  9. package/dist/protocols/fal-images.js +1 -0
  10. package/dist/protocols/meta-responses.d.ts +40 -6
  11. package/dist/protocols/meta-responses.js +1 -1
  12. package/dist/protocols/minimax-images.d.ts +25 -0
  13. package/dist/protocols/minimax-images.js +150 -0
  14. package/dist/protocols/open-responses.d.ts +182 -27
  15. package/dist/protocols/open-responses.js +108 -36
  16. package/dist/protocols/openai-chat.d.ts +438 -46
  17. package/dist/protocols/openai-chat.js +121 -39
  18. package/dist/protocols/openai-compatible-chat.d.ts +35 -4
  19. package/dist/protocols/openai-compatible-responses.d.ts +20 -3
  20. package/dist/protocols/openai-freeform.d.ts +47 -0
  21. package/dist/protocols/openai-freeform.js +54 -0
  22. package/dist/protocols/openai-images.js +8 -2
  23. package/dist/protocols/openai-responses.d.ts +120 -18
  24. package/dist/protocols/openai-responses.js +17 -8
  25. package/dist/protocols/venice-chat.d.ts +39 -4
  26. package/dist/protocols/venice-chat.js +1 -1
  27. package/dist/protocols/xai-images.d.ts +1 -0
  28. package/dist/protocols/xai-images.js +2 -4
  29. package/dist/protocols/xai-responses.d.ts +20 -3
  30. package/dist/protocols/xai-responses.js +2 -1
  31. package/dist/protocols/zai-chat.d.ts +39 -4
  32. package/dist/providers/alibaba.d.ts +55 -7
  33. package/dist/providers/amazon-bedrock-mantle.d.ts +55 -7
  34. package/dist/providers/azure.d.ts +75 -10
  35. package/dist/providers/baseten.d.ts +70 -8
  36. package/dist/providers/cerebras.d.ts +70 -8
  37. package/dist/providers/cloudflare-ai-gateway.d.ts +110 -14
  38. package/dist/providers/cloudflare-workers-ai.d.ts +70 -8
  39. package/dist/providers/cohere.d.ts +70 -8
  40. package/dist/providers/deepinfra.d.ts +70 -8
  41. package/dist/providers/deepseek.d.ts +70 -8
  42. package/dist/providers/digitalocean.d.ts +109 -12
  43. package/dist/providers/fireworks.d.ts +70 -8
  44. package/dist/providers/google-vertex-chat.d.ts +35 -4
  45. package/dist/providers/google-vertex-responses.d.ts +20 -3
  46. package/dist/providers/groq.d.ts +74 -8
  47. package/dist/providers/meta.d.ts +55 -7
  48. package/dist/providers/minimax/images.d.ts +3 -0
  49. package/dist/providers/minimax/images.js +1 -0
  50. package/dist/providers/minimax.d.ts +62 -8
  51. package/dist/providers/minimax.js +22 -9
  52. package/dist/providers/moonshot.d.ts +55 -7
  53. package/dist/providers/openai-compatible-responses.d.ts +20 -3
  54. package/dist/providers/openai-compatible.d.ts +35 -4
  55. package/dist/providers/openai-compatible.js +9 -2
  56. package/dist/providers/openai.d.ts +55 -7
  57. package/dist/providers/openrouter.d.ts +144 -16
  58. package/dist/providers/togetherai.d.ts +70 -8
  59. package/dist/providers/venice.d.ts +35 -4
  60. package/dist/providers/xai.d.ts +35 -4
  61. package/dist/providers/zai-coding-plan.d.ts +55 -7
  62. package/dist/providers/zai.d.ts +35 -4
  63. package/dist/schema/messages.d.ts +35 -1
  64. package/dist/schema/messages.js +20 -0
  65. package/dist/tool.d.ts +12 -1
  66. package/dist/tool.js +10 -2
  67. package/package.json +7 -3
@@ -88,7 +88,14 @@ export declare const route: Route<{
88
88
  readonly ttl?: string | undefined;
89
89
  } | undefined;
90
90
  }[] | null;
91
- readonly tool_calls?: readonly {
91
+ readonly tool_calls?: readonly ({
92
+ readonly id: string;
93
+ readonly type: "custom";
94
+ readonly custom: {
95
+ readonly name: string;
96
+ readonly input: string;
97
+ };
98
+ } | {
92
99
  readonly id: string;
93
100
  readonly type: "function";
94
101
  readonly function: {
@@ -100,13 +107,13 @@ export declare const route: Route<{
100
107
  readonly thought_signature: string;
101
108
  };
102
109
  } | undefined;
103
- }[] | undefined;
110
+ })[] | undefined;
104
111
  readonly reasoning_content?: string | undefined;
105
112
  readonly reasoning?: string | undefined;
106
113
  readonly reasoning_text?: string | undefined;
107
114
  readonly reasoning_details?: unknown;
108
115
  })[];
109
- readonly tools?: readonly {
116
+ readonly tools?: readonly ({
110
117
  readonly type: "function";
111
118
  readonly function: {
112
119
  readonly name: string;
@@ -120,12 +127,36 @@ export declare const route: Route<{
120
127
  readonly type: "ephemeral";
121
128
  readonly ttl?: string | undefined;
122
129
  } | undefined;
123
- }[] | undefined;
130
+ } | {
131
+ readonly type: "custom";
132
+ readonly custom: {
133
+ readonly name: string;
134
+ readonly description: string;
135
+ readonly format: {
136
+ readonly type: "text";
137
+ } | {
138
+ readonly type: "grammar";
139
+ readonly grammar: {
140
+ readonly syntax: "lark" | "regex";
141
+ readonly definition: string;
142
+ };
143
+ };
144
+ };
145
+ readonly cache_control?: {
146
+ readonly type: "ephemeral";
147
+ readonly ttl?: string | undefined;
148
+ } | undefined;
149
+ })[] | undefined;
124
150
  readonly tool_choice?: "auto" | "none" | "required" | {
125
151
  readonly type: "function";
126
152
  readonly function: {
127
153
  readonly name: string;
128
154
  };
155
+ } | {
156
+ readonly type: "custom";
157
+ readonly custom: {
158
+ readonly name: string;
159
+ };
129
160
  } | undefined;
130
161
  readonly stream: true;
131
162
  readonly stream_options?: {
@@ -231,7 +262,14 @@ export declare const routes: Route<{
231
262
  readonly ttl?: string | undefined;
232
263
  } | undefined;
233
264
  }[] | null;
234
- readonly tool_calls?: readonly {
265
+ readonly tool_calls?: readonly ({
266
+ readonly id: string;
267
+ readonly type: "custom";
268
+ readonly custom: {
269
+ readonly name: string;
270
+ readonly input: string;
271
+ };
272
+ } | {
235
273
  readonly id: string;
236
274
  readonly type: "function";
237
275
  readonly function: {
@@ -243,13 +281,13 @@ export declare const routes: Route<{
243
281
  readonly thought_signature: string;
244
282
  };
245
283
  } | undefined;
246
- }[] | undefined;
284
+ })[] | undefined;
247
285
  readonly reasoning_content?: string | undefined;
248
286
  readonly reasoning?: string | undefined;
249
287
  readonly reasoning_text?: string | undefined;
250
288
  readonly reasoning_details?: unknown;
251
289
  })[];
252
- readonly tools?: readonly {
290
+ readonly tools?: readonly ({
253
291
  readonly type: "function";
254
292
  readonly function: {
255
293
  readonly name: string;
@@ -263,12 +301,36 @@ export declare const routes: Route<{
263
301
  readonly type: "ephemeral";
264
302
  readonly ttl?: string | undefined;
265
303
  } | undefined;
266
- }[] | undefined;
304
+ } | {
305
+ readonly type: "custom";
306
+ readonly custom: {
307
+ readonly name: string;
308
+ readonly description: string;
309
+ readonly format: {
310
+ readonly type: "text";
311
+ } | {
312
+ readonly type: "grammar";
313
+ readonly grammar: {
314
+ readonly syntax: "lark" | "regex";
315
+ readonly definition: string;
316
+ };
317
+ };
318
+ };
319
+ readonly cache_control?: {
320
+ readonly type: "ephemeral";
321
+ readonly ttl?: string | undefined;
322
+ } | undefined;
323
+ })[] | undefined;
267
324
  readonly tool_choice?: "auto" | "none" | "required" | {
268
325
  readonly type: "function";
269
326
  readonly function: {
270
327
  readonly name: string;
271
328
  };
329
+ } | {
330
+ readonly type: "custom";
331
+ readonly custom: {
332
+ readonly name: string;
333
+ };
272
334
  } | undefined;
273
335
  readonly stream: true;
274
336
  readonly stream_options?: {
@@ -88,7 +88,14 @@ export declare const route: Route<{
88
88
  readonly ttl?: string | undefined;
89
89
  } | undefined;
90
90
  }[] | null;
91
- readonly tool_calls?: readonly {
91
+ readonly tool_calls?: readonly ({
92
+ readonly id: string;
93
+ readonly type: "custom";
94
+ readonly custom: {
95
+ readonly name: string;
96
+ readonly input: string;
97
+ };
98
+ } | {
92
99
  readonly id: string;
93
100
  readonly type: "function";
94
101
  readonly function: {
@@ -100,13 +107,13 @@ export declare const route: Route<{
100
107
  readonly thought_signature: string;
101
108
  };
102
109
  } | undefined;
103
- }[] | undefined;
110
+ })[] | undefined;
104
111
  readonly reasoning_content?: string | undefined;
105
112
  readonly reasoning?: string | undefined;
106
113
  readonly reasoning_text?: string | undefined;
107
114
  readonly reasoning_details?: unknown;
108
115
  })[];
109
- readonly tools?: readonly {
116
+ readonly tools?: readonly ({
110
117
  readonly type: "function";
111
118
  readonly function: {
112
119
  readonly name: string;
@@ -120,12 +127,36 @@ export declare const route: Route<{
120
127
  readonly type: "ephemeral";
121
128
  readonly ttl?: string | undefined;
122
129
  } | undefined;
123
- }[] | undefined;
130
+ } | {
131
+ readonly type: "custom";
132
+ readonly custom: {
133
+ readonly name: string;
134
+ readonly description: string;
135
+ readonly format: {
136
+ readonly type: "text";
137
+ } | {
138
+ readonly type: "grammar";
139
+ readonly grammar: {
140
+ readonly syntax: "lark" | "regex";
141
+ readonly definition: string;
142
+ };
143
+ };
144
+ };
145
+ readonly cache_control?: {
146
+ readonly type: "ephemeral";
147
+ readonly ttl?: string | undefined;
148
+ } | undefined;
149
+ })[] | undefined;
124
150
  readonly tool_choice?: "auto" | "none" | "required" | {
125
151
  readonly type: "function";
126
152
  readonly function: {
127
153
  readonly name: string;
128
154
  };
155
+ } | {
156
+ readonly type: "custom";
157
+ readonly custom: {
158
+ readonly name: string;
159
+ };
129
160
  } | undefined;
130
161
  readonly stream: true;
131
162
  readonly stream_options?: {
@@ -231,7 +262,14 @@ export declare const routes: Route<{
231
262
  readonly ttl?: string | undefined;
232
263
  } | undefined;
233
264
  }[] | null;
234
- readonly tool_calls?: readonly {
265
+ readonly tool_calls?: readonly ({
266
+ readonly id: string;
267
+ readonly type: "custom";
268
+ readonly custom: {
269
+ readonly name: string;
270
+ readonly input: string;
271
+ };
272
+ } | {
235
273
  readonly id: string;
236
274
  readonly type: "function";
237
275
  readonly function: {
@@ -243,13 +281,13 @@ export declare const routes: Route<{
243
281
  readonly thought_signature: string;
244
282
  };
245
283
  } | undefined;
246
- }[] | undefined;
284
+ })[] | undefined;
247
285
  readonly reasoning_content?: string | undefined;
248
286
  readonly reasoning?: string | undefined;
249
287
  readonly reasoning_text?: string | undefined;
250
288
  readonly reasoning_details?: unknown;
251
289
  })[];
252
- readonly tools?: readonly {
290
+ readonly tools?: readonly ({
253
291
  readonly type: "function";
254
292
  readonly function: {
255
293
  readonly name: string;
@@ -263,12 +301,36 @@ export declare const routes: Route<{
263
301
  readonly type: "ephemeral";
264
302
  readonly ttl?: string | undefined;
265
303
  } | undefined;
266
- }[] | undefined;
304
+ } | {
305
+ readonly type: "custom";
306
+ readonly custom: {
307
+ readonly name: string;
308
+ readonly description: string;
309
+ readonly format: {
310
+ readonly type: "text";
311
+ } | {
312
+ readonly type: "grammar";
313
+ readonly grammar: {
314
+ readonly syntax: "lark" | "regex";
315
+ readonly definition: string;
316
+ };
317
+ };
318
+ };
319
+ readonly cache_control?: {
320
+ readonly type: "ephemeral";
321
+ readonly ttl?: string | undefined;
322
+ } | undefined;
323
+ })[] | undefined;
267
324
  readonly tool_choice?: "auto" | "none" | "required" | {
268
325
  readonly type: "function";
269
326
  readonly function: {
270
327
  readonly name: string;
271
328
  };
329
+ } | {
330
+ readonly type: "custom";
331
+ readonly custom: {
332
+ readonly name: string;
333
+ };
272
334
  } | undefined;
273
335
  readonly stream: true;
274
336
  readonly stream_options?: {
@@ -89,7 +89,14 @@ export declare const protocol: Protocol<{
89
89
  readonly ttl?: string | undefined;
90
90
  } | undefined;
91
91
  }[] | null;
92
- readonly tool_calls?: readonly {
92
+ readonly tool_calls?: readonly ({
93
+ readonly id: string;
94
+ readonly type: "custom";
95
+ readonly custom: {
96
+ readonly name: string;
97
+ readonly input: string;
98
+ };
99
+ } | {
93
100
  readonly id: string;
94
101
  readonly type: "function";
95
102
  readonly function: {
@@ -101,13 +108,13 @@ export declare const protocol: Protocol<{
101
108
  readonly thought_signature: string;
102
109
  };
103
110
  } | undefined;
104
- }[] | undefined;
111
+ })[] | undefined;
105
112
  readonly reasoning_content?: string | undefined;
106
113
  readonly reasoning?: string | undefined;
107
114
  readonly reasoning_text?: string | undefined;
108
115
  readonly reasoning_details?: unknown;
109
116
  })[];
110
- readonly tools?: readonly {
117
+ readonly tools?: readonly ({
111
118
  readonly type: "function";
112
119
  readonly function: {
113
120
  readonly name: string;
@@ -121,12 +128,36 @@ export declare const protocol: Protocol<{
121
128
  readonly type: "ephemeral";
122
129
  readonly ttl?: string | undefined;
123
130
  } | undefined;
124
- }[] | undefined;
131
+ } | {
132
+ readonly type: "custom";
133
+ readonly custom: {
134
+ readonly name: string;
135
+ readonly description: string;
136
+ readonly format: {
137
+ readonly type: "text";
138
+ } | {
139
+ readonly type: "grammar";
140
+ readonly grammar: {
141
+ readonly syntax: "lark" | "regex";
142
+ readonly definition: string;
143
+ };
144
+ };
145
+ };
146
+ readonly cache_control?: {
147
+ readonly type: "ephemeral";
148
+ readonly ttl?: string | undefined;
149
+ } | undefined;
150
+ })[] | undefined;
125
151
  readonly tool_choice?: "auto" | "none" | "required" | {
126
152
  readonly type: "function";
127
153
  readonly function: {
128
154
  readonly name: string;
129
155
  };
156
+ } | {
157
+ readonly type: "custom";
158
+ readonly custom: {
159
+ readonly name: string;
160
+ };
130
161
  } | undefined;
131
162
  readonly stream: true;
132
163
  readonly stream_options?: {
@@ -174,6 +205,10 @@ export declare const protocol: Protocol<{
174
205
  readonly name?: string | null | undefined;
175
206
  readonly arguments?: string | null | undefined;
176
207
  } | null | undefined;
208
+ readonly custom?: {
209
+ readonly name?: string | null | undefined;
210
+ readonly input?: string | null | undefined;
211
+ } | null | undefined;
177
212
  readonly extra_content?: unknown;
178
213
  }[] | null | undefined;
179
214
  } | null | undefined;
@@ -304,7 +339,14 @@ export declare const route: Route<{
304
339
  readonly ttl?: string | undefined;
305
340
  } | undefined;
306
341
  }[] | null;
307
- readonly tool_calls?: readonly {
342
+ readonly tool_calls?: readonly ({
343
+ readonly id: string;
344
+ readonly type: "custom";
345
+ readonly custom: {
346
+ readonly name: string;
347
+ readonly input: string;
348
+ };
349
+ } | {
308
350
  readonly id: string;
309
351
  readonly type: "function";
310
352
  readonly function: {
@@ -316,13 +358,13 @@ export declare const route: Route<{
316
358
  readonly thought_signature: string;
317
359
  };
318
360
  } | undefined;
319
- }[] | undefined;
361
+ })[] | undefined;
320
362
  readonly reasoning_content?: string | undefined;
321
363
  readonly reasoning?: string | undefined;
322
364
  readonly reasoning_text?: string | undefined;
323
365
  readonly reasoning_details?: unknown;
324
366
  })[];
325
- readonly tools?: readonly {
367
+ readonly tools?: readonly ({
326
368
  readonly type: "function";
327
369
  readonly function: {
328
370
  readonly name: string;
@@ -336,12 +378,36 @@ export declare const route: Route<{
336
378
  readonly type: "ephemeral";
337
379
  readonly ttl?: string | undefined;
338
380
  } | undefined;
339
- }[] | undefined;
381
+ } | {
382
+ readonly type: "custom";
383
+ readonly custom: {
384
+ readonly name: string;
385
+ readonly description: string;
386
+ readonly format: {
387
+ readonly type: "text";
388
+ } | {
389
+ readonly type: "grammar";
390
+ readonly grammar: {
391
+ readonly syntax: "lark" | "regex";
392
+ readonly definition: string;
393
+ };
394
+ };
395
+ };
396
+ readonly cache_control?: {
397
+ readonly type: "ephemeral";
398
+ readonly ttl?: string | undefined;
399
+ } | undefined;
400
+ })[] | undefined;
340
401
  readonly tool_choice?: "auto" | "none" | "required" | {
341
402
  readonly type: "function";
342
403
  readonly function: {
343
404
  readonly name: string;
344
405
  };
406
+ } | {
407
+ readonly type: "custom";
408
+ readonly custom: {
409
+ readonly name: string;
410
+ };
345
411
  } | undefined;
346
412
  readonly stream: true;
347
413
  readonly stream_options?: {
@@ -447,7 +513,14 @@ export declare const routes: Route<{
447
513
  readonly ttl?: string | undefined;
448
514
  } | undefined;
449
515
  }[] | null;
450
- readonly tool_calls?: readonly {
516
+ readonly tool_calls?: readonly ({
517
+ readonly id: string;
518
+ readonly type: "custom";
519
+ readonly custom: {
520
+ readonly name: string;
521
+ readonly input: string;
522
+ };
523
+ } | {
451
524
  readonly id: string;
452
525
  readonly type: "function";
453
526
  readonly function: {
@@ -459,13 +532,13 @@ export declare const routes: Route<{
459
532
  readonly thought_signature: string;
460
533
  };
461
534
  } | undefined;
462
- }[] | undefined;
535
+ })[] | undefined;
463
536
  readonly reasoning_content?: string | undefined;
464
537
  readonly reasoning?: string | undefined;
465
538
  readonly reasoning_text?: string | undefined;
466
539
  readonly reasoning_details?: unknown;
467
540
  })[];
468
- readonly tools?: readonly {
541
+ readonly tools?: readonly ({
469
542
  readonly type: "function";
470
543
  readonly function: {
471
544
  readonly name: string;
@@ -479,12 +552,36 @@ export declare const routes: Route<{
479
552
  readonly type: "ephemeral";
480
553
  readonly ttl?: string | undefined;
481
554
  } | undefined;
482
- }[] | undefined;
555
+ } | {
556
+ readonly type: "custom";
557
+ readonly custom: {
558
+ readonly name: string;
559
+ readonly description: string;
560
+ readonly format: {
561
+ readonly type: "text";
562
+ } | {
563
+ readonly type: "grammar";
564
+ readonly grammar: {
565
+ readonly syntax: "lark" | "regex";
566
+ readonly definition: string;
567
+ };
568
+ };
569
+ };
570
+ readonly cache_control?: {
571
+ readonly type: "ephemeral";
572
+ readonly ttl?: string | undefined;
573
+ } | undefined;
574
+ })[] | undefined;
483
575
  readonly tool_choice?: "auto" | "none" | "required" | {
484
576
  readonly type: "function";
485
577
  readonly function: {
486
578
  readonly name: string;
487
579
  };
580
+ } | {
581
+ readonly type: "custom";
582
+ readonly custom: {
583
+ readonly name: string;
584
+ };
488
585
  } | undefined;
489
586
  readonly stream: true;
490
587
  readonly stream_options?: {
@@ -88,7 +88,14 @@ export declare const route: Route<{
88
88
  readonly ttl?: string | undefined;
89
89
  } | undefined;
90
90
  }[] | null;
91
- readonly tool_calls?: readonly {
91
+ readonly tool_calls?: readonly ({
92
+ readonly id: string;
93
+ readonly type: "custom";
94
+ readonly custom: {
95
+ readonly name: string;
96
+ readonly input: string;
97
+ };
98
+ } | {
92
99
  readonly id: string;
93
100
  readonly type: "function";
94
101
  readonly function: {
@@ -100,13 +107,13 @@ export declare const route: Route<{
100
107
  readonly thought_signature: string;
101
108
  };
102
109
  } | undefined;
103
- }[] | undefined;
110
+ })[] | undefined;
104
111
  readonly reasoning_content?: string | undefined;
105
112
  readonly reasoning?: string | undefined;
106
113
  readonly reasoning_text?: string | undefined;
107
114
  readonly reasoning_details?: unknown;
108
115
  })[];
109
- readonly tools?: readonly {
116
+ readonly tools?: readonly ({
110
117
  readonly type: "function";
111
118
  readonly function: {
112
119
  readonly name: string;
@@ -120,12 +127,36 @@ export declare const route: Route<{
120
127
  readonly type: "ephemeral";
121
128
  readonly ttl?: string | undefined;
122
129
  } | undefined;
123
- }[] | undefined;
130
+ } | {
131
+ readonly type: "custom";
132
+ readonly custom: {
133
+ readonly name: string;
134
+ readonly description: string;
135
+ readonly format: {
136
+ readonly type: "text";
137
+ } | {
138
+ readonly type: "grammar";
139
+ readonly grammar: {
140
+ readonly syntax: "lark" | "regex";
141
+ readonly definition: string;
142
+ };
143
+ };
144
+ };
145
+ readonly cache_control?: {
146
+ readonly type: "ephemeral";
147
+ readonly ttl?: string | undefined;
148
+ } | undefined;
149
+ })[] | undefined;
124
150
  readonly tool_choice?: "auto" | "none" | "required" | {
125
151
  readonly type: "function";
126
152
  readonly function: {
127
153
  readonly name: string;
128
154
  };
155
+ } | {
156
+ readonly type: "custom";
157
+ readonly custom: {
158
+ readonly name: string;
159
+ };
129
160
  } | undefined;
130
161
  readonly stream: true;
131
162
  readonly stream_options?: {
@@ -231,7 +262,14 @@ export declare const routes: Route<{
231
262
  readonly ttl?: string | undefined;
232
263
  } | undefined;
233
264
  }[] | null;
234
- readonly tool_calls?: readonly {
265
+ readonly tool_calls?: readonly ({
266
+ readonly id: string;
267
+ readonly type: "custom";
268
+ readonly custom: {
269
+ readonly name: string;
270
+ readonly input: string;
271
+ };
272
+ } | {
235
273
  readonly id: string;
236
274
  readonly type: "function";
237
275
  readonly function: {
@@ -243,13 +281,13 @@ export declare const routes: Route<{
243
281
  readonly thought_signature: string;
244
282
  };
245
283
  } | undefined;
246
- }[] | undefined;
284
+ })[] | undefined;
247
285
  readonly reasoning_content?: string | undefined;
248
286
  readonly reasoning?: string | undefined;
249
287
  readonly reasoning_text?: string | undefined;
250
288
  readonly reasoning_details?: unknown;
251
289
  })[];
252
- readonly tools?: readonly {
290
+ readonly tools?: readonly ({
253
291
  readonly type: "function";
254
292
  readonly function: {
255
293
  readonly name: string;
@@ -263,12 +301,36 @@ export declare const routes: Route<{
263
301
  readonly type: "ephemeral";
264
302
  readonly ttl?: string | undefined;
265
303
  } | undefined;
266
- }[] | undefined;
304
+ } | {
305
+ readonly type: "custom";
306
+ readonly custom: {
307
+ readonly name: string;
308
+ readonly description: string;
309
+ readonly format: {
310
+ readonly type: "text";
311
+ } | {
312
+ readonly type: "grammar";
313
+ readonly grammar: {
314
+ readonly syntax: "lark" | "regex";
315
+ readonly definition: string;
316
+ };
317
+ };
318
+ };
319
+ readonly cache_control?: {
320
+ readonly type: "ephemeral";
321
+ readonly ttl?: string | undefined;
322
+ } | undefined;
323
+ })[] | undefined;
267
324
  readonly tool_choice?: "auto" | "none" | "required" | {
268
325
  readonly type: "function";
269
326
  readonly function: {
270
327
  readonly name: string;
271
328
  };
329
+ } | {
330
+ readonly type: "custom";
331
+ readonly custom: {
332
+ readonly name: string;
333
+ };
272
334
  } | undefined;
273
335
  readonly stream: true;
274
336
  readonly stream_options?: {