@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
@@ -34,183 +34,6 @@ export type Settings<Options = MessagesOptionsInput> = ProviderPackage.Settings
34
34
  readonly baseURL?: string;
35
35
  };
36
36
  export declare const routes: (Route<{
37
- readonly model: string;
38
- readonly input: readonly ({
39
- readonly [x: string]: unknown;
40
- readonly type: string;
41
- readonly id: string;
42
- } | {
43
- readonly type: "compaction";
44
- readonly id?: string | null | undefined;
45
- readonly encrypted_content: string;
46
- } | {
47
- readonly type: "configuration_update";
48
- readonly reasoning: {
49
- readonly effort: import("../schema/options.js").ReasoningEffort;
50
- };
51
- } | {
52
- readonly type: "message";
53
- readonly role: "system";
54
- readonly content: string;
55
- } | {
56
- readonly type: "message";
57
- readonly role: "developer";
58
- readonly content: string;
59
- } | {
60
- readonly type: "message";
61
- readonly role: "user";
62
- readonly content: readonly ({
63
- readonly type: "input_image";
64
- readonly image_url: string;
65
- readonly detail?: string | undefined;
66
- } | {
67
- readonly type: "input_file";
68
- readonly filename: string;
69
- readonly detail?: string | undefined;
70
- readonly file_data?: string | undefined;
71
- readonly file_url?: string | undefined;
72
- } | {
73
- readonly type: "input_text";
74
- readonly text: string;
75
- })[];
76
- readonly id?: string | undefined;
77
- readonly status?: string | undefined;
78
- } | {
79
- readonly type: "message";
80
- readonly id?: string | undefined;
81
- readonly role: "assistant";
82
- readonly content: readonly {
83
- readonly type: "output_text";
84
- readonly text: string;
85
- }[];
86
- readonly phase?: "commentary" | "final_answer" | null | undefined;
87
- readonly status?: string | undefined;
88
- } | {
89
- readonly type: "reasoning";
90
- readonly id?: string | undefined;
91
- readonly summary: readonly {
92
- readonly type: "summary_text";
93
- readonly text: string;
94
- }[];
95
- readonly encrypted_content?: string | null | undefined;
96
- } | {
97
- readonly type: "function_call";
98
- readonly id?: string | undefined;
99
- readonly call_id: string;
100
- readonly name: string;
101
- readonly namespace?: string | undefined;
102
- readonly arguments: string;
103
- } | {
104
- readonly type: "function_call_output";
105
- readonly call_id: string;
106
- readonly output: string | readonly ({
107
- readonly type: "input_image";
108
- readonly image_url: string;
109
- readonly detail?: string | undefined;
110
- } | {
111
- readonly type: "input_file";
112
- readonly filename: string;
113
- readonly detail?: string | undefined;
114
- readonly file_data?: string | undefined;
115
- readonly file_url?: string | undefined;
116
- } | {
117
- readonly type: "input_text";
118
- readonly text: string;
119
- } | {
120
- readonly type: "input_video";
121
- readonly video_url: string;
122
- })[];
123
- } | {
124
- readonly [x: string]: unknown;
125
- readonly type: "web_search_call";
126
- readonly id: string;
127
- readonly status?: string | undefined;
128
- readonly action?: {
129
- readonly [x: string]: unknown;
130
- } | null | undefined;
131
- } | {
132
- readonly [x: string]: unknown;
133
- readonly type: "file_search_call";
134
- readonly id: string;
135
- readonly status?: string | undefined;
136
- readonly queries?: readonly string[] | undefined;
137
- readonly results?: readonly {
138
- readonly [x: string]: unknown;
139
- }[] | null | undefined;
140
- } | {
141
- readonly [x: string]: unknown;
142
- readonly type: "code_interpreter_call";
143
- readonly id: string;
144
- readonly status?: string | undefined;
145
- readonly code?: string | null | undefined;
146
- readonly container_id?: string | null | undefined;
147
- readonly outputs?: readonly {
148
- readonly [x: string]: unknown;
149
- }[] | null | undefined;
150
- } | {
151
- readonly [x: string]: unknown;
152
- readonly type: "mcp_call";
153
- readonly id: string;
154
- readonly status?: string | undefined;
155
- readonly server_label?: string | undefined;
156
- readonly name?: string | undefined;
157
- readonly arguments?: string | undefined;
158
- readonly output?: string | null | undefined;
159
- readonly error?: unknown;
160
- })[];
161
- readonly instructions?: string | undefined;
162
- readonly tools?: readonly ({
163
- readonly type: "function";
164
- readonly name: string;
165
- readonly description: string;
166
- readonly parameters: {
167
- readonly [x: string]: unknown;
168
- };
169
- readonly strict?: boolean | undefined;
170
- } | {
171
- readonly [x: string]: unknown;
172
- readonly type: string;
173
- })[] | undefined;
174
- readonly tool_choice?: "auto" | "none" | "required" | {
175
- readonly type: "function";
176
- readonly name: string;
177
- } | {
178
- readonly type: "allowed_tools";
179
- readonly mode: "auto" | "none" | "required";
180
- readonly tools: readonly {
181
- readonly type: "function";
182
- readonly name: string;
183
- }[];
184
- } | undefined;
185
- readonly store?: boolean | undefined;
186
- readonly metadata?: {
187
- readonly [x: string]: string;
188
- } | undefined;
189
- readonly safety_identifier?: string | undefined;
190
- readonly stream_options?: {
191
- readonly include_obfuscation?: boolean | undefined;
192
- } | undefined;
193
- readonly top_logprobs?: number | undefined;
194
- readonly truncation?: "auto" | "disabled" | undefined;
195
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
196
- readonly prompt_cache_key?: string | undefined;
197
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
198
- readonly reasoning?: {
199
- readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
200
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
201
- } | undefined;
202
- readonly text?: {
203
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
204
- } | undefined;
205
- readonly max_output_tokens?: number | undefined;
206
- readonly max_tool_calls?: number | undefined;
207
- readonly parallel_tool_calls?: boolean | undefined;
208
- readonly temperature?: number | undefined;
209
- readonly top_p?: number | undefined;
210
- readonly presence_penalty?: number | undefined;
211
- readonly frequency_penalty?: number | undefined;
212
- readonly stream: true;
213
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
214
37
  readonly context_management?: {
215
38
  readonly edits: readonly {
216
39
  readonly type: "compact_20260112";
@@ -352,23 +175,15 @@ export declare const routes: (Route<{
352
175
  } | {
353
176
  readonly role: "assistant";
354
177
  readonly content: readonly ({
178
+ readonly type: "compaction";
179
+ readonly content: string | null;
180
+ } | {
355
181
  readonly type: "text";
356
182
  readonly text: string;
357
183
  readonly cache_control?: {
358
184
  readonly type: "ephemeral";
359
185
  readonly ttl?: "1h" | "5m" | undefined;
360
186
  } | undefined;
361
- } | {
362
- readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
363
- readonly tool_use_id: string;
364
- readonly content: unknown;
365
- readonly cache_control?: {
366
- readonly type: "ephemeral";
367
- readonly ttl?: "1h" | "5m" | undefined;
368
- } | undefined;
369
- } | {
370
- readonly type: "compaction";
371
- readonly content: string | null;
372
187
  } | {
373
188
  readonly type: "thinking";
374
189
  readonly thinking: string;
@@ -402,6 +217,14 @@ export declare const routes: (Route<{
402
217
  readonly type: "ephemeral";
403
218
  readonly ttl?: "1h" | "5m" | undefined;
404
219
  } | undefined;
220
+ } | {
221
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
222
+ readonly tool_use_id: string;
223
+ readonly content: unknown;
224
+ readonly cache_control?: {
225
+ readonly type: "ephemeral";
226
+ readonly ttl?: "1h" | "5m" | undefined;
227
+ } | undefined;
405
228
  })[];
406
229
  } | {
407
230
  readonly role: "system";
@@ -443,6 +266,8 @@ export declare const routes: (Route<{
443
266
  readonly top_k?: number | undefined;
444
267
  readonly stop_sequences?: readonly string[] | undefined;
445
268
  readonly thinking?: {
269
+ readonly type: "between_tools" | "disabled";
270
+ } | {
446
271
  readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
447
272
  readonly block_binding?: {
448
273
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
@@ -455,8 +280,6 @@ export declare const routes: (Route<{
455
280
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
456
281
  } | undefined;
457
282
  readonly type: "adaptive";
458
- } | {
459
- readonly type: "between_tools" | "disabled";
460
283
  } | undefined;
461
284
  readonly output_config?: {
462
285
  readonly effort?: string | undefined;
@@ -484,16 +307,186 @@ export declare const routes: (Route<{
484
307
  readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
485
308
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
486
309
  readonly model: string;
487
- readonly messages: readonly ({
310
+ readonly input: readonly ({
311
+ readonly type: "configuration_update";
312
+ readonly reasoning: {
313
+ readonly effort: import("../schema/options.js").ReasoningEffort;
314
+ };
315
+ } | {
316
+ readonly type: "message";
488
317
  readonly role: "system";
489
- readonly content: string | readonly ({
490
- readonly type: "text";
318
+ readonly content: string;
319
+ } | {
320
+ readonly type: "message";
321
+ readonly role: "developer";
322
+ readonly content: string;
323
+ } | {
324
+ readonly type: "function_call_output";
325
+ readonly call_id: string;
326
+ readonly output: string | readonly ({
327
+ readonly type: "input_text";
328
+ readonly text: string;
329
+ } | {
330
+ readonly type: "input_video";
331
+ readonly video_url: string;
332
+ } | {
333
+ readonly type: "input_image";
334
+ readonly image_url: string;
335
+ readonly detail?: string | undefined;
336
+ } | {
337
+ readonly type: "input_file";
338
+ readonly filename: string;
339
+ readonly detail?: string | undefined;
340
+ readonly file_data?: string | undefined;
341
+ readonly file_url?: string | undefined;
342
+ })[];
343
+ } | {
344
+ readonly type: "reasoning";
345
+ readonly id?: string | undefined;
346
+ readonly summary: readonly {
347
+ readonly type: "summary_text";
348
+ readonly text: string;
349
+ }[];
350
+ readonly encrypted_content?: string | null | undefined;
351
+ } | {
352
+ readonly type: "compaction";
353
+ readonly id?: string | null | undefined;
354
+ readonly encrypted_content: string;
355
+ } | {
356
+ readonly type: "message";
357
+ readonly role: "user";
358
+ readonly content: readonly ({
359
+ readonly type: "input_text";
491
360
  readonly text: string;
492
- readonly cache_control?: {
493
- readonly type: "ephemeral";
494
- readonly ttl?: string | undefined;
495
- } | undefined;
496
361
  } | {
362
+ readonly type: "input_image";
363
+ readonly image_url: string;
364
+ readonly detail?: string | undefined;
365
+ } | {
366
+ readonly type: "input_file";
367
+ readonly filename: string;
368
+ readonly detail?: string | undefined;
369
+ readonly file_data?: string | undefined;
370
+ readonly file_url?: string | undefined;
371
+ })[];
372
+ readonly id?: string | undefined;
373
+ readonly status?: string | undefined;
374
+ } | {
375
+ readonly type: "message";
376
+ readonly id?: string | undefined;
377
+ readonly role: "assistant";
378
+ readonly content: readonly {
379
+ readonly type: "output_text";
380
+ readonly text: string;
381
+ }[];
382
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
383
+ readonly status?: string | undefined;
384
+ } | {
385
+ readonly type: "function_call";
386
+ readonly id?: string | undefined;
387
+ readonly call_id: string;
388
+ readonly name: string;
389
+ readonly namespace?: string | undefined;
390
+ readonly arguments: string;
391
+ } | {
392
+ readonly [x: string]: unknown;
393
+ readonly type: "web_search_call";
394
+ readonly id: string;
395
+ readonly status?: string | undefined;
396
+ readonly action?: {
397
+ readonly [x: string]: unknown;
398
+ } | null | undefined;
399
+ } | {
400
+ readonly [x: string]: unknown;
401
+ readonly type: "file_search_call";
402
+ readonly id: string;
403
+ readonly status?: string | undefined;
404
+ readonly queries?: readonly string[] | undefined;
405
+ readonly results?: readonly {
406
+ readonly [x: string]: unknown;
407
+ }[] | null | undefined;
408
+ } | {
409
+ readonly [x: string]: unknown;
410
+ readonly type: "code_interpreter_call";
411
+ readonly id: string;
412
+ readonly status?: string | undefined;
413
+ readonly code?: string | null | undefined;
414
+ readonly container_id?: string | null | undefined;
415
+ readonly outputs?: readonly {
416
+ readonly [x: string]: unknown;
417
+ }[] | null | undefined;
418
+ } | {
419
+ readonly [x: string]: unknown;
420
+ readonly type: "mcp_call";
421
+ readonly id: string;
422
+ readonly status?: string | undefined;
423
+ readonly server_label?: string | undefined;
424
+ readonly name?: string | undefined;
425
+ readonly arguments?: string | undefined;
426
+ readonly output?: string | null | undefined;
427
+ readonly error?: unknown;
428
+ } | {
429
+ readonly [x: string]: unknown;
430
+ readonly type: string;
431
+ readonly id: string;
432
+ })[];
433
+ readonly instructions?: string | undefined;
434
+ readonly tools?: readonly ({
435
+ readonly type: "function";
436
+ readonly name: string;
437
+ readonly description: string;
438
+ readonly parameters: {
439
+ readonly [x: string]: unknown;
440
+ };
441
+ readonly strict?: boolean | undefined;
442
+ } | {
443
+ readonly [x: string]: unknown;
444
+ readonly type: string;
445
+ })[] | undefined;
446
+ readonly tool_choice?: "auto" | "none" | "required" | {
447
+ readonly type: "function";
448
+ readonly name: string;
449
+ } | {
450
+ readonly type: "allowed_tools";
451
+ readonly mode: "auto" | "none" | "required";
452
+ readonly tools: readonly {
453
+ readonly type: "function";
454
+ readonly name: string;
455
+ }[];
456
+ } | undefined;
457
+ readonly store?: boolean | undefined;
458
+ readonly metadata?: {
459
+ readonly [x: string]: string;
460
+ } | undefined;
461
+ readonly safety_identifier?: string | undefined;
462
+ readonly stream_options?: {
463
+ readonly include_obfuscation?: boolean | undefined;
464
+ } | undefined;
465
+ readonly top_logprobs?: number | undefined;
466
+ readonly truncation?: "auto" | "disabled" | undefined;
467
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "default" | "flex" | "priority"> | undefined;
468
+ readonly prompt_cache_key?: string | undefined;
469
+ 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;
470
+ readonly reasoning?: {
471
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
472
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
473
+ } | undefined;
474
+ readonly text?: {
475
+ readonly verbosity?: import("../schema/options.js").OpenString<"high" | "low" | "medium"> | undefined;
476
+ } | undefined;
477
+ readonly max_output_tokens?: number | undefined;
478
+ readonly max_tool_calls?: number | undefined;
479
+ readonly parallel_tool_calls?: boolean | undefined;
480
+ readonly temperature?: number | undefined;
481
+ readonly top_p?: number | undefined;
482
+ readonly presence_penalty?: number | undefined;
483
+ readonly frequency_penalty?: number | undefined;
484
+ readonly stream: true;
485
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
486
+ readonly model: string;
487
+ readonly messages: readonly ({
488
+ readonly role: "system";
489
+ readonly content: string | readonly ({
497
490
  readonly type: "image_url";
498
491
  readonly image_url: {
499
492
  readonly url: string;
@@ -504,17 +497,17 @@ export declare const routes: (Route<{
504
497
  readonly filename: string;
505
498
  readonly file_data: string;
506
499
  };
507
- })[];
508
- } | {
509
- readonly role: "user";
510
- readonly content: string | readonly ({
500
+ } | {
511
501
  readonly type: "text";
512
502
  readonly text: string;
513
503
  readonly cache_control?: {
514
504
  readonly type: "ephemeral";
515
505
  readonly ttl?: string | undefined;
516
506
  } | undefined;
517
- } | {
507
+ })[];
508
+ } | {
509
+ readonly role: "user";
510
+ readonly content: string | readonly ({
518
511
  readonly type: "image_url";
519
512
  readonly image_url: {
520
513
  readonly url: string;
@@ -525,6 +518,13 @@ export declare const routes: (Route<{
525
518
  readonly filename: string;
526
519
  readonly file_data: string;
527
520
  };
521
+ } | {
522
+ readonly type: "text";
523
+ readonly text: string;
524
+ readonly cache_control?: {
525
+ readonly type: "ephemeral";
526
+ readonly ttl?: string | undefined;
527
+ } | undefined;
528
528
  })[];
529
529
  } | {
530
530
  readonly role: "tool";
@@ -33,6 +33,20 @@ export declare const route: import("../route/client.js").Route<{
33
33
  readonly type: "document_url";
34
34
  readonly document_url: string;
35
35
  })[];
36
+ } | {
37
+ readonly role: "tool";
38
+ readonly tool_call_id: string;
39
+ readonly name: string;
40
+ readonly content: string | readonly ({
41
+ readonly type: "text";
42
+ readonly text: string;
43
+ } | {
44
+ readonly type: "image_url";
45
+ readonly image_url: string;
46
+ } | {
47
+ readonly type: "document_url";
48
+ readonly document_url: string;
49
+ })[];
36
50
  } | {
37
51
  readonly role: "assistant";
38
52
  readonly content: string | readonly ({
@@ -56,20 +70,6 @@ export declare const route: import("../route/client.js").Route<{
56
70
  };
57
71
  }[] | undefined;
58
72
  readonly prefix?: true | undefined;
59
- } | {
60
- readonly role: "tool";
61
- readonly tool_call_id: string;
62
- readonly name: string;
63
- readonly content: string | readonly ({
64
- readonly type: "text";
65
- readonly text: string;
66
- } | {
67
- readonly type: "image_url";
68
- readonly image_url: string;
69
- } | {
70
- readonly type: "document_url";
71
- readonly document_url: string;
72
- })[];
73
73
  })[];
74
74
  readonly tools?: readonly {
75
75
  readonly type: "function";
@@ -124,6 +124,20 @@ export declare const routes: import("../route/client.js").Route<{
124
124
  readonly type: "document_url";
125
125
  readonly document_url: string;
126
126
  })[];
127
+ } | {
128
+ readonly role: "tool";
129
+ readonly tool_call_id: string;
130
+ readonly name: string;
131
+ readonly content: string | readonly ({
132
+ readonly type: "text";
133
+ readonly text: string;
134
+ } | {
135
+ readonly type: "image_url";
136
+ readonly image_url: string;
137
+ } | {
138
+ readonly type: "document_url";
139
+ readonly document_url: string;
140
+ })[];
127
141
  } | {
128
142
  readonly role: "assistant";
129
143
  readonly content: string | readonly ({
@@ -147,20 +161,6 @@ export declare const routes: import("../route/client.js").Route<{
147
161
  };
148
162
  }[] | undefined;
149
163
  readonly prefix?: true | undefined;
150
- } | {
151
- readonly role: "tool";
152
- readonly tool_call_id: string;
153
- readonly name: string;
154
- readonly content: string | readonly ({
155
- readonly type: "text";
156
- readonly text: string;
157
- } | {
158
- readonly type: "image_url";
159
- readonly image_url: string;
160
- } | {
161
- readonly type: "document_url";
162
- readonly document_url: string;
163
- })[];
164
164
  })[];
165
165
  readonly tools?: readonly {
166
166
  readonly type: "function";