@opencode/ai 2.1.2 → 2.1.4

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 (140) hide show
  1. package/dist/cache-policy.js +6 -5
  2. package/dist/experimental/evaluation.d.ts +7 -6
  3. package/dist/experimental/evaluation.js +3 -11
  4. package/dist/experimental/realtime.d.ts +59 -0
  5. package/dist/experimental/realtime.js +21 -13
  6. package/dist/experimental.d.ts +1 -1
  7. package/dist/generation.js +1 -1
  8. package/dist/image-client.d.ts +11 -9
  9. package/dist/image.d.ts +158 -150
  10. package/dist/image.js +2 -2
  11. package/dist/llm.d.ts +2 -4
  12. package/dist/llm.js +2 -2
  13. package/dist/media-model.d.ts +2 -2
  14. package/dist/media-model.js +1 -1
  15. package/dist/promise.d.ts +121 -121
  16. package/dist/promise.js +3 -5
  17. package/dist/protocols/alibaba-chat.d.ts +18 -18
  18. package/dist/protocols/alibaba-chat.js +3 -3
  19. package/dist/protocols/alibaba-messages.d.ts +12 -12
  20. package/dist/protocols/alibaba-messages.js +1 -1
  21. package/dist/protocols/alibaba-responses.d.ts +38 -38
  22. package/dist/protocols/anthropic-messages.d.ts +40 -44
  23. package/dist/protocols/anthropic-messages.js +13 -15
  24. package/dist/protocols/bedrock-converse.d.ts +36 -85
  25. package/dist/protocols/bedrock-converse.js +6 -6
  26. package/dist/protocols/bedrock-event-stream.d.ts +6 -1
  27. package/dist/protocols/bedrock-event-stream.js +9 -8
  28. package/dist/protocols/cartesia-speech.d.ts +32 -32
  29. package/dist/protocols/cohere-chat.d.ts +13 -10
  30. package/dist/protocols/cohere-chat.js +2 -2
  31. package/dist/protocols/deepgram-speech.d.ts +32 -32
  32. package/dist/protocols/elevenlabs-speech.d.ts +32 -32
  33. package/dist/protocols/gemini.d.ts +46 -36
  34. package/dist/protocols/gemini.js +12 -15
  35. package/dist/protocols/google-interactions.d.ts +14 -13
  36. package/dist/protocols/google-interactions.js +16 -11
  37. package/dist/protocols/google-speech.d.ts +32 -32
  38. package/dist/protocols/google-transcription.d.ts +32 -32
  39. package/dist/protocols/meta-messages.d.ts +23 -23
  40. package/dist/protocols/meta-responses.d.ts +84 -84
  41. package/dist/protocols/mistral-chat.d.ts +81 -78
  42. package/dist/protocols/mistral-chat.js +3 -5
  43. package/dist/protocols/open-responses-channel.js +47 -46
  44. package/dist/protocols/open-responses-continuation.d.ts +8 -2
  45. package/dist/protocols/open-responses-continuation.js +3 -1
  46. package/dist/protocols/open-responses.d.ts +419 -419
  47. package/dist/protocols/open-responses.js +11 -10
  48. package/dist/protocols/openai-chat.d.ts +68 -67
  49. package/dist/protocols/openai-chat.js +7 -8
  50. package/dist/protocols/openai-compatible-chat.d.ts +13 -14
  51. package/dist/protocols/openai-compatible-responses.d.ts +39 -40
  52. package/dist/protocols/openai-images.d.ts +32 -32
  53. package/dist/protocols/openai-responses.d.ts +253 -253
  54. package/dist/protocols/openai-responses.js +1 -1
  55. package/dist/protocols/openai-speech.d.ts +32 -32
  56. package/dist/protocols/openai-transcription.d.ts +32 -32
  57. package/dist/protocols/openai-transcription.js +12 -7
  58. package/dist/protocols/utils/open-responses-options.d.ts +8 -8
  59. package/dist/protocols/utils/open-responses-options.js +4 -6
  60. package/dist/protocols/utils/partial-json-options.d.ts +0 -1
  61. package/dist/protocols/utils/partial-json-options.js +0 -1
  62. package/dist/protocols/utils/partial-json.js +5 -4
  63. package/dist/protocols/utils/tool-schema.d.ts +0 -3
  64. package/dist/protocols/utils/tool-schema.js +0 -4
  65. package/dist/protocols/utils/tool-stream.d.ts +1 -1
  66. package/dist/protocols/venice-chat.d.ts +52 -53
  67. package/dist/protocols/venice-chat.js +6 -5
  68. package/dist/protocols/xai-images.js +3 -4
  69. package/dist/protocols/xai-responses.d.ts +81 -81
  70. package/dist/protocols/zai-chat.d.ts +33 -30
  71. package/dist/protocols/zai-chat.js +8 -3
  72. package/dist/protocols/zai-messages.d.ts +21 -19
  73. package/dist/protocols/zai-messages.js +3 -2
  74. package/dist/provider-error.js +8 -7
  75. package/dist/providers/alibaba.d.ts +74 -74
  76. package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
  77. package/dist/providers/amazon-bedrock.d.ts +16 -13
  78. package/dist/providers/anthropic-compatible.d.ts +13 -13
  79. package/dist/providers/anthropic.d.ts +13 -13
  80. package/dist/providers/azure.d.ts +112 -112
  81. package/dist/providers/baseten.d.ts +24 -24
  82. package/dist/providers/cerebras.d.ts +24 -24
  83. package/dist/providers/cloudflare-ai-gateway.d.ts +237 -234
  84. package/dist/providers/cloudflare-ai-gateway.js +3 -6
  85. package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
  86. package/dist/providers/cohere.d.ts +78 -74
  87. package/dist/providers/deepinfra.d.ts +24 -24
  88. package/dist/providers/deepseek.d.ts +24 -24
  89. package/dist/providers/digitalocean.d.ts +36 -36
  90. package/dist/providers/fireworks.d.ts +24 -24
  91. package/dist/providers/google-vertex-chat.d.ts +12 -12
  92. package/dist/providers/google-vertex-interactions.d.ts +3 -3
  93. package/dist/providers/google-vertex-messages.d.ts +20 -20
  94. package/dist/providers/google-vertex-mistral.d.ts +14 -14
  95. package/dist/providers/google-vertex-responses.d.ts +38 -38
  96. package/dist/providers/google-vertex.d.ts +17 -17
  97. package/dist/providers/google-vertex.js +2 -2
  98. package/dist/providers/google.d.ts +79 -79
  99. package/dist/providers/groq.d.ts +24 -24
  100. package/dist/providers/meta.d.ts +189 -189
  101. package/dist/providers/minimax.d.ts +202 -202
  102. package/dist/providers/mistral.d.ts +28 -28
  103. package/dist/providers/moonshot.d.ts +202 -202
  104. package/dist/providers/open-responses-options.d.ts +0 -1
  105. package/dist/providers/open-responses-options.js +1 -1
  106. package/dist/providers/openai-compatible-responses.d.ts +38 -38
  107. package/dist/providers/openai-compatible.d.ts +12 -12
  108. package/dist/providers/openai-compatible.js +1 -1
  109. package/dist/providers/openai-options.d.ts +3 -4
  110. package/dist/providers/openai-options.js +0 -1
  111. package/dist/providers/openai.d.ts +103 -103
  112. package/dist/providers/openrouter.d.ts +171 -112
  113. package/dist/providers/openrouter.js +40 -33
  114. package/dist/providers/togetherai.d.ts +24 -24
  115. package/dist/providers/venice.d.ts +195 -20
  116. package/dist/providers/xai.d.ts +12 -12
  117. package/dist/providers/zai-coding-plan.d.ts +152 -72
  118. package/dist/providers/zai.d.ts +84 -19
  119. package/dist/route/auth-options.d.ts +0 -3
  120. package/dist/route/auth.d.ts +0 -2
  121. package/dist/route/auth.js +0 -2
  122. package/dist/route/client.d.ts +0 -218
  123. package/dist/route/client.js +3 -7
  124. package/dist/route/executor-service.js +1 -1
  125. package/dist/route/transport/http.js +5 -8
  126. package/dist/schema/errors.d.ts +1 -1
  127. package/dist/schema/errors.js +1 -1
  128. package/dist/schema/messages.js +4 -7
  129. package/dist/speech-client.d.ts +11 -9
  130. package/dist/speech.d.ts +158 -150
  131. package/dist/speech.js +2 -2
  132. package/dist/transcription-client.d.ts +11 -9
  133. package/dist/transcription.d.ts +158 -150
  134. package/dist/transcription.js +2 -2
  135. package/dist/video-client.d.ts +11 -9
  136. package/dist/video.d.ts +124 -116
  137. package/dist/video.js +2 -2
  138. package/package.json +7 -6
  139. package/dist/protocols/utils/openai-options.d.ts +0 -16
  140. package/dist/protocols/utils/openai-options.js +0 -15
@@ -24,14 +24,6 @@ export type Settings = ProviderPackage.Settings & OpenAIProviderOptionsInput & A
24
24
  declare const responsesRoute: Route<{
25
25
  readonly model: string;
26
26
  readonly input: readonly ({
27
- readonly [x: string]: unknown;
28
- readonly type: string;
29
- readonly id: string;
30
- } | {
31
- readonly type: "compaction";
32
- readonly id?: string | null | undefined;
33
- readonly encrypted_content: string;
34
- } | {
35
27
  readonly type: "configuration_update";
36
28
  readonly reasoning: {
37
29
  readonly effort: import("../schema/options.js").ReasoningEffort;
@@ -44,10 +36,45 @@ declare const responsesRoute: Route<{
44
36
  readonly type: "message";
45
37
  readonly role: "developer";
46
38
  readonly content: string;
39
+ } | {
40
+ readonly type: "function_call_output";
41
+ readonly call_id: string;
42
+ readonly output: string | readonly ({
43
+ readonly type: "input_text";
44
+ readonly text: string;
45
+ } | {
46
+ readonly type: "input_video";
47
+ readonly video_url: string;
48
+ } | {
49
+ readonly type: "input_image";
50
+ readonly image_url: string;
51
+ readonly detail?: string | undefined;
52
+ } | {
53
+ readonly type: "input_file";
54
+ readonly filename: string;
55
+ readonly detail?: string | undefined;
56
+ readonly file_data?: string | undefined;
57
+ readonly file_url?: string | undefined;
58
+ })[];
59
+ } | {
60
+ readonly type: "reasoning";
61
+ readonly id?: string | undefined;
62
+ readonly summary: readonly {
63
+ readonly type: "summary_text";
64
+ readonly text: string;
65
+ }[];
66
+ readonly encrypted_content?: string | null | undefined;
67
+ } | {
68
+ readonly type: "compaction";
69
+ readonly id?: string | null | undefined;
70
+ readonly encrypted_content: string;
47
71
  } | {
48
72
  readonly type: "message";
49
73
  readonly role: "user";
50
74
  readonly content: readonly ({
75
+ readonly type: "input_text";
76
+ readonly text: string;
77
+ } | {
51
78
  readonly type: "input_image";
52
79
  readonly image_url: string;
53
80
  readonly detail?: string | undefined;
@@ -57,9 +84,6 @@ declare const responsesRoute: Route<{
57
84
  readonly detail?: string | undefined;
58
85
  readonly file_data?: string | undefined;
59
86
  readonly file_url?: string | undefined;
60
- } | {
61
- readonly type: "input_text";
62
- readonly text: string;
63
87
  })[];
64
88
  readonly id?: string | undefined;
65
89
  readonly status?: string | undefined;
@@ -73,14 +97,6 @@ declare const responsesRoute: Route<{
73
97
  }[];
74
98
  readonly phase?: "commentary" | "final_answer" | null | undefined;
75
99
  readonly status?: string | undefined;
76
- } | {
77
- readonly type: "reasoning";
78
- readonly id?: string | undefined;
79
- readonly summary: readonly {
80
- readonly type: "summary_text";
81
- readonly text: string;
82
- }[];
83
- readonly encrypted_content?: string | null | undefined;
84
100
  } | {
85
101
  readonly type: "function_call";
86
102
  readonly id?: string | undefined;
@@ -88,26 +104,6 @@ declare const responsesRoute: Route<{
88
104
  readonly name: string;
89
105
  readonly namespace?: string | undefined;
90
106
  readonly arguments: string;
91
- } | {
92
- readonly type: "function_call_output";
93
- readonly call_id: string;
94
- readonly output: string | readonly ({
95
- readonly type: "input_image";
96
- readonly image_url: string;
97
- readonly detail?: string | undefined;
98
- } | {
99
- readonly type: "input_file";
100
- readonly filename: string;
101
- readonly detail?: string | undefined;
102
- readonly file_data?: string | undefined;
103
- readonly file_url?: string | undefined;
104
- } | {
105
- readonly type: "input_text";
106
- readonly text: string;
107
- } | {
108
- readonly type: "input_video";
109
- readonly video_url: string;
110
- })[];
111
107
  } | {
112
108
  readonly [x: string]: unknown;
113
109
  readonly type: "web_search_call";
@@ -145,6 +141,10 @@ declare const responsesRoute: Route<{
145
141
  readonly arguments?: string | undefined;
146
142
  readonly output?: string | null | undefined;
147
143
  readonly error?: unknown;
144
+ } | {
145
+ readonly [x: string]: unknown;
146
+ readonly type: string;
147
+ readonly id: string;
148
148
  })[];
149
149
  readonly instructions?: string | undefined;
150
150
  readonly store?: boolean | undefined;
@@ -157,15 +157,15 @@ declare const responsesRoute: Route<{
157
157
  } | undefined;
158
158
  readonly top_logprobs?: number | undefined;
159
159
  readonly truncation?: "auto" | "disabled" | undefined;
160
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
160
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
161
161
  readonly prompt_cache_key?: string | undefined;
162
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
162
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
163
163
  readonly reasoning?: {
164
164
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
165
165
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
166
166
  } | undefined;
167
167
  readonly text?: {
168
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
168
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
169
169
  } | undefined;
170
170
  readonly max_output_tokens?: number | undefined;
171
171
  readonly max_tool_calls?: number | undefined;
@@ -175,14 +175,6 @@ declare const responsesRoute: Route<{
175
175
  readonly presence_penalty?: number | undefined;
176
176
  readonly frequency_penalty?: number | undefined;
177
177
  readonly tools?: readonly ({
178
- readonly type: "function";
179
- readonly name: string;
180
- readonly description: string;
181
- readonly parameters: {
182
- readonly [x: string]: unknown;
183
- };
184
- readonly strict?: boolean | undefined;
185
- } | {
186
178
  readonly type: "namespace";
187
179
  readonly name: string;
188
180
  readonly description: string;
@@ -195,6 +187,14 @@ declare const responsesRoute: Route<{
195
187
  };
196
188
  readonly strict?: boolean | undefined;
197
189
  }[];
190
+ } | {
191
+ readonly type: "function";
192
+ readonly name: string;
193
+ readonly description: string;
194
+ readonly parameters: {
195
+ readonly [x: string]: unknown;
196
+ };
197
+ readonly strict?: boolean | undefined;
198
198
  } | {
199
199
  readonly type: "image_generation";
200
200
  readonly action?: "auto" | "edit" | "generate" | undefined;
@@ -232,13 +232,6 @@ export declare const routes: (Route<{
232
232
  readonly messages: readonly ({
233
233
  readonly role: "system";
234
234
  readonly content: string | readonly ({
235
- readonly type: "text";
236
- readonly text: string;
237
- readonly cache_control?: {
238
- readonly type: "ephemeral";
239
- readonly ttl?: string | undefined;
240
- } | undefined;
241
- } | {
242
235
  readonly type: "image_url";
243
236
  readonly image_url: {
244
237
  readonly url: string;
@@ -249,17 +242,17 @@ export declare const routes: (Route<{
249
242
  readonly filename: string;
250
243
  readonly file_data: string;
251
244
  };
252
- })[];
253
- } | {
254
- readonly role: "user";
255
- readonly content: string | readonly ({
245
+ } | {
256
246
  readonly type: "text";
257
247
  readonly text: string;
258
248
  readonly cache_control?: {
259
249
  readonly type: "ephemeral";
260
250
  readonly ttl?: string | undefined;
261
251
  } | undefined;
262
- } | {
252
+ })[];
253
+ } | {
254
+ readonly role: "user";
255
+ readonly content: string | readonly ({
263
256
  readonly type: "image_url";
264
257
  readonly image_url: {
265
258
  readonly url: string;
@@ -270,6 +263,13 @@ export declare const routes: (Route<{
270
263
  readonly filename: string;
271
264
  readonly file_data: string;
272
265
  };
266
+ } | {
267
+ readonly type: "text";
268
+ readonly text: string;
269
+ readonly cache_control?: {
270
+ readonly type: "ephemeral";
271
+ readonly ttl?: string | undefined;
272
+ } | undefined;
273
273
  })[];
274
274
  } | {
275
275
  readonly role: "tool";
@@ -351,14 +351,6 @@ export declare const routes: (Route<{
351
351
  }, import("../route/transport/http.js").HttpPrepared<string>, CompactionOperations | undefined> | Route<{
352
352
  readonly model: string;
353
353
  readonly input: readonly ({
354
- readonly [x: string]: unknown;
355
- readonly type: string;
356
- readonly id: string;
357
- } | {
358
- readonly type: "compaction";
359
- readonly id?: string | null | undefined;
360
- readonly encrypted_content: string;
361
- } | {
362
354
  readonly type: "configuration_update";
363
355
  readonly reasoning: {
364
356
  readonly effort: import("../schema/options.js").ReasoningEffort;
@@ -371,10 +363,45 @@ export declare const routes: (Route<{
371
363
  readonly type: "message";
372
364
  readonly role: "developer";
373
365
  readonly content: string;
366
+ } | {
367
+ readonly type: "function_call_output";
368
+ readonly call_id: string;
369
+ readonly output: string | readonly ({
370
+ readonly type: "input_text";
371
+ readonly text: string;
372
+ } | {
373
+ readonly type: "input_video";
374
+ readonly video_url: string;
375
+ } | {
376
+ readonly type: "input_image";
377
+ readonly image_url: string;
378
+ readonly detail?: string | undefined;
379
+ } | {
380
+ readonly type: "input_file";
381
+ readonly filename: string;
382
+ readonly detail?: string | undefined;
383
+ readonly file_data?: string | undefined;
384
+ readonly file_url?: string | undefined;
385
+ })[];
386
+ } | {
387
+ readonly type: "reasoning";
388
+ readonly id?: string | undefined;
389
+ readonly summary: readonly {
390
+ readonly type: "summary_text";
391
+ readonly text: string;
392
+ }[];
393
+ readonly encrypted_content?: string | null | undefined;
394
+ } | {
395
+ readonly type: "compaction";
396
+ readonly id?: string | null | undefined;
397
+ readonly encrypted_content: string;
374
398
  } | {
375
399
  readonly type: "message";
376
400
  readonly role: "user";
377
401
  readonly content: readonly ({
402
+ readonly type: "input_text";
403
+ readonly text: string;
404
+ } | {
378
405
  readonly type: "input_image";
379
406
  readonly image_url: string;
380
407
  readonly detail?: string | undefined;
@@ -384,9 +411,6 @@ export declare const routes: (Route<{
384
411
  readonly detail?: string | undefined;
385
412
  readonly file_data?: string | undefined;
386
413
  readonly file_url?: string | undefined;
387
- } | {
388
- readonly type: "input_text";
389
- readonly text: string;
390
414
  })[];
391
415
  readonly id?: string | undefined;
392
416
  readonly status?: string | undefined;
@@ -400,14 +424,6 @@ export declare const routes: (Route<{
400
424
  }[];
401
425
  readonly phase?: "commentary" | "final_answer" | null | undefined;
402
426
  readonly status?: string | undefined;
403
- } | {
404
- readonly type: "reasoning";
405
- readonly id?: string | undefined;
406
- readonly summary: readonly {
407
- readonly type: "summary_text";
408
- readonly text: string;
409
- }[];
410
- readonly encrypted_content?: string | null | undefined;
411
427
  } | {
412
428
  readonly type: "function_call";
413
429
  readonly id?: string | undefined;
@@ -415,26 +431,6 @@ export declare const routes: (Route<{
415
431
  readonly name: string;
416
432
  readonly namespace?: string | undefined;
417
433
  readonly arguments: string;
418
- } | {
419
- readonly type: "function_call_output";
420
- readonly call_id: string;
421
- readonly output: string | readonly ({
422
- readonly type: "input_image";
423
- readonly image_url: string;
424
- readonly detail?: string | undefined;
425
- } | {
426
- readonly type: "input_file";
427
- readonly filename: string;
428
- readonly detail?: string | undefined;
429
- readonly file_data?: string | undefined;
430
- readonly file_url?: string | undefined;
431
- } | {
432
- readonly type: "input_text";
433
- readonly text: string;
434
- } | {
435
- readonly type: "input_video";
436
- readonly video_url: string;
437
- })[];
438
434
  } | {
439
435
  readonly [x: string]: unknown;
440
436
  readonly type: "web_search_call";
@@ -472,6 +468,10 @@ export declare const routes: (Route<{
472
468
  readonly arguments?: string | undefined;
473
469
  readonly output?: string | null | undefined;
474
470
  readonly error?: unknown;
471
+ } | {
472
+ readonly [x: string]: unknown;
473
+ readonly type: string;
474
+ readonly id: string;
475
475
  })[];
476
476
  readonly instructions?: string | undefined;
477
477
  readonly store?: boolean | undefined;
@@ -484,15 +484,15 @@ export declare const routes: (Route<{
484
484
  } | undefined;
485
485
  readonly top_logprobs?: number | undefined;
486
486
  readonly truncation?: "auto" | "disabled" | undefined;
487
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
487
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
488
488
  readonly prompt_cache_key?: string | undefined;
489
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
489
+ readonly include?: readonly import("../schema/options.js").OpenString<"code_interpreter_call.outputs" | "computer_call_output.output.image_url" | "file_search_call.results" | "message.input_image.image_url" | "message.output_text.logprobs" | "reasoning.encrypted_content" | "web_search_call.action.sources" | "web_search_call.results">[] | undefined;
490
490
  readonly reasoning?: {
491
491
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
492
492
  readonly summary?: "auto" | "concise" | "detailed" | undefined;
493
493
  } | undefined;
494
494
  readonly text?: {
495
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
495
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
496
496
  } | undefined;
497
497
  readonly max_output_tokens?: number | undefined;
498
498
  readonly max_tool_calls?: number | undefined;
@@ -502,14 +502,6 @@ export declare const routes: (Route<{
502
502
  readonly presence_penalty?: number | undefined;
503
503
  readonly frequency_penalty?: number | undefined;
504
504
  readonly tools?: readonly ({
505
- readonly type: "function";
506
- readonly name: string;
507
- readonly description: string;
508
- readonly parameters: {
509
- readonly [x: string]: unknown;
510
- };
511
- readonly strict?: boolean | undefined;
512
- } | {
513
505
  readonly type: "namespace";
514
506
  readonly name: string;
515
507
  readonly description: string;
@@ -522,6 +514,14 @@ export declare const routes: (Route<{
522
514
  };
523
515
  readonly strict?: boolean | undefined;
524
516
  }[];
517
+ } | {
518
+ readonly type: "function";
519
+ readonly name: string;
520
+ readonly description: string;
521
+ readonly parameters: {
522
+ readonly [x: string]: unknown;
523
+ };
524
+ readonly strict?: boolean | undefined;
525
525
  } | {
526
526
  readonly type: "image_generation";
527
527
  readonly action?: "auto" | "edit" | "generate" | undefined;
@@ -17,13 +17,6 @@ export declare const route: Route<{
17
17
  readonly messages: readonly ({
18
18
  readonly role: "system";
19
19
  readonly content: string | readonly ({
20
- readonly type: "text";
21
- readonly text: string;
22
- readonly cache_control?: {
23
- readonly type: "ephemeral";
24
- readonly ttl?: string | undefined;
25
- } | undefined;
26
- } | {
27
20
  readonly type: "image_url";
28
21
  readonly image_url: {
29
22
  readonly url: string;
@@ -34,17 +27,17 @@ export declare const route: Route<{
34
27
  readonly filename: string;
35
28
  readonly file_data: string;
36
29
  };
37
- })[];
38
- } | {
39
- readonly role: "user";
40
- readonly content: string | readonly ({
30
+ } | {
41
31
  readonly type: "text";
42
32
  readonly text: string;
43
33
  readonly cache_control?: {
44
34
  readonly type: "ephemeral";
45
35
  readonly ttl?: string | undefined;
46
36
  } | undefined;
47
- } | {
37
+ })[];
38
+ } | {
39
+ readonly role: "user";
40
+ readonly content: string | readonly ({
48
41
  readonly type: "image_url";
49
42
  readonly image_url: {
50
43
  readonly url: string;
@@ -55,6 +48,13 @@ export declare const route: Route<{
55
48
  readonly filename: string;
56
49
  readonly file_data: string;
57
50
  };
51
+ } | {
52
+ readonly type: "text";
53
+ readonly text: string;
54
+ readonly cache_control?: {
55
+ readonly type: "ephemeral";
56
+ readonly ttl?: string | undefined;
57
+ } | undefined;
58
58
  })[];
59
59
  } | {
60
60
  readonly role: "tool";
@@ -139,13 +139,6 @@ export declare const routes: Route<{
139
139
  readonly messages: readonly ({
140
140
  readonly role: "system";
141
141
  readonly content: string | readonly ({
142
- readonly type: "text";
143
- readonly text: string;
144
- readonly cache_control?: {
145
- readonly type: "ephemeral";
146
- readonly ttl?: string | undefined;
147
- } | undefined;
148
- } | {
149
142
  readonly type: "image_url";
150
143
  readonly image_url: {
151
144
  readonly url: string;
@@ -156,17 +149,17 @@ export declare const routes: Route<{
156
149
  readonly filename: string;
157
150
  readonly file_data: string;
158
151
  };
159
- })[];
160
- } | {
161
- readonly role: "user";
162
- readonly content: string | readonly ({
152
+ } | {
163
153
  readonly type: "text";
164
154
  readonly text: string;
165
155
  readonly cache_control?: {
166
156
  readonly type: "ephemeral";
167
157
  readonly ttl?: string | undefined;
168
158
  } | undefined;
169
- } | {
159
+ })[];
160
+ } | {
161
+ readonly role: "user";
162
+ readonly content: string | readonly ({
170
163
  readonly type: "image_url";
171
164
  readonly image_url: {
172
165
  readonly url: string;
@@ -177,6 +170,13 @@ export declare const routes: Route<{
177
170
  readonly filename: string;
178
171
  readonly file_data: string;
179
172
  };
173
+ } | {
174
+ readonly type: "text";
175
+ readonly text: string;
176
+ readonly cache_control?: {
177
+ readonly type: "ephemeral";
178
+ readonly ttl?: string | undefined;
179
+ } | undefined;
180
180
  })[];
181
181
  } | {
182
182
  readonly role: "tool";
@@ -17,13 +17,6 @@ export declare const route: Route<{
17
17
  readonly messages: readonly ({
18
18
  readonly role: "system";
19
19
  readonly content: string | readonly ({
20
- readonly type: "text";
21
- readonly text: string;
22
- readonly cache_control?: {
23
- readonly type: "ephemeral";
24
- readonly ttl?: string | undefined;
25
- } | undefined;
26
- } | {
27
20
  readonly type: "image_url";
28
21
  readonly image_url: {
29
22
  readonly url: string;
@@ -34,17 +27,17 @@ export declare const route: Route<{
34
27
  readonly filename: string;
35
28
  readonly file_data: string;
36
29
  };
37
- })[];
38
- } | {
39
- readonly role: "user";
40
- readonly content: string | readonly ({
30
+ } | {
41
31
  readonly type: "text";
42
32
  readonly text: string;
43
33
  readonly cache_control?: {
44
34
  readonly type: "ephemeral";
45
35
  readonly ttl?: string | undefined;
46
36
  } | undefined;
47
- } | {
37
+ })[];
38
+ } | {
39
+ readonly role: "user";
40
+ readonly content: string | readonly ({
48
41
  readonly type: "image_url";
49
42
  readonly image_url: {
50
43
  readonly url: string;
@@ -55,6 +48,13 @@ export declare const route: Route<{
55
48
  readonly filename: string;
56
49
  readonly file_data: string;
57
50
  };
51
+ } | {
52
+ readonly type: "text";
53
+ readonly text: string;
54
+ readonly cache_control?: {
55
+ readonly type: "ephemeral";
56
+ readonly ttl?: string | undefined;
57
+ } | undefined;
58
58
  })[];
59
59
  } | {
60
60
  readonly role: "tool";
@@ -139,13 +139,6 @@ export declare const routes: Route<{
139
139
  readonly messages: readonly ({
140
140
  readonly role: "system";
141
141
  readonly content: string | readonly ({
142
- readonly type: "text";
143
- readonly text: string;
144
- readonly cache_control?: {
145
- readonly type: "ephemeral";
146
- readonly ttl?: string | undefined;
147
- } | undefined;
148
- } | {
149
142
  readonly type: "image_url";
150
143
  readonly image_url: {
151
144
  readonly url: string;
@@ -156,17 +149,17 @@ export declare const routes: Route<{
156
149
  readonly filename: string;
157
150
  readonly file_data: string;
158
151
  };
159
- })[];
160
- } | {
161
- readonly role: "user";
162
- readonly content: string | readonly ({
152
+ } | {
163
153
  readonly type: "text";
164
154
  readonly text: string;
165
155
  readonly cache_control?: {
166
156
  readonly type: "ephemeral";
167
157
  readonly ttl?: string | undefined;
168
158
  } | undefined;
169
- } | {
159
+ })[];
160
+ } | {
161
+ readonly role: "user";
162
+ readonly content: string | readonly ({
170
163
  readonly type: "image_url";
171
164
  readonly image_url: {
172
165
  readonly url: string;
@@ -177,6 +170,13 @@ export declare const routes: Route<{
177
170
  readonly filename: string;
178
171
  readonly file_data: string;
179
172
  };
173
+ } | {
174
+ readonly type: "text";
175
+ readonly text: string;
176
+ readonly cache_control?: {
177
+ readonly type: "ephemeral";
178
+ readonly ttl?: string | undefined;
179
+ } | undefined;
180
180
  })[];
181
181
  } | {
182
182
  readonly role: "tool";