@opencode/ai 2.0.32 → 2.1.0

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 (149) hide show
  1. package/dist/ai-client.d.ts +2 -2
  2. package/dist/experimental/evaluation-client.d.ts +1 -1
  3. package/dist/experimental/evaluation.d.ts +20 -20
  4. package/dist/experimental/realtime.d.ts +6 -14
  5. package/dist/experimental/realtime.js +28 -3
  6. package/dist/experimental/system-one.d.ts +1 -1
  7. package/dist/image-client.d.ts +8 -8
  8. package/dist/image.d.ts +593 -437
  9. package/dist/llm.d.ts +51 -51
  10. package/dist/media-client.d.ts +1 -1
  11. package/dist/media.d.ts +4 -4
  12. package/dist/promise.d.ts +199 -198
  13. package/dist/protocols/alibaba-chat.d.ts +81 -82
  14. package/dist/protocols/alibaba-chat.js +0 -1
  15. package/dist/protocols/alibaba-messages.d.ts +99 -99
  16. package/dist/protocols/alibaba-responses.d.ts +120 -120
  17. package/dist/protocols/anthropic-messages.d.ts +187 -187
  18. package/dist/protocols/anthropic-messages.js +3 -2
  19. package/dist/protocols/assemblyai-transcription.d.ts +1 -1
  20. package/dist/protocols/bedrock-converse.d.ts +75 -79
  21. package/dist/protocols/bfl-images.d.ts +1 -1
  22. package/dist/protocols/cartesia-speech.d.ts +17 -17
  23. package/dist/protocols/cohere-chat.d.ts +26 -23
  24. package/dist/protocols/cohere-chat.js +22 -1
  25. package/dist/protocols/deepgram-speech.d.ts +17 -17
  26. package/dist/protocols/deepgram-transcription.d.ts +1 -1
  27. package/dist/protocols/elevenlabs-speech.d.ts +17 -17
  28. package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
  29. package/dist/protocols/fal-images.d.ts +1 -1
  30. package/dist/protocols/fal-video.d.ts +1 -1
  31. package/dist/protocols/gemini.d.ts +55 -55
  32. package/dist/protocols/google-images.d.ts +1 -1
  33. package/dist/protocols/google-interactions.d.ts +64 -62
  34. package/dist/protocols/google-interactions.js +19 -1
  35. package/dist/protocols/google-speech.d.ts +17 -17
  36. package/dist/protocols/google-transcription.d.ts +47 -47
  37. package/dist/protocols/google-video.d.ts +1 -1
  38. package/dist/protocols/meta-messages.d.ts +121 -121
  39. package/dist/protocols/meta-responses.d.ts +201 -201
  40. package/dist/protocols/mistral-chat.d.ts +45 -45
  41. package/dist/protocols/open-responses-channel.d.ts +1 -1
  42. package/dist/protocols/open-responses.d.ts +584 -450
  43. package/dist/protocols/open-responses.js +27 -35
  44. package/dist/protocols/openai-chat.d.ts +248 -248
  45. package/dist/protocols/openai-chat.js +11 -42
  46. package/dist/protocols/openai-compatible-chat.d.ts +32 -32
  47. package/dist/protocols/openai-compatible-responses.d.ts +88 -88
  48. package/dist/protocols/openai-images.d.ts +17 -17
  49. package/dist/protocols/openai-responses.d.ts +567 -567
  50. package/dist/protocols/openai-responses.js +1 -1
  51. package/dist/protocols/openai-speech.d.ts +17 -17
  52. package/dist/protocols/openai-transcription.d.ts +47 -47
  53. package/dist/protocols/replicate-images.d.ts +1 -1
  54. package/dist/protocols/runway-video.d.ts +1 -1
  55. package/dist/protocols/shared.d.ts +12 -1
  56. package/dist/protocols/shared.js +17 -1
  57. package/dist/protocols/stability-images.d.ts +2 -2
  58. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  59. package/dist/protocols/utils/bedrock-media.d.ts +4 -4
  60. package/dist/protocols/utils/openai-options.d.ts +1 -1
  61. package/dist/protocols/utils/speech-stream.d.ts +1 -1
  62. package/dist/protocols/utils/tool-schema.d.ts +10 -5
  63. package/dist/protocols/utils/tool-stream.d.ts +152 -152
  64. package/dist/protocols/venice-chat.d.ts +109 -110
  65. package/dist/protocols/venice-chat.js +0 -1
  66. package/dist/protocols/xai-images.d.ts +1 -1
  67. package/dist/protocols/xai-responses.d.ts +79 -79
  68. package/dist/protocols/xai-video.d.ts +1 -1
  69. package/dist/protocols/zai-chat.d.ts +77 -78
  70. package/dist/protocols/zai-chat.js +0 -1
  71. package/dist/protocols/zai-images.d.ts +1 -1
  72. package/dist/protocols/zai-messages.d.ts +97 -97
  73. package/dist/providers/alibaba.d.ts +222 -283
  74. package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
  75. package/dist/providers/amazon-bedrock.d.ts +22 -28
  76. package/dist/providers/anthropic-compatible.d.ts +86 -90
  77. package/dist/providers/anthropic.d.ts +86 -90
  78. package/dist/providers/assemblyai.d.ts +2 -6
  79. package/dist/providers/azure.d.ts +228 -238
  80. package/dist/providers/baseten.d.ts +66 -70
  81. package/dist/providers/black-forest-labs.d.ts +2 -6
  82. package/dist/providers/cartesia.d.ts +2 -6
  83. package/dist/providers/cerebras.d.ts +66 -70
  84. package/dist/providers/cerebras.js +0 -1
  85. package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
  86. package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
  87. package/dist/providers/cohere.d.ts +122 -132
  88. package/dist/providers/cohere.js +0 -2
  89. package/dist/providers/deepgram.d.ts +2 -7
  90. package/dist/providers/deepinfra.d.ts +66 -70
  91. package/dist/providers/deepinfra.js +0 -1
  92. package/dist/providers/deepseek.d.ts +66 -70
  93. package/dist/providers/deepseek.js +1 -1
  94. package/dist/providers/digitalocean.d.ts +137 -141
  95. package/dist/providers/elevenlabs.d.ts +2 -7
  96. package/dist/providers/fal.d.ts +2 -7
  97. package/dist/providers/fireworks.d.ts +66 -70
  98. package/dist/providers/google-vertex-chat.d.ts +34 -38
  99. package/dist/providers/google-vertex-interactions.d.ts +31 -41
  100. package/dist/providers/google-vertex-messages.d.ts +81 -85
  101. package/dist/providers/google-vertex-mistral.d.ts +23 -27
  102. package/dist/providers/google-vertex-responses.d.ts +90 -94
  103. package/dist/providers/google-vertex.d.ts +26 -30
  104. package/dist/providers/google.d.ts +94 -109
  105. package/dist/providers/groq.d.ts +111 -115
  106. package/dist/providers/groq.js +0 -1
  107. package/dist/providers/meta.d.ts +309 -317
  108. package/dist/providers/meta.js +1 -1
  109. package/dist/providers/minimax.d.ts +296 -303
  110. package/dist/providers/minimax.js +1 -1
  111. package/dist/providers/mistral.d.ts +22 -26
  112. package/dist/providers/moonshot.d.ts +296 -303
  113. package/dist/providers/moonshot.js +0 -1
  114. package/dist/providers/openai-compatible-responses.d.ts +90 -94
  115. package/dist/providers/openai-compatible.d.ts +34 -38
  116. package/dist/providers/openai.d.ts +93 -108
  117. package/dist/providers/opencode.d.ts +2 -8
  118. package/dist/providers/openrouter.d.ts +137 -144
  119. package/dist/providers/replicate.d.ts +2 -6
  120. package/dist/providers/runway.d.ts +2 -6
  121. package/dist/providers/stability.d.ts +2 -7
  122. package/dist/providers/togetherai.d.ts +66 -70
  123. package/dist/providers/togetherai.js +1 -1
  124. package/dist/providers/typesafe-ai.d.ts +2 -8
  125. package/dist/providers/venice.d.ts +58 -63
  126. package/dist/providers/vercel-ai-gateway.d.ts +2 -12
  127. package/dist/providers/xai.d.ts +38 -50
  128. package/dist/providers/zai-coding-plan.d.ts +206 -213
  129. package/dist/providers/zai.d.ts +40 -46
  130. package/dist/route/client.d.ts +51 -51
  131. package/dist/route/media-protocol.d.ts +1 -1
  132. package/dist/route/transport/http.d.ts +1 -1
  133. package/dist/route/transport/websocket.d.ts +8 -8
  134. package/dist/schema/errors.d.ts +19 -19
  135. package/dist/schema/events.d.ts +3090 -3288
  136. package/dist/schema/messages.d.ts +8 -7
  137. package/dist/schema/options.d.ts +2 -1
  138. package/dist/schema/options.js +2 -1
  139. package/dist/speech-client.d.ts +8 -8
  140. package/dist/speech.d.ts +434 -398
  141. package/dist/testing.d.ts +338 -338
  142. package/dist/tool-runtime.d.ts +1 -1
  143. package/dist/transcription-client.d.ts +23 -23
  144. package/dist/transcription.d.ts +562 -646
  145. package/dist/utils/sanitize.d.ts +4 -0
  146. package/dist/utils/sanitize.js +23 -6
  147. package/dist/video-client.d.ts +8 -8
  148. package/dist/video.d.ts +416 -372
  149. package/package.json +6 -6
@@ -67,8 +67,20 @@ export declare const routes: (Route<{
67
67
  readonly file_data: string;
68
68
  };
69
69
  })[];
70
+ } | {
71
+ readonly role: "tool";
72
+ readonly tool_call_id: string;
73
+ readonly content: string | readonly {
74
+ readonly type: "text";
75
+ readonly text: string;
76
+ readonly cache_control?: {
77
+ readonly type: "ephemeral";
78
+ readonly ttl?: string | undefined;
79
+ } | undefined;
80
+ }[];
70
81
  } | {
71
82
  readonly [x: string]: unknown;
83
+ readonly role: "assistant";
72
84
  readonly content: string | readonly {
73
85
  readonly type: "text";
74
86
  readonly text: string;
@@ -77,85 +89,73 @@ export declare const routes: (Route<{
77
89
  readonly ttl?: string | undefined;
78
90
  } | undefined;
79
91
  }[] | null;
80
- readonly role: "assistant";
81
- readonly reasoning?: string | undefined;
82
- readonly reasoning_content?: string | undefined;
83
- readonly reasoning_text?: string | undefined;
84
92
  readonly tool_calls?: readonly {
93
+ readonly id: string;
94
+ readonly type: "function";
85
95
  readonly function: {
86
96
  readonly name: string;
87
97
  readonly arguments: string;
88
98
  };
89
- readonly id: string;
90
- readonly type: "function";
91
99
  readonly extra_content?: {
92
100
  readonly google: {
93
101
  readonly thought_signature: string;
94
102
  };
95
103
  } | undefined;
96
104
  }[] | undefined;
105
+ readonly reasoning_content?: string | undefined;
106
+ readonly reasoning?: string | undefined;
107
+ readonly reasoning_text?: string | undefined;
97
108
  readonly reasoning_details?: unknown;
98
- } | {
99
- readonly role: "tool";
100
- readonly tool_call_id: string;
101
- readonly content: string | readonly {
102
- readonly type: "text";
103
- readonly text: string;
104
- readonly cache_control?: {
105
- readonly type: "ephemeral";
106
- readonly ttl?: string | undefined;
107
- } | undefined;
108
- }[];
109
109
  })[];
110
- readonly stream: true;
111
- readonly max_completion_tokens?: number | undefined;
112
- readonly max_tokens?: number | undefined;
113
- readonly temperature?: number | undefined;
114
110
  readonly tools?: readonly {
111
+ readonly type: "function";
115
112
  readonly function: {
116
- readonly description: string;
117
113
  readonly name: string;
114
+ readonly description: string;
118
115
  readonly parameters: {
119
116
  readonly [x: string]: unknown;
120
117
  };
121
118
  readonly strict?: boolean | undefined;
122
119
  };
123
- readonly type: "function";
124
120
  readonly cache_control?: {
125
121
  readonly type: "ephemeral";
126
122
  readonly ttl?: string | undefined;
127
123
  } | undefined;
128
124
  }[] | undefined;
129
- readonly stop?: readonly string[] | undefined;
130
- readonly seed?: number | undefined;
131
- readonly thinking?: {
132
- readonly type: (string & {}) | "disabled" | "adaptive";
133
- } | undefined;
134
- readonly tool_choice?: "required" | "auto" | "none" | {
125
+ readonly tool_choice?: "auto" | "none" | "required" | {
135
126
  readonly type: "function";
136
127
  readonly function: {
137
128
  readonly name: string;
138
129
  };
139
130
  } | undefined;
140
- readonly top_p?: number | undefined;
141
- readonly top_k?: number | undefined;
142
- readonly frequency_penalty?: number | undefined;
143
- readonly presence_penalty?: number | undefined;
144
- readonly store?: boolean | undefined;
145
- readonly prompt_cache_key?: string | undefined;
146
- readonly parallel_tool_calls?: boolean | undefined;
147
- readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
131
+ readonly stream: true;
148
132
  readonly stream_options?: {
149
133
  readonly include_usage: boolean;
150
134
  } | undefined;
135
+ readonly store?: boolean | undefined;
136
+ readonly prompt_cache_key?: string | undefined;
137
+ readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
151
138
  readonly tool_stream?: boolean | undefined;
139
+ readonly max_completion_tokens?: number | undefined;
140
+ readonly max_tokens?: number | undefined;
141
+ readonly temperature?: number | undefined;
142
+ readonly top_p?: number | undefined;
143
+ readonly frequency_penalty?: number | undefined;
144
+ readonly presence_penalty?: number | undefined;
145
+ readonly seed?: number | undefined;
146
+ readonly stop?: readonly string[] | undefined;
152
147
  readonly enable_thinking?: boolean | undefined;
153
148
  readonly thinking_budget?: number | undefined;
154
149
  readonly preserve_thinking?: boolean | undefined;
155
150
  readonly clear_thinking?: boolean | undefined;
151
+ readonly thinking?: {
152
+ readonly type: "adaptive" | "disabled" | (string & {});
153
+ } | undefined;
154
+ readonly parallel_tool_calls?: boolean | undefined;
156
155
  readonly repetition_penalty?: number | undefined;
156
+ readonly top_k?: number | undefined;
157
157
  readonly response_format?: {
158
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
158
+ readonly type: "json_object" | "json_schema" | "text" | (string & {});
159
159
  readonly json_schema?: {
160
160
  readonly [x: string]: unknown;
161
161
  } | undefined;
@@ -163,12 +163,30 @@ export declare const routes: (Route<{
163
163
  readonly enable_search?: boolean | undefined;
164
164
  readonly search_options?: {
165
165
  readonly forced_search?: boolean | undefined;
166
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
166
+ readonly search_strategy?: "agent" | "agent_max" | "max" | "turbo" | (string & {}) | undefined;
167
167
  readonly enable_search_extension?: boolean | undefined;
168
168
  } | undefined;
169
169
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
170
- readonly max_tokens: number;
170
+ readonly context_management?: {
171
+ readonly edits: readonly {
172
+ readonly type: "compact_20260112";
173
+ readonly trigger?: {
174
+ readonly type: "input_tokens";
175
+ readonly value: number;
176
+ } | undefined;
177
+ readonly pause_after_compaction?: boolean | undefined;
178
+ readonly instructions?: string | undefined;
179
+ }[];
180
+ } | undefined;
171
181
  readonly model: string;
182
+ readonly system?: readonly {
183
+ readonly type: "text";
184
+ readonly text: string;
185
+ readonly cache_control?: {
186
+ readonly type: "ephemeral";
187
+ readonly ttl?: "1h" | "5m" | undefined;
188
+ } | undefined;
189
+ }[] | undefined;
172
190
  readonly messages: readonly ({
173
191
  readonly role: "user";
174
192
  readonly content: readonly ({
@@ -196,7 +214,7 @@ export declare const routes: (Route<{
196
214
  readonly ttl?: "1h" | "5m" | undefined;
197
215
  } | undefined;
198
216
  readonly transformations?: {
199
- readonly oversized_image?: "error" | "downsize" | undefined;
217
+ readonly oversized_image?: "downsize" | "error" | undefined;
200
218
  } | undefined;
201
219
  } | {
202
220
  readonly type: "document";
@@ -215,17 +233,18 @@ export declare const routes: (Route<{
215
233
  readonly type: "file";
216
234
  readonly file_id: string;
217
235
  };
218
- readonly title?: string | undefined;
219
- readonly context?: string | undefined;
220
236
  readonly cache_control?: {
221
237
  readonly type: "ephemeral";
222
238
  readonly ttl?: "1h" | "5m" | undefined;
223
239
  } | undefined;
240
+ readonly title?: string | undefined;
241
+ readonly context?: string | undefined;
224
242
  readonly citations?: {
225
243
  readonly enabled: boolean;
226
244
  } | undefined;
227
245
  } | {
228
246
  readonly type: "tool_result";
247
+ readonly tool_use_id: string;
229
248
  readonly content: string | readonly ({
230
249
  readonly type: "text";
231
250
  readonly text: string;
@@ -251,7 +270,7 @@ export declare const routes: (Route<{
251
270
  readonly ttl?: "1h" | "5m" | undefined;
252
271
  } | undefined;
253
272
  readonly transformations?: {
254
- readonly oversized_image?: "error" | "downsize" | undefined;
273
+ readonly oversized_image?: "downsize" | "error" | undefined;
255
274
  } | undefined;
256
275
  } | {
257
276
  readonly type: "document";
@@ -270,22 +289,21 @@ export declare const routes: (Route<{
270
289
  readonly type: "file";
271
290
  readonly file_id: string;
272
291
  };
273
- readonly title?: string | undefined;
274
- readonly context?: string | undefined;
275
292
  readonly cache_control?: {
276
293
  readonly type: "ephemeral";
277
294
  readonly ttl?: "1h" | "5m" | undefined;
278
295
  } | undefined;
296
+ readonly title?: string | undefined;
297
+ readonly context?: string | undefined;
279
298
  readonly citations?: {
280
299
  readonly enabled: boolean;
281
300
  } | undefined;
282
301
  })[];
283
- readonly tool_use_id: string;
302
+ readonly is_error?: boolean | undefined;
284
303
  readonly cache_control?: {
285
304
  readonly type: "ephemeral";
286
305
  readonly ttl?: "1h" | "5m" | undefined;
287
306
  } | undefined;
288
- readonly is_error?: boolean | undefined;
289
307
  })[];
290
308
  } | {
291
309
  readonly role: "assistant";
@@ -297,51 +315,52 @@ export declare const routes: (Route<{
297
315
  readonly ttl?: "1h" | "5m" | undefined;
298
316
  } | undefined;
299
317
  } | {
300
- readonly id: string;
301
- readonly type: "tool_use";
302
- readonly name: string;
303
- readonly input: unknown;
318
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
319
+ readonly tool_use_id: string;
320
+ readonly content: unknown;
304
321
  readonly cache_control?: {
305
322
  readonly type: "ephemeral";
306
323
  readonly ttl?: "1h" | "5m" | undefined;
307
324
  } | undefined;
308
325
  } | {
309
- readonly id: string;
310
- readonly type: "server_tool_use";
311
- readonly name: string;
312
- readonly input: unknown;
326
+ readonly type: "compaction";
327
+ readonly content: string | null;
328
+ } | {
329
+ readonly type: "thinking";
330
+ readonly thinking: string;
331
+ readonly signature: string;
313
332
  readonly cache_control?: {
314
333
  readonly type: "ephemeral";
315
334
  readonly ttl?: "1h" | "5m" | undefined;
316
335
  } | undefined;
317
336
  } | {
318
- readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
319
- readonly content: unknown;
320
- readonly tool_use_id: string;
337
+ readonly type: "redacted_thinking";
338
+ readonly data: string;
321
339
  readonly cache_control?: {
322
340
  readonly type: "ephemeral";
323
341
  readonly ttl?: "1h" | "5m" | undefined;
324
342
  } | undefined;
325
343
  } | {
326
- readonly type: "thinking";
327
- readonly thinking: string;
328
- readonly signature: string;
344
+ readonly type: "tool_use";
345
+ readonly id: string;
346
+ readonly name: string;
347
+ readonly input: unknown;
329
348
  readonly cache_control?: {
330
349
  readonly type: "ephemeral";
331
350
  readonly ttl?: "1h" | "5m" | undefined;
332
351
  } | undefined;
333
352
  } | {
334
- readonly data: string;
335
- readonly type: "redacted_thinking";
353
+ readonly type: "server_tool_use";
354
+ readonly id: string;
355
+ readonly name: string;
356
+ readonly input: unknown;
336
357
  readonly cache_control?: {
337
358
  readonly type: "ephemeral";
338
359
  readonly ttl?: "1h" | "5m" | undefined;
339
360
  } | undefined;
340
- } | {
341
- readonly type: "compaction";
342
- readonly content: string | null;
343
361
  })[];
344
362
  } | {
363
+ readonly role: "system";
345
364
  readonly content: readonly {
346
365
  readonly type: "text";
347
366
  readonly text: string;
@@ -350,19 +369,13 @@ export declare const routes: (Route<{
350
369
  readonly ttl?: "1h" | "5m" | undefined;
351
370
  } | undefined;
352
371
  }[];
353
- readonly role: "system";
354
372
  readonly output_config?: {
355
373
  readonly effort: string;
356
374
  } | undefined;
357
375
  })[];
358
- readonly stream: true;
359
- readonly metadata?: {
360
- readonly user_id?: string | null | undefined;
361
- } | undefined;
362
- readonly temperature?: number | undefined;
363
376
  readonly tools?: readonly {
364
- readonly description: string;
365
377
  readonly name: string;
378
+ readonly description: string;
366
379
  readonly input_schema: {
367
380
  readonly [x: string]: unknown;
368
381
  };
@@ -371,120 +384,63 @@ export declare const routes: (Route<{
371
384
  readonly ttl?: "1h" | "5m" | undefined;
372
385
  } | undefined;
373
386
  }[] | undefined;
374
- readonly system?: readonly {
375
- readonly type: "text";
376
- readonly text: string;
377
- readonly cache_control?: {
378
- readonly type: "ephemeral";
379
- readonly ttl?: "1h" | "5m" | undefined;
380
- } | undefined;
381
- }[] | undefined;
382
- readonly thinking?: {
383
- readonly type: string;
384
- readonly budget_tokens?: number | undefined;
385
- } | undefined;
386
- readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
387
- readonly container?: string | {
388
- readonly id?: string | null | undefined;
389
- readonly skills?: readonly {
390
- readonly [x: string]: unknown;
391
- }[] | null | undefined;
392
- } | null | undefined;
393
- readonly inference_geo?: string | null | undefined;
394
- readonly cache_control?: {
395
- readonly type: "ephemeral";
396
- readonly ttl?: "1h" | "5m" | undefined;
397
- } | undefined;
398
- readonly output_config?: {
399
- readonly format?: {
400
- readonly type: "json_schema";
401
- readonly schema: {
402
- readonly [x: string]: unknown;
403
- };
404
- } | null | undefined;
405
- readonly effort?: string | undefined;
406
- } | undefined;
407
- readonly context_management?: {
408
- readonly edits: readonly {
409
- readonly type: "compact_20260112";
410
- readonly instructions?: string | undefined;
411
- readonly trigger?: {
412
- readonly type: "input_tokens";
413
- readonly value: number;
414
- } | undefined;
415
- readonly pause_after_compaction?: boolean | undefined;
416
- }[];
417
- } | undefined;
418
387
  readonly tool_choice?: {
419
- readonly type: "auto" | "none" | "any";
388
+ readonly type: "any" | "auto" | "none";
420
389
  readonly disable_parallel_tool_use?: boolean | undefined;
421
390
  } | {
422
391
  readonly type: "tool";
423
392
  readonly name: string;
424
393
  readonly disable_parallel_tool_use?: boolean | undefined;
425
394
  } | undefined;
395
+ readonly stream: true;
396
+ readonly max_tokens: number;
397
+ readonly temperature?: number | undefined;
426
398
  readonly top_p?: number | undefined;
427
399
  readonly top_k?: number | undefined;
428
400
  readonly stop_sequences?: readonly string[] | undefined;
429
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
430
- readonly input: readonly ({
431
- readonly [x: string]: unknown;
432
- readonly id: string;
433
- readonly type: "web_search_call";
434
- readonly status?: string | undefined;
435
- readonly action?: {
436
- readonly [x: string]: unknown;
401
+ readonly output_config?: {
402
+ readonly effort?: string | undefined;
403
+ readonly format?: {
404
+ readonly type: "json_schema";
405
+ readonly schema: {
406
+ readonly [x: string]: unknown;
407
+ };
437
408
  } | null | undefined;
438
- } | {
439
- readonly [x: string]: unknown;
440
- readonly id: string;
441
- readonly type: "file_search_call";
442
- readonly status?: string | undefined;
443
- readonly queries?: readonly string[] | undefined;
444
- readonly results?: readonly {
409
+ } | undefined;
410
+ readonly cache_control?: {
411
+ readonly type: "ephemeral";
412
+ readonly ttl?: "1h" | "5m" | undefined;
413
+ } | undefined;
414
+ readonly container?: string | {
415
+ readonly id?: string | null | undefined;
416
+ readonly skills?: readonly {
445
417
  readonly [x: string]: unknown;
446
418
  }[] | null | undefined;
447
- } | {
419
+ } | null | undefined;
420
+ readonly inference_geo?: string | null | undefined;
421
+ readonly metadata?: {
422
+ readonly user_id?: string | null | undefined;
423
+ } | undefined;
424
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
425
+ readonly thinking?: {
426
+ readonly type: string;
427
+ readonly budget_tokens?: number | undefined;
428
+ } | undefined;
429
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
430
+ readonly model: string;
431
+ readonly input: readonly ({
448
432
  readonly [x: string]: unknown;
433
+ readonly type: string;
449
434
  readonly id: string;
450
- readonly type: "code_interpreter_call";
451
- readonly status?: string | undefined;
452
- readonly code?: string | null | undefined;
453
- readonly container_id?: string | null | undefined;
454
- readonly outputs?: readonly {
455
- readonly [x: string]: unknown;
456
- }[] | null | undefined;
457
435
  } | {
458
- readonly [x: string]: unknown;
459
- readonly id: string;
460
- readonly type: "mcp_call";
461
- readonly status?: string | undefined;
462
- readonly name?: string | undefined;
463
- readonly output?: string | null | undefined;
464
- readonly error?: unknown;
465
- readonly arguments?: string | undefined;
466
- readonly server_label?: string | undefined;
436
+ readonly type: "compaction";
437
+ readonly id?: string | null | undefined;
438
+ readonly encrypted_content: string;
467
439
  } | {
468
440
  readonly type: "configuration_update";
469
441
  readonly reasoning: {
470
442
  readonly effort: import("../schema/options.js").ReasoningEffort;
471
443
  };
472
- } | {
473
- readonly [x: string]: unknown;
474
- readonly type: string;
475
- readonly id: string;
476
- } | {
477
- readonly type: "reasoning";
478
- readonly summary: readonly {
479
- readonly type: "summary_text";
480
- readonly text: string;
481
- }[];
482
- readonly id?: string | undefined;
483
- readonly encrypted_content?: string | null | undefined;
484
- } | {
485
- readonly type: "compaction";
486
- readonly encrypted_content: string;
487
- readonly id?: string | null | undefined;
488
444
  } | {
489
445
  readonly type: "message";
490
446
  readonly role: "system";
@@ -495,6 +451,7 @@ export declare const routes: (Route<{
495
451
  readonly content: string;
496
452
  } | {
497
453
  readonly type: "message";
454
+ readonly role: "user";
498
455
  readonly content: readonly ({
499
456
  readonly type: "input_image";
500
457
  readonly image_url: string;
@@ -509,26 +466,33 @@ export declare const routes: (Route<{
509
466
  readonly type: "input_text";
510
467
  readonly text: string;
511
468
  })[];
512
- readonly role: "user";
513
469
  readonly id?: string | undefined;
514
470
  readonly status?: string | undefined;
515
471
  } | {
516
472
  readonly type: "message";
473
+ readonly id?: string | undefined;
474
+ readonly role: "assistant";
517
475
  readonly content: readonly {
518
476
  readonly type: "output_text";
519
477
  readonly text: string;
520
478
  }[];
521
- readonly role: "assistant";
522
- readonly id?: string | undefined;
523
- readonly status?: string | undefined;
524
479
  readonly phase?: "commentary" | "final_answer" | null | undefined;
480
+ readonly status?: string | undefined;
481
+ } | {
482
+ readonly type: "reasoning";
483
+ readonly id?: string | undefined;
484
+ readonly summary: readonly {
485
+ readonly type: "summary_text";
486
+ readonly text: string;
487
+ }[];
488
+ readonly encrypted_content?: string | null | undefined;
525
489
  } | {
526
490
  readonly type: "function_call";
527
- readonly name: string;
528
- readonly arguments: string;
529
- readonly call_id: string;
530
491
  readonly id?: string | undefined;
492
+ readonly call_id: string;
493
+ readonly name: string;
531
494
  readonly namespace?: string | undefined;
495
+ readonly arguments: string;
532
496
  } | {
533
497
  readonly type: "function_call_output";
534
498
  readonly call_id: string;
@@ -549,80 +513,116 @@ export declare const routes: (Route<{
549
513
  readonly type: "input_video";
550
514
  readonly video_url: string;
551
515
  })[];
516
+ } | {
517
+ readonly [x: string]: unknown;
518
+ readonly type: "web_search_call";
519
+ readonly id: string;
520
+ readonly status?: string | undefined;
521
+ readonly action?: {
522
+ readonly [x: string]: unknown;
523
+ } | null | undefined;
524
+ } | {
525
+ readonly [x: string]: unknown;
526
+ readonly type: "file_search_call";
527
+ readonly id: string;
528
+ readonly status?: string | undefined;
529
+ readonly queries?: readonly string[] | undefined;
530
+ readonly results?: readonly {
531
+ readonly [x: string]: unknown;
532
+ }[] | null | undefined;
533
+ } | {
534
+ readonly [x: string]: unknown;
535
+ readonly type: "code_interpreter_call";
536
+ readonly id: string;
537
+ readonly status?: string | undefined;
538
+ readonly code?: string | null | undefined;
539
+ readonly container_id?: string | null | undefined;
540
+ readonly outputs?: readonly {
541
+ readonly [x: string]: unknown;
542
+ }[] | null | undefined;
543
+ } | {
544
+ readonly [x: string]: unknown;
545
+ readonly type: "mcp_call";
546
+ readonly id: string;
547
+ readonly status?: string | undefined;
548
+ readonly server_label?: string | undefined;
549
+ readonly name?: string | undefined;
550
+ readonly arguments?: string | undefined;
551
+ readonly output?: string | null | undefined;
552
+ readonly error?: unknown;
552
553
  })[];
553
- readonly model: string;
554
- readonly stream: true;
555
- readonly metadata?: {
556
- readonly [x: string]: string;
557
- } | undefined;
558
554
  readonly instructions?: string | undefined;
559
- readonly reasoning?: {
560
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
561
- readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
562
- } | undefined;
563
- readonly temperature?: number | undefined;
564
555
  readonly tools?: readonly ({
565
- readonly [x: string]: unknown;
566
- readonly type: string;
567
- } | {
568
556
  readonly type: "function";
569
- readonly description: string;
570
557
  readonly name: string;
558
+ readonly description: string;
571
559
  readonly parameters: {
572
560
  readonly [x: string]: unknown;
573
561
  };
574
562
  readonly strict?: boolean | undefined;
563
+ } | {
564
+ readonly [x: string]: unknown;
565
+ readonly type: string;
575
566
  })[] | undefined;
576
- readonly text?: {
577
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
578
- } | undefined;
579
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
580
- readonly tool_choice?: "required" | "auto" | "none" | {
567
+ readonly tool_choice?: "auto" | "none" | "required" | {
581
568
  readonly type: "function";
582
569
  readonly name: string;
583
570
  } | {
584
571
  readonly type: "allowed_tools";
585
- readonly mode: "required" | "auto" | "none";
572
+ readonly mode: "auto" | "none" | "required";
586
573
  readonly tools: readonly {
587
574
  readonly type: "function";
588
575
  readonly name: string;
589
576
  }[];
590
577
  } | undefined;
591
- readonly top_p?: number | undefined;
592
- readonly frequency_penalty?: number | undefined;
593
- readonly presence_penalty?: number | undefined;
594
578
  readonly store?: boolean | undefined;
595
- readonly max_output_tokens?: number | undefined;
596
- readonly prompt_cache_key?: string | undefined;
597
- readonly parallel_tool_calls?: boolean | undefined;
598
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
599
- readonly truncation?: "auto" | "disabled" | undefined;
579
+ readonly metadata?: {
580
+ readonly [x: string]: string;
581
+ } | undefined;
582
+ readonly safety_identifier?: string | undefined;
600
583
  readonly stream_options?: {
601
584
  readonly include_obfuscation?: boolean | undefined;
602
585
  } | undefined;
603
- readonly safety_identifier?: string | undefined;
604
586
  readonly top_logprobs?: number | undefined;
587
+ readonly truncation?: "auto" | "disabled" | undefined;
588
+ readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
589
+ readonly prompt_cache_key?: string | undefined;
590
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
591
+ readonly reasoning?: {
592
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
593
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
594
+ } | undefined;
595
+ readonly text?: {
596
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
597
+ } | undefined;
598
+ readonly max_output_tokens?: number | undefined;
605
599
  readonly max_tool_calls?: number | undefined;
600
+ readonly parallel_tool_calls?: boolean | undefined;
601
+ readonly temperature?: number | undefined;
602
+ readonly top_p?: number | undefined;
603
+ readonly presence_penalty?: number | undefined;
604
+ readonly frequency_penalty?: number | undefined;
605
+ readonly enable_thinking?: boolean | undefined;
606
606
  readonly previous_response_id?: string | undefined;
607
607
  readonly conversation?: string | undefined;
608
- readonly enable_thinking?: boolean | undefined;
608
+ readonly stream: true;
609
609
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
610
610
  export declare const configure: (input: Config) => {
611
611
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
612
612
  model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
613
- readonly thinking?: {
614
- readonly type: (string & {}) | "disabled" | "adaptive";
615
- } | undefined;
616
- readonly thinkingBudget?: number | undefined;
617
- readonly parallelToolCalls?: boolean | undefined;
618
613
  readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
619
614
  readonly enableThinking?: boolean | undefined;
615
+ readonly thinkingBudget?: number | undefined;
620
616
  readonly preserveThinking?: boolean | undefined;
621
617
  readonly clearThinking?: boolean | undefined;
618
+ readonly thinking?: {
619
+ readonly type: "adaptive" | "disabled" | (string & {});
620
+ } | undefined;
622
621
  readonly toolStream?: boolean | undefined;
622
+ readonly parallelToolCalls?: boolean | undefined;
623
623
  readonly repetitionPenalty?: number | undefined;
624
624
  readonly responseFormat?: {
625
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
625
+ readonly type: "json_object" | "json_schema" | "text" | (string & {});
626
626
  readonly json_schema?: {
627
627
  readonly [x: string]: unknown;
628
628
  } | undefined;
@@ -630,24 +630,24 @@ export declare const configure: (input: Config) => {
630
630
  readonly enableSearch?: boolean | undefined;
631
631
  readonly searchOptions?: {
632
632
  readonly forced_search?: boolean | undefined;
633
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
633
+ readonly search_strategy?: "agent" | "agent_max" | "max" | "turbo" | (string & {}) | undefined;
634
634
  readonly enable_search_extension?: boolean | undefined;
635
635
  } | undefined;
636
636
  }, import("../route/client.js").CompactionOperations | undefined>;
637
637
  chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
638
- readonly thinking?: {
639
- readonly type: (string & {}) | "disabled" | "adaptive";
640
- } | undefined;
641
- readonly thinkingBudget?: number | undefined;
642
- readonly parallelToolCalls?: boolean | undefined;
643
638
  readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
644
639
  readonly enableThinking?: boolean | undefined;
640
+ readonly thinkingBudget?: number | undefined;
645
641
  readonly preserveThinking?: boolean | undefined;
646
642
  readonly clearThinking?: boolean | undefined;
643
+ readonly thinking?: {
644
+ readonly type: "adaptive" | "disabled" | (string & {});
645
+ } | undefined;
647
646
  readonly toolStream?: boolean | undefined;
647
+ readonly parallelToolCalls?: boolean | undefined;
648
648
  readonly repetitionPenalty?: number | undefined;
649
649
  readonly responseFormat?: {
650
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
650
+ readonly type: "json_object" | "json_schema" | "text" | (string & {});
651
651
  readonly json_schema?: {
652
652
  readonly [x: string]: unknown;
653
653
  } | undefined;
@@ -655,84 +655,23 @@ export declare const configure: (input: Config) => {
655
655
  readonly enableSearch?: boolean | undefined;
656
656
  readonly searchOptions?: {
657
657
  readonly forced_search?: boolean | undefined;
658
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
658
+ readonly search_strategy?: "agent" | "agent_max" | "max" | "turbo" | (string & {}) | undefined;
659
659
  readonly enable_search_extension?: boolean | undefined;
660
660
  } | undefined;
661
661
  }, import("../route/client.js").CompactionOperations | undefined>;
662
662
  messages: (id: string | ModelID) => import("../schema/options.js").LanguageModel<AlibabaMessages.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
663
663
  responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
664
- readonly store?: boolean | undefined;
665
664
  readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
666
- readonly conversation?: string | undefined;
667
665
  readonly enableThinking?: boolean | undefined;
666
+ readonly store?: boolean | undefined;
668
667
  readonly previousResponseId?: string | undefined;
668
+ readonly conversation?: string | undefined;
669
669
  }, import("../route/client.js").CompactionOperations | undefined>;
670
- configure: (input: Config) => /*elided*/ any;
670
+ configure: typeof configure;
671
671
  };
672
672
  export declare const provider: {
673
673
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
674
- configure: (input: Config) => {
675
- id: string & import("effect/Brand").Brand<"AI.ProviderID">;
676
- model: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
677
- readonly thinking?: {
678
- readonly type: (string & {}) | "disabled" | "adaptive";
679
- } | undefined;
680
- readonly thinkingBudget?: number | undefined;
681
- readonly parallelToolCalls?: boolean | undefined;
682
- readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
683
- readonly enableThinking?: boolean | undefined;
684
- readonly preserveThinking?: boolean | undefined;
685
- readonly clearThinking?: boolean | undefined;
686
- readonly toolStream?: boolean | undefined;
687
- readonly repetitionPenalty?: number | undefined;
688
- readonly responseFormat?: {
689
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
690
- readonly json_schema?: {
691
- readonly [x: string]: unknown;
692
- } | undefined;
693
- } | undefined;
694
- readonly enableSearch?: boolean | undefined;
695
- readonly searchOptions?: {
696
- readonly forced_search?: boolean | undefined;
697
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
698
- readonly enable_search_extension?: boolean | undefined;
699
- } | undefined;
700
- }, import("../route/client.js").CompactionOperations | undefined>;
701
- chat: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
702
- readonly thinking?: {
703
- readonly type: (string & {}) | "disabled" | "adaptive";
704
- } | undefined;
705
- readonly thinkingBudget?: number | undefined;
706
- readonly parallelToolCalls?: boolean | undefined;
707
- readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
708
- readonly enableThinking?: boolean | undefined;
709
- readonly preserveThinking?: boolean | undefined;
710
- readonly clearThinking?: boolean | undefined;
711
- readonly toolStream?: boolean | undefined;
712
- readonly repetitionPenalty?: number | undefined;
713
- readonly responseFormat?: {
714
- readonly type: (string & {}) | "text" | "json_schema" | "json_object";
715
- readonly json_schema?: {
716
- readonly [x: string]: unknown;
717
- } | undefined;
718
- } | undefined;
719
- readonly enableSearch?: boolean | undefined;
720
- readonly searchOptions?: {
721
- readonly forced_search?: boolean | undefined;
722
- readonly search_strategy?: (string & {}) | "agent" | "max" | "turbo" | "agent_max" | undefined;
723
- readonly enable_search_extension?: boolean | undefined;
724
- } | undefined;
725
- }, import("../route/client.js").CompactionOperations | undefined>;
726
- messages: (id: string | ModelID) => import("../schema/options.js").LanguageModel<AlibabaMessages.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
727
- responses: (id: string | ModelID) => import("../schema/options.js").LanguageModel<{
728
- readonly store?: boolean | undefined;
729
- readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
730
- readonly conversation?: string | undefined;
731
- readonly enableThinking?: boolean | undefined;
732
- readonly previousResponseId?: string | undefined;
733
- }, import("../route/client.js").CompactionOperations | undefined>;
734
- configure: /*elided*/ any;
735
- };
674
+ configure: typeof configure;
736
675
  };
737
676
  export declare const model: ProviderPackage.Definition<Settings, ChatOptionsInput>["model"];
738
677
  export declare const messagesModel: ProviderPackage.Definition<Settings<MessagesOptionsInput>, MessagesOptionsInput>["model"];