@opencode/ai 2.0.31 → 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 (152) 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 +47 -0
  5. package/dist/experimental/realtime.js +99 -0
  6. package/dist/experimental/system-one.d.ts +1 -1
  7. package/dist/experimental.d.ts +2 -0
  8. package/dist/experimental.js +1 -0
  9. package/dist/image-client.d.ts +8 -8
  10. package/dist/image.d.ts +593 -437
  11. package/dist/llm.d.ts +51 -51
  12. package/dist/media-client.d.ts +1 -1
  13. package/dist/media.d.ts +4 -4
  14. package/dist/promise.d.ts +199 -198
  15. package/dist/protocols/alibaba-chat.d.ts +81 -82
  16. package/dist/protocols/alibaba-chat.js +0 -1
  17. package/dist/protocols/alibaba-messages.d.ts +99 -99
  18. package/dist/protocols/alibaba-responses.d.ts +120 -120
  19. package/dist/protocols/anthropic-messages.d.ts +187 -187
  20. package/dist/protocols/anthropic-messages.js +3 -2
  21. package/dist/protocols/assemblyai-transcription.d.ts +1 -1
  22. package/dist/protocols/bedrock-converse.d.ts +75 -79
  23. package/dist/protocols/bfl-images.d.ts +1 -1
  24. package/dist/protocols/cartesia-speech.d.ts +17 -17
  25. package/dist/protocols/cohere-chat.d.ts +26 -23
  26. package/dist/protocols/cohere-chat.js +22 -1
  27. package/dist/protocols/deepgram-speech.d.ts +17 -17
  28. package/dist/protocols/deepgram-transcription.d.ts +1 -1
  29. package/dist/protocols/elevenlabs-speech.d.ts +17 -17
  30. package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
  31. package/dist/protocols/fal-images.d.ts +1 -1
  32. package/dist/protocols/fal-video.d.ts +1 -1
  33. package/dist/protocols/gemini.d.ts +55 -55
  34. package/dist/protocols/gemini.js +11 -1
  35. package/dist/protocols/google-images.d.ts +1 -1
  36. package/dist/protocols/google-interactions.d.ts +64 -62
  37. package/dist/protocols/google-interactions.js +19 -1
  38. package/dist/protocols/google-speech.d.ts +17 -17
  39. package/dist/protocols/google-transcription.d.ts +47 -47
  40. package/dist/protocols/google-video.d.ts +1 -1
  41. package/dist/protocols/meta-messages.d.ts +121 -121
  42. package/dist/protocols/meta-responses.d.ts +201 -201
  43. package/dist/protocols/mistral-chat.d.ts +45 -45
  44. package/dist/protocols/open-responses-channel.d.ts +1 -1
  45. package/dist/protocols/open-responses.d.ts +584 -450
  46. package/dist/protocols/open-responses.js +27 -35
  47. package/dist/protocols/openai-chat.d.ts +248 -248
  48. package/dist/protocols/openai-chat.js +11 -42
  49. package/dist/protocols/openai-compatible-chat.d.ts +32 -32
  50. package/dist/protocols/openai-compatible-responses.d.ts +88 -88
  51. package/dist/protocols/openai-images.d.ts +17 -17
  52. package/dist/protocols/openai-responses.d.ts +567 -567
  53. package/dist/protocols/openai-responses.js +1 -1
  54. package/dist/protocols/openai-speech.d.ts +17 -17
  55. package/dist/protocols/openai-transcription.d.ts +47 -47
  56. package/dist/protocols/replicate-images.d.ts +1 -1
  57. package/dist/protocols/runway-video.d.ts +1 -1
  58. package/dist/protocols/shared.d.ts +12 -1
  59. package/dist/protocols/shared.js +17 -1
  60. package/dist/protocols/stability-images.d.ts +2 -2
  61. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  62. package/dist/protocols/utils/bedrock-media.d.ts +4 -4
  63. package/dist/protocols/utils/openai-options.d.ts +1 -1
  64. package/dist/protocols/utils/speech-stream.d.ts +1 -1
  65. package/dist/protocols/utils/tool-schema.d.ts +10 -5
  66. package/dist/protocols/utils/tool-stream.d.ts +152 -152
  67. package/dist/protocols/venice-chat.d.ts +109 -110
  68. package/dist/protocols/venice-chat.js +0 -1
  69. package/dist/protocols/xai-images.d.ts +1 -1
  70. package/dist/protocols/xai-responses.d.ts +79 -79
  71. package/dist/protocols/xai-video.d.ts +1 -1
  72. package/dist/protocols/zai-chat.d.ts +77 -78
  73. package/dist/protocols/zai-chat.js +0 -1
  74. package/dist/protocols/zai-images.d.ts +1 -1
  75. package/dist/protocols/zai-messages.d.ts +97 -97
  76. package/dist/providers/alibaba.d.ts +222 -283
  77. package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
  78. package/dist/providers/amazon-bedrock.d.ts +22 -28
  79. package/dist/providers/anthropic-compatible.d.ts +86 -90
  80. package/dist/providers/anthropic.d.ts +86 -90
  81. package/dist/providers/assemblyai.d.ts +2 -6
  82. package/dist/providers/azure.d.ts +228 -238
  83. package/dist/providers/baseten.d.ts +66 -70
  84. package/dist/providers/black-forest-labs.d.ts +2 -6
  85. package/dist/providers/cartesia.d.ts +2 -6
  86. package/dist/providers/cerebras.d.ts +66 -70
  87. package/dist/providers/cerebras.js +0 -1
  88. package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
  89. package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
  90. package/dist/providers/cohere.d.ts +122 -132
  91. package/dist/providers/cohere.js +0 -2
  92. package/dist/providers/deepgram.d.ts +2 -7
  93. package/dist/providers/deepinfra.d.ts +66 -70
  94. package/dist/providers/deepinfra.js +0 -1
  95. package/dist/providers/deepseek.d.ts +66 -70
  96. package/dist/providers/deepseek.js +1 -1
  97. package/dist/providers/digitalocean.d.ts +137 -141
  98. package/dist/providers/elevenlabs.d.ts +2 -7
  99. package/dist/providers/fal.d.ts +2 -7
  100. package/dist/providers/fireworks.d.ts +66 -70
  101. package/dist/providers/google-vertex-chat.d.ts +34 -38
  102. package/dist/providers/google-vertex-interactions.d.ts +31 -41
  103. package/dist/providers/google-vertex-messages.d.ts +81 -85
  104. package/dist/providers/google-vertex-mistral.d.ts +23 -27
  105. package/dist/providers/google-vertex-responses.d.ts +90 -94
  106. package/dist/providers/google-vertex.d.ts +26 -30
  107. package/dist/providers/google.d.ts +94 -109
  108. package/dist/providers/groq.d.ts +111 -115
  109. package/dist/providers/groq.js +0 -1
  110. package/dist/providers/meta.d.ts +309 -317
  111. package/dist/providers/meta.js +1 -1
  112. package/dist/providers/minimax.d.ts +296 -303
  113. package/dist/providers/minimax.js +1 -1
  114. package/dist/providers/mistral.d.ts +22 -26
  115. package/dist/providers/moonshot.d.ts +296 -303
  116. package/dist/providers/moonshot.js +0 -1
  117. package/dist/providers/openai-compatible-responses.d.ts +90 -94
  118. package/dist/providers/openai-compatible.d.ts +34 -38
  119. package/dist/providers/openai.d.ts +93 -108
  120. package/dist/providers/opencode.d.ts +2 -8
  121. package/dist/providers/openrouter.d.ts +137 -144
  122. package/dist/providers/replicate.d.ts +2 -6
  123. package/dist/providers/runway.d.ts +2 -6
  124. package/dist/providers/stability.d.ts +2 -7
  125. package/dist/providers/togetherai.d.ts +66 -70
  126. package/dist/providers/togetherai.js +1 -1
  127. package/dist/providers/typesafe-ai.d.ts +2 -8
  128. package/dist/providers/venice.d.ts +58 -63
  129. package/dist/providers/vercel-ai-gateway.d.ts +2 -12
  130. package/dist/providers/xai.d.ts +38 -50
  131. package/dist/providers/zai-coding-plan.d.ts +206 -213
  132. package/dist/providers/zai.d.ts +40 -46
  133. package/dist/route/client.d.ts +51 -51
  134. package/dist/route/media-protocol.d.ts +1 -1
  135. package/dist/route/transport/http.d.ts +1 -1
  136. package/dist/route/transport/websocket.d.ts +8 -8
  137. package/dist/schema/errors.d.ts +19 -19
  138. package/dist/schema/events.d.ts +3090 -3288
  139. package/dist/schema/messages.d.ts +8 -7
  140. package/dist/schema/options.d.ts +2 -1
  141. package/dist/schema/options.js +2 -1
  142. package/dist/speech-client.d.ts +8 -8
  143. package/dist/speech.d.ts +434 -398
  144. package/dist/testing.d.ts +338 -338
  145. package/dist/tool-runtime.d.ts +1 -1
  146. package/dist/transcription-client.d.ts +23 -23
  147. package/dist/transcription.d.ts +562 -646
  148. package/dist/utils/sanitize.d.ts +4 -0
  149. package/dist/utils/sanitize.js +23 -6
  150. package/dist/video-client.d.ts +8 -8
  151. package/dist/video.d.ts +416 -372
  152. package/package.json +6 -6
@@ -32,8 +32,203 @@ export type Settings<Options = ChatOptionsInput> = ProviderPackage.Settings & Op
32
32
  readonly baseURL?: string;
33
33
  };
34
34
  export declare const routes: (Route<{
35
- readonly max_tokens: number;
36
35
  readonly model: string;
36
+ readonly input: readonly ({
37
+ readonly type: "compaction";
38
+ readonly id?: string | null | undefined;
39
+ readonly encrypted_content: string;
40
+ } | {
41
+ readonly type: "configuration_update";
42
+ readonly reasoning: {
43
+ readonly effort: import("../schema/options.js").ReasoningEffort;
44
+ };
45
+ } | {
46
+ readonly type: "message";
47
+ readonly role: "system";
48
+ readonly content: string;
49
+ } | {
50
+ readonly type: "message";
51
+ readonly role: "developer";
52
+ readonly content: string;
53
+ } | {
54
+ readonly type: "message";
55
+ readonly role: "user";
56
+ readonly content: readonly ({
57
+ readonly type: "input_image";
58
+ readonly image_url: string;
59
+ readonly detail?: string | undefined;
60
+ } | {
61
+ readonly type: "input_file";
62
+ readonly filename: string;
63
+ readonly detail?: string | undefined;
64
+ readonly file_data?: string | undefined;
65
+ readonly file_url?: string | undefined;
66
+ } | {
67
+ readonly type: "input_text";
68
+ readonly text: string;
69
+ })[];
70
+ readonly id?: string | undefined;
71
+ readonly status?: string | undefined;
72
+ } | {
73
+ readonly type: "message";
74
+ readonly id?: string | undefined;
75
+ readonly role: "assistant";
76
+ readonly content: readonly {
77
+ readonly type: "output_text";
78
+ readonly text: string;
79
+ }[];
80
+ readonly phase?: "commentary" | "final_answer" | null | undefined;
81
+ readonly status?: string | undefined;
82
+ } | {
83
+ readonly type: "reasoning";
84
+ readonly id?: string | undefined;
85
+ readonly summary: readonly {
86
+ readonly type: "summary_text";
87
+ readonly text: string;
88
+ }[];
89
+ readonly encrypted_content?: string | null | undefined;
90
+ } | {
91
+ readonly type: "function_call";
92
+ readonly id?: string | undefined;
93
+ readonly call_id: string;
94
+ readonly name: string;
95
+ readonly namespace?: string | undefined;
96
+ readonly arguments: string;
97
+ } | {
98
+ readonly type: "function_call_output";
99
+ readonly call_id: string;
100
+ readonly output: string | readonly ({
101
+ readonly type: "input_image";
102
+ readonly image_url: string;
103
+ readonly detail?: string | undefined;
104
+ } | {
105
+ readonly type: "input_file";
106
+ readonly filename: string;
107
+ readonly detail?: string | undefined;
108
+ readonly file_data?: string | undefined;
109
+ readonly file_url?: string | undefined;
110
+ } | {
111
+ readonly type: "input_text";
112
+ readonly text: string;
113
+ } | {
114
+ readonly type: "input_video";
115
+ readonly video_url: string;
116
+ })[];
117
+ } | {
118
+ readonly [x: string]: unknown;
119
+ readonly type: "web_search_call";
120
+ readonly id: string;
121
+ readonly status?: string | undefined;
122
+ readonly action?: {
123
+ readonly [x: string]: unknown;
124
+ } | null | undefined;
125
+ } | {
126
+ readonly [x: string]: unknown;
127
+ readonly type: "file_search_call";
128
+ readonly id: string;
129
+ readonly status?: string | undefined;
130
+ readonly queries?: readonly string[] | undefined;
131
+ readonly results?: readonly {
132
+ readonly [x: string]: unknown;
133
+ }[] | null | undefined;
134
+ } | {
135
+ readonly [x: string]: unknown;
136
+ readonly type: "code_interpreter_call";
137
+ readonly id: string;
138
+ readonly status?: string | undefined;
139
+ readonly code?: string | null | undefined;
140
+ readonly container_id?: string | null | undefined;
141
+ readonly outputs?: readonly {
142
+ readonly [x: string]: unknown;
143
+ }[] | null | undefined;
144
+ } | {
145
+ readonly [x: string]: unknown;
146
+ readonly type: "mcp_call";
147
+ readonly id: string;
148
+ readonly status?: string | undefined;
149
+ readonly server_label?: string | undefined;
150
+ readonly name?: string | undefined;
151
+ readonly arguments?: string | undefined;
152
+ readonly output?: string | null | undefined;
153
+ readonly error?: unknown;
154
+ } | {
155
+ readonly [x: string]: unknown;
156
+ readonly type: string;
157
+ readonly id: string;
158
+ })[];
159
+ readonly instructions?: string | undefined;
160
+ readonly tools?: readonly ({
161
+ readonly type: "function";
162
+ readonly name: string;
163
+ readonly description: string;
164
+ readonly parameters: {
165
+ readonly [x: string]: unknown;
166
+ };
167
+ readonly strict?: boolean | undefined;
168
+ } | {
169
+ readonly [x: string]: unknown;
170
+ readonly type: string;
171
+ })[] | undefined;
172
+ readonly tool_choice?: "auto" | "none" | "required" | {
173
+ readonly type: "function";
174
+ readonly name: string;
175
+ } | {
176
+ readonly type: "allowed_tools";
177
+ readonly mode: "auto" | "none" | "required";
178
+ readonly tools: readonly {
179
+ readonly type: "function";
180
+ readonly name: string;
181
+ }[];
182
+ } | undefined;
183
+ readonly store?: boolean | undefined;
184
+ readonly metadata?: {
185
+ readonly [x: string]: string;
186
+ } | undefined;
187
+ readonly safety_identifier?: string | undefined;
188
+ readonly stream_options?: {
189
+ readonly include_obfuscation?: boolean | undefined;
190
+ } | undefined;
191
+ readonly top_logprobs?: number | undefined;
192
+ readonly truncation?: "auto" | "disabled" | undefined;
193
+ readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
194
+ readonly prompt_cache_key?: string | undefined;
195
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
196
+ readonly reasoning?: {
197
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
198
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
199
+ } | undefined;
200
+ readonly text?: {
201
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
202
+ } | undefined;
203
+ readonly max_output_tokens?: number | undefined;
204
+ readonly max_tool_calls?: number | undefined;
205
+ readonly parallel_tool_calls?: boolean | undefined;
206
+ readonly temperature?: number | undefined;
207
+ readonly top_p?: number | undefined;
208
+ readonly presence_penalty?: number | undefined;
209
+ readonly frequency_penalty?: number | undefined;
210
+ readonly stream: true;
211
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
212
+ readonly context_management?: {
213
+ readonly edits: readonly {
214
+ readonly type: "compact_20260112";
215
+ readonly trigger?: {
216
+ readonly type: "input_tokens";
217
+ readonly value: number;
218
+ } | undefined;
219
+ readonly pause_after_compaction?: boolean | undefined;
220
+ readonly instructions?: string | undefined;
221
+ }[];
222
+ } | undefined;
223
+ readonly model: string;
224
+ readonly system?: readonly {
225
+ readonly type: "text";
226
+ readonly text: string;
227
+ readonly cache_control?: {
228
+ readonly type: "ephemeral";
229
+ readonly ttl?: "1h" | "5m" | undefined;
230
+ } | undefined;
231
+ }[] | undefined;
37
232
  readonly messages: readonly ({
38
233
  readonly role: "user";
39
234
  readonly content: readonly ({
@@ -61,7 +256,7 @@ export declare const routes: (Route<{
61
256
  readonly ttl?: "1h" | "5m" | undefined;
62
257
  } | undefined;
63
258
  readonly transformations?: {
64
- readonly oversized_image?: "error" | "downsize" | undefined;
259
+ readonly oversized_image?: "downsize" | "error" | undefined;
65
260
  } | undefined;
66
261
  } | {
67
262
  readonly type: "document";
@@ -80,17 +275,18 @@ export declare const routes: (Route<{
80
275
  readonly type: "file";
81
276
  readonly file_id: string;
82
277
  };
83
- readonly title?: string | undefined;
84
- readonly context?: string | undefined;
85
278
  readonly cache_control?: {
86
279
  readonly type: "ephemeral";
87
280
  readonly ttl?: "1h" | "5m" | undefined;
88
281
  } | undefined;
282
+ readonly title?: string | undefined;
283
+ readonly context?: string | undefined;
89
284
  readonly citations?: {
90
285
  readonly enabled: boolean;
91
286
  } | undefined;
92
287
  } | {
93
288
  readonly type: "tool_result";
289
+ readonly tool_use_id: string;
94
290
  readonly content: string | readonly ({
95
291
  readonly type: "text";
96
292
  readonly text: string;
@@ -116,7 +312,7 @@ export declare const routes: (Route<{
116
312
  readonly ttl?: "1h" | "5m" | undefined;
117
313
  } | undefined;
118
314
  readonly transformations?: {
119
- readonly oversized_image?: "error" | "downsize" | undefined;
315
+ readonly oversized_image?: "downsize" | "error" | undefined;
120
316
  } | undefined;
121
317
  } | {
122
318
  readonly type: "document";
@@ -135,22 +331,21 @@ export declare const routes: (Route<{
135
331
  readonly type: "file";
136
332
  readonly file_id: string;
137
333
  };
138
- readonly title?: string | undefined;
139
- readonly context?: string | undefined;
140
334
  readonly cache_control?: {
141
335
  readonly type: "ephemeral";
142
336
  readonly ttl?: "1h" | "5m" | undefined;
143
337
  } | undefined;
338
+ readonly title?: string | undefined;
339
+ readonly context?: string | undefined;
144
340
  readonly citations?: {
145
341
  readonly enabled: boolean;
146
342
  } | undefined;
147
343
  })[];
148
- readonly tool_use_id: string;
344
+ readonly is_error?: boolean | undefined;
149
345
  readonly cache_control?: {
150
346
  readonly type: "ephemeral";
151
347
  readonly ttl?: "1h" | "5m" | undefined;
152
348
  } | undefined;
153
- readonly is_error?: boolean | undefined;
154
349
  })[];
155
350
  } | {
156
351
  readonly role: "assistant";
@@ -162,51 +357,52 @@ export declare const routes: (Route<{
162
357
  readonly ttl?: "1h" | "5m" | undefined;
163
358
  } | undefined;
164
359
  } | {
165
- readonly id: string;
166
- readonly type: "tool_use";
167
- readonly name: string;
168
- readonly input: unknown;
360
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
361
+ readonly tool_use_id: string;
362
+ readonly content: unknown;
169
363
  readonly cache_control?: {
170
364
  readonly type: "ephemeral";
171
365
  readonly ttl?: "1h" | "5m" | undefined;
172
366
  } | undefined;
173
367
  } | {
174
- readonly id: string;
175
- readonly type: "server_tool_use";
176
- readonly name: string;
177
- readonly input: unknown;
368
+ readonly type: "compaction";
369
+ readonly content: string | null;
370
+ } | {
371
+ readonly type: "thinking";
372
+ readonly thinking: string;
373
+ readonly signature: string;
178
374
  readonly cache_control?: {
179
375
  readonly type: "ephemeral";
180
376
  readonly ttl?: "1h" | "5m" | undefined;
181
377
  } | undefined;
182
378
  } | {
183
- readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
184
- readonly content: unknown;
185
- readonly tool_use_id: string;
379
+ readonly type: "redacted_thinking";
380
+ readonly data: string;
186
381
  readonly cache_control?: {
187
382
  readonly type: "ephemeral";
188
383
  readonly ttl?: "1h" | "5m" | undefined;
189
384
  } | undefined;
190
385
  } | {
191
- readonly type: "thinking";
192
- readonly thinking: string;
193
- readonly signature: string;
386
+ readonly type: "tool_use";
387
+ readonly id: string;
388
+ readonly name: string;
389
+ readonly input: unknown;
194
390
  readonly cache_control?: {
195
391
  readonly type: "ephemeral";
196
392
  readonly ttl?: "1h" | "5m" | undefined;
197
393
  } | undefined;
198
394
  } | {
199
- readonly data: string;
200
- readonly type: "redacted_thinking";
395
+ readonly type: "server_tool_use";
396
+ readonly id: string;
397
+ readonly name: string;
398
+ readonly input: unknown;
201
399
  readonly cache_control?: {
202
400
  readonly type: "ephemeral";
203
401
  readonly ttl?: "1h" | "5m" | undefined;
204
402
  } | undefined;
205
- } | {
206
- readonly type: "compaction";
207
- readonly content: string | null;
208
403
  })[];
209
404
  } | {
405
+ readonly role: "system";
210
406
  readonly content: readonly {
211
407
  readonly type: "text";
212
408
  readonly text: string;
@@ -215,19 +411,13 @@ export declare const routes: (Route<{
215
411
  readonly ttl?: "1h" | "5m" | undefined;
216
412
  } | undefined;
217
413
  }[];
218
- readonly role: "system";
219
414
  readonly output_config?: {
220
415
  readonly effort: string;
221
416
  } | undefined;
222
417
  })[];
223
- readonly stream: true;
224
- readonly metadata?: {
225
- readonly user_id?: string | null | undefined;
226
- } | undefined;
227
- readonly temperature?: number | undefined;
228
418
  readonly tools?: readonly {
229
- readonly description: string;
230
419
  readonly name: string;
420
+ readonly description: string;
231
421
  readonly input_schema: {
232
422
  readonly [x: string]: unknown;
233
423
  };
@@ -236,250 +426,60 @@ export declare const routes: (Route<{
236
426
  readonly ttl?: "1h" | "5m" | undefined;
237
427
  } | undefined;
238
428
  }[] | undefined;
239
- readonly system?: readonly {
240
- readonly type: "text";
241
- readonly text: string;
242
- readonly cache_control?: {
243
- readonly type: "ephemeral";
244
- readonly ttl?: "1h" | "5m" | undefined;
245
- } | undefined;
246
- }[] | undefined;
429
+ readonly tool_choice?: {
430
+ readonly type: "any" | "auto" | "none";
431
+ readonly disable_parallel_tool_use?: boolean | undefined;
432
+ } | {
433
+ readonly type: "tool";
434
+ readonly name: string;
435
+ readonly disable_parallel_tool_use?: boolean | undefined;
436
+ } | undefined;
437
+ readonly stream: true;
438
+ readonly max_tokens: number;
439
+ readonly temperature?: number | undefined;
440
+ readonly top_p?: number | undefined;
441
+ readonly top_k?: number | undefined;
442
+ readonly stop_sequences?: readonly string[] | undefined;
247
443
  readonly thinking?: {
248
- readonly type: "enabled";
249
- readonly budget_tokens: number;
250
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
444
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
251
445
  readonly block_binding?: {
252
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
446
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
253
447
  } | undefined;
448
+ readonly type: "enabled";
449
+ readonly budget_tokens: number;
254
450
  } | {
255
- readonly type: "adaptive";
256
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
451
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
257
452
  readonly block_binding?: {
258
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
453
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
259
454
  } | undefined;
455
+ readonly type: "adaptive";
260
456
  } | {
261
- readonly type: "disabled" | "between_tools";
262
- } | undefined;
263
- readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
264
- readonly container?: string | {
265
- readonly id?: string | null | undefined;
266
- readonly skills?: readonly {
267
- readonly [x: string]: unknown;
268
- }[] | null | undefined;
269
- } | null | undefined;
270
- readonly inference_geo?: string | null | undefined;
271
- readonly cache_control?: {
272
- readonly type: "ephemeral";
273
- readonly ttl?: "1h" | "5m" | undefined;
457
+ readonly type: "between_tools" | "disabled";
274
458
  } | undefined;
275
459
  readonly output_config?: {
460
+ readonly effort?: string | undefined;
276
461
  readonly format?: {
277
462
  readonly type: "json_schema";
278
463
  readonly schema: {
279
464
  readonly [x: string]: unknown;
280
465
  };
281
466
  } | null | undefined;
282
- readonly effort?: string | undefined;
283
- } | undefined;
284
- readonly context_management?: {
285
- readonly edits: readonly {
286
- readonly type: "compact_20260112";
287
- readonly instructions?: string | undefined;
288
- readonly trigger?: {
289
- readonly type: "input_tokens";
290
- readonly value: number;
291
- } | undefined;
292
- readonly pause_after_compaction?: boolean | undefined;
293
- }[];
294
467
  } | undefined;
295
- readonly tool_choice?: {
296
- readonly type: "auto" | "none" | "any";
297
- readonly disable_parallel_tool_use?: boolean | undefined;
298
- } | {
299
- readonly type: "tool";
300
- readonly name: string;
301
- readonly disable_parallel_tool_use?: boolean | undefined;
468
+ readonly cache_control?: {
469
+ readonly type: "ephemeral";
470
+ readonly ttl?: "1h" | "5m" | undefined;
302
471
  } | undefined;
303
- readonly top_p?: number | undefined;
304
- readonly top_k?: number | undefined;
305
- readonly stop_sequences?: readonly string[] | undefined;
306
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
307
- readonly input: readonly ({
308
- readonly [x: string]: unknown;
309
- readonly id: string;
310
- readonly type: "web_search_call";
311
- readonly status?: string | undefined;
312
- readonly action?: {
313
- readonly [x: string]: unknown;
314
- } | null | undefined;
315
- } | {
316
- readonly [x: string]: unknown;
317
- readonly id: string;
318
- readonly type: "file_search_call";
319
- readonly status?: string | undefined;
320
- readonly queries?: readonly string[] | undefined;
321
- readonly results?: readonly {
322
- readonly [x: string]: unknown;
323
- }[] | null | undefined;
324
- } | {
325
- readonly [x: string]: unknown;
326
- readonly id: string;
327
- readonly type: "code_interpreter_call";
328
- readonly status?: string | undefined;
329
- readonly code?: string | null | undefined;
330
- readonly container_id?: string | null | undefined;
331
- readonly outputs?: readonly {
472
+ readonly container?: string | {
473
+ readonly id?: string | null | undefined;
474
+ readonly skills?: readonly {
332
475
  readonly [x: string]: unknown;
333
476
  }[] | null | undefined;
334
- } | {
335
- readonly [x: string]: unknown;
336
- readonly id: string;
337
- readonly type: "mcp_call";
338
- readonly status?: string | undefined;
339
- readonly name?: string | undefined;
340
- readonly output?: string | null | undefined;
341
- readonly error?: unknown;
342
- readonly arguments?: string | undefined;
343
- readonly server_label?: string | undefined;
344
- } | {
345
- readonly type: "configuration_update";
346
- readonly reasoning: {
347
- readonly effort: import("../schema/options.js").ReasoningEffort;
348
- };
349
- } | {
350
- readonly [x: string]: unknown;
351
- readonly type: string;
352
- readonly id: string;
353
- } | {
354
- readonly type: "reasoning";
355
- readonly summary: readonly {
356
- readonly type: "summary_text";
357
- readonly text: string;
358
- }[];
359
- readonly id?: string | undefined;
360
- readonly encrypted_content?: string | null | undefined;
361
- } | {
362
- readonly type: "compaction";
363
- readonly encrypted_content: string;
364
- readonly id?: string | null | undefined;
365
- } | {
366
- readonly type: "message";
367
- readonly role: "system";
368
- readonly content: string;
369
- } | {
370
- readonly type: "message";
371
- readonly role: "developer";
372
- readonly content: string;
373
- } | {
374
- readonly type: "message";
375
- readonly content: readonly ({
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
- readonly type: "input_text";
387
- readonly text: string;
388
- })[];
389
- readonly role: "user";
390
- readonly id?: string | undefined;
391
- readonly status?: string | undefined;
392
- } | {
393
- readonly type: "message";
394
- readonly content: readonly {
395
- readonly type: "output_text";
396
- readonly text: string;
397
- }[];
398
- readonly role: "assistant";
399
- readonly id?: string | undefined;
400
- readonly status?: string | undefined;
401
- readonly phase?: "commentary" | "final_answer" | null | undefined;
402
- } | {
403
- readonly type: "function_call";
404
- readonly name: string;
405
- readonly arguments: string;
406
- readonly call_id: string;
407
- readonly id?: string | undefined;
408
- readonly namespace?: string | undefined;
409
- } | {
410
- readonly type: "function_call_output";
411
- readonly call_id: string;
412
- readonly output: string | readonly ({
413
- readonly type: "input_image";
414
- readonly image_url: string;
415
- readonly detail?: string | undefined;
416
- } | {
417
- readonly type: "input_file";
418
- readonly filename: string;
419
- readonly detail?: string | undefined;
420
- readonly file_data?: string | undefined;
421
- readonly file_url?: string | undefined;
422
- } | {
423
- readonly type: "input_text";
424
- readonly text: string;
425
- } | {
426
- readonly type: "input_video";
427
- readonly video_url: string;
428
- })[];
429
- })[];
430
- readonly model: string;
431
- readonly stream: true;
477
+ } | null | undefined;
478
+ readonly inference_geo?: string | null | undefined;
432
479
  readonly metadata?: {
433
- readonly [x: string]: string;
434
- } | undefined;
435
- readonly instructions?: string | undefined;
436
- readonly reasoning?: {
437
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
438
- readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
439
- } | undefined;
440
- readonly temperature?: number | undefined;
441
- readonly tools?: readonly ({
442
- readonly [x: string]: unknown;
443
- readonly type: string;
444
- } | {
445
- readonly type: "function";
446
- readonly description: string;
447
- readonly name: string;
448
- readonly parameters: {
449
- readonly [x: string]: unknown;
450
- };
451
- readonly strict?: boolean | undefined;
452
- })[] | undefined;
453
- readonly text?: {
454
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
455
- } | undefined;
456
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
457
- readonly tool_choice?: "required" | "auto" | "none" | {
458
- readonly type: "function";
459
- readonly name: string;
460
- } | {
461
- readonly type: "allowed_tools";
462
- readonly mode: "required" | "auto" | "none";
463
- readonly tools: readonly {
464
- readonly type: "function";
465
- readonly name: string;
466
- }[];
467
- } | undefined;
468
- readonly top_p?: number | undefined;
469
- readonly frequency_penalty?: number | undefined;
470
- readonly presence_penalty?: number | undefined;
471
- readonly store?: boolean | undefined;
472
- readonly max_output_tokens?: number | undefined;
473
- readonly prompt_cache_key?: string | undefined;
474
- readonly parallel_tool_calls?: boolean | undefined;
475
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
476
- readonly truncation?: "auto" | "disabled" | undefined;
477
- readonly stream_options?: {
478
- readonly include_obfuscation?: boolean | undefined;
480
+ readonly user_id?: string | null | undefined;
479
481
  } | undefined;
480
- readonly safety_identifier?: string | undefined;
481
- readonly top_logprobs?: number | undefined;
482
- readonly max_tool_calls?: number | undefined;
482
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
483
483
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
484
484
  readonly model: string;
485
485
  readonly messages: readonly ({
@@ -524,8 +524,20 @@ export declare const routes: (Route<{
524
524
  readonly file_data: string;
525
525
  };
526
526
  })[];
527
+ } | {
528
+ readonly role: "tool";
529
+ readonly tool_call_id: string;
530
+ readonly content: string | readonly {
531
+ readonly type: "text";
532
+ readonly text: string;
533
+ readonly cache_control?: {
534
+ readonly type: "ephemeral";
535
+ readonly ttl?: string | undefined;
536
+ } | undefined;
537
+ }[];
527
538
  } | {
528
539
  readonly [x: string]: unknown;
540
+ readonly role: "assistant";
529
541
  readonly content: string | readonly {
530
542
  readonly type: "text";
531
543
  readonly text: string;
@@ -534,77 +546,65 @@ export declare const routes: (Route<{
534
546
  readonly ttl?: string | undefined;
535
547
  } | undefined;
536
548
  }[] | null;
537
- readonly role: "assistant";
538
- readonly reasoning?: string | undefined;
539
- readonly reasoning_content?: string | undefined;
540
- readonly reasoning_text?: string | undefined;
541
549
  readonly tool_calls?: readonly {
550
+ readonly id: string;
551
+ readonly type: "function";
542
552
  readonly function: {
543
553
  readonly name: string;
544
554
  readonly arguments: string;
545
555
  };
546
- readonly id: string;
547
- readonly type: "function";
548
556
  readonly extra_content?: {
549
557
  readonly google: {
550
558
  readonly thought_signature: string;
551
559
  };
552
560
  } | undefined;
553
561
  }[] | undefined;
562
+ readonly reasoning_content?: string | undefined;
563
+ readonly reasoning?: string | undefined;
564
+ readonly reasoning_text?: string | undefined;
554
565
  readonly reasoning_details?: unknown;
555
- } | {
556
- readonly role: "tool";
557
- readonly tool_call_id: string;
558
- readonly content: string | readonly {
559
- readonly type: "text";
560
- readonly text: string;
561
- readonly cache_control?: {
562
- readonly type: "ephemeral";
563
- readonly ttl?: string | undefined;
564
- } | undefined;
565
- }[];
566
566
  })[];
567
- readonly stream: true;
568
- readonly max_completion_tokens?: number | undefined;
569
- readonly max_tokens?: number | undefined;
570
- readonly temperature?: number | undefined;
571
567
  readonly tools?: readonly {
568
+ readonly type: "function";
572
569
  readonly function: {
573
- readonly description: string;
574
570
  readonly name: string;
571
+ readonly description: string;
575
572
  readonly parameters: {
576
573
  readonly [x: string]: unknown;
577
574
  };
578
575
  readonly strict?: boolean | undefined;
579
576
  };
580
- readonly type: "function";
581
577
  readonly cache_control?: {
582
578
  readonly type: "ephemeral";
583
579
  readonly ttl?: string | undefined;
584
580
  } | undefined;
585
581
  }[] | undefined;
586
- readonly stop?: readonly string[] | undefined;
587
- readonly seed?: number | undefined;
588
- readonly thinking?: {
589
- readonly type: string;
590
- readonly keep?: string | null | undefined;
591
- } | undefined;
592
- readonly tool_choice?: "required" | "auto" | "none" | {
582
+ readonly tool_choice?: "auto" | "none" | "required" | {
593
583
  readonly type: "function";
594
584
  readonly function: {
595
585
  readonly name: string;
596
586
  };
597
587
  } | undefined;
598
- readonly top_p?: number | undefined;
599
- readonly frequency_penalty?: number | undefined;
600
- readonly presence_penalty?: number | undefined;
601
- readonly store?: boolean | undefined;
602
- readonly prompt_cache_key?: string | undefined;
603
- readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
588
+ readonly stream: true;
604
589
  readonly stream_options?: {
605
590
  readonly include_usage: boolean;
606
591
  } | undefined;
592
+ readonly store?: boolean | undefined;
593
+ readonly prompt_cache_key?: string | undefined;
594
+ readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
607
595
  readonly tool_stream?: boolean | undefined;
596
+ readonly max_completion_tokens?: number | undefined;
597
+ readonly max_tokens?: number | undefined;
598
+ readonly temperature?: number | undefined;
599
+ readonly top_p?: number | undefined;
600
+ readonly frequency_penalty?: number | undefined;
601
+ readonly presence_penalty?: number | undefined;
602
+ readonly seed?: number | undefined;
603
+ readonly stop?: readonly string[] | undefined;
604
+ readonly thinking?: {
605
+ readonly type: string;
606
+ readonly keep?: string | null | undefined;
607
+ } | undefined;
608
608
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
609
609
  export declare const configure: (input?: Config) => {
610
610
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
@@ -612,7 +612,7 @@ export declare const configure: (input?: Config) => {
612
612
  chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
613
613
  messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MessagesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
614
614
  responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
615
- configure: (input?: Config) => /*elided*/ any;
615
+ configure: typeof configure;
616
616
  };
617
617
  export declare const provider: {
618
618
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
@@ -620,14 +620,7 @@ export declare const provider: {
620
620
  chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
621
621
  messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MessagesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
622
622
  responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
623
- configure: (input?: Config) => {
624
- id: string & import("effect/Brand").Brand<"AI.ProviderID">;
625
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
626
- chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
627
- messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MessagesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
628
- responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
629
- configure: /*elided*/ any;
630
- };
623
+ configure: typeof configure;
631
624
  };
632
625
  export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
633
626
  export declare const messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MessagesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;