@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
@@ -28,18 +28,19 @@ export type Settings = ProviderPackage.Settings & OpenAIProviderOptionsInput & G
28
28
  };
29
29
  export declare const baseURL: (input: GatewayURL) => string;
30
30
  export declare const responsesRoute: import("../route/client.js").Route<{
31
+ readonly model: string;
31
32
  readonly input: readonly ({
32
33
  readonly [x: string]: unknown;
33
- readonly id: string;
34
34
  readonly type: "web_search_call";
35
+ readonly id: string;
35
36
  readonly status?: string | undefined;
36
37
  readonly action?: {
37
38
  readonly [x: string]: unknown;
38
39
  } | null | undefined;
39
40
  } | {
40
41
  readonly [x: string]: unknown;
41
- readonly id: string;
42
42
  readonly type: "file_search_call";
43
+ readonly id: string;
43
44
  readonly status?: string | undefined;
44
45
  readonly queries?: readonly string[] | undefined;
45
46
  readonly results?: readonly {
@@ -47,8 +48,8 @@ export declare const responsesRoute: import("../route/client.js").Route<{
47
48
  }[] | null | undefined;
48
49
  } | {
49
50
  readonly [x: string]: unknown;
50
- readonly id: string;
51
51
  readonly type: "code_interpreter_call";
52
+ readonly id: string;
52
53
  readonly status?: string | undefined;
53
54
  readonly code?: string | null | undefined;
54
55
  readonly container_id?: string | null | undefined;
@@ -57,14 +58,14 @@ export declare const responsesRoute: import("../route/client.js").Route<{
57
58
  }[] | null | undefined;
58
59
  } | {
59
60
  readonly [x: string]: unknown;
60
- readonly id: string;
61
61
  readonly type: "mcp_call";
62
+ readonly id: string;
62
63
  readonly status?: string | undefined;
64
+ readonly server_label?: string | undefined;
63
65
  readonly name?: string | undefined;
66
+ readonly arguments?: string | undefined;
64
67
  readonly output?: string | null | undefined;
65
68
  readonly error?: unknown;
66
- readonly arguments?: string | undefined;
67
- readonly server_label?: string | undefined;
68
69
  } | {
69
70
  readonly type: "configuration_update";
70
71
  readonly reasoning: {
@@ -74,18 +75,10 @@ export declare const responsesRoute: import("../route/client.js").Route<{
74
75
  readonly [x: string]: unknown;
75
76
  readonly type: string;
76
77
  readonly id: string;
77
- } | {
78
- readonly type: "reasoning";
79
- readonly summary: readonly {
80
- readonly type: "summary_text";
81
- readonly text: string;
82
- }[];
83
- readonly id?: string | undefined;
84
- readonly encrypted_content?: string | null | undefined;
85
78
  } | {
86
79
  readonly type: "compaction";
87
- readonly encrypted_content: string;
88
80
  readonly id?: string | null | undefined;
81
+ readonly encrypted_content: string;
89
82
  } | {
90
83
  readonly type: "message";
91
84
  readonly role: "system";
@@ -96,6 +89,7 @@ export declare const responsesRoute: import("../route/client.js").Route<{
96
89
  readonly content: string;
97
90
  } | {
98
91
  readonly type: "message";
92
+ readonly role: "user";
99
93
  readonly content: readonly ({
100
94
  readonly type: "input_image";
101
95
  readonly image_url: string;
@@ -110,26 +104,33 @@ export declare const responsesRoute: import("../route/client.js").Route<{
110
104
  readonly type: "input_text";
111
105
  readonly text: string;
112
106
  })[];
113
- readonly role: "user";
114
107
  readonly id?: string | undefined;
115
108
  readonly status?: string | undefined;
116
109
  } | {
117
110
  readonly type: "message";
111
+ readonly id?: string | undefined;
112
+ readonly role: "assistant";
118
113
  readonly content: readonly {
119
114
  readonly type: "output_text";
120
115
  readonly text: string;
121
116
  }[];
122
- readonly role: "assistant";
123
- readonly id?: string | undefined;
124
- readonly status?: string | undefined;
125
117
  readonly phase?: "commentary" | "final_answer" | null | undefined;
118
+ readonly status?: string | undefined;
119
+ } | {
120
+ readonly type: "reasoning";
121
+ readonly id?: string | undefined;
122
+ readonly summary: readonly {
123
+ readonly type: "summary_text";
124
+ readonly text: string;
125
+ }[];
126
+ readonly encrypted_content?: string | null | undefined;
126
127
  } | {
127
128
  readonly type: "function_call";
128
- readonly name: string;
129
- readonly arguments: string;
130
- readonly call_id: string;
131
129
  readonly id?: string | undefined;
130
+ readonly call_id: string;
131
+ readonly name: string;
132
132
  readonly namespace?: string | undefined;
133
+ readonly arguments: string;
133
134
  } | {
134
135
  readonly type: "function_call_output";
135
136
  readonly call_id: string;
@@ -151,63 +152,72 @@ export declare const responsesRoute: import("../route/client.js").Route<{
151
152
  readonly video_url: string;
152
153
  })[];
153
154
  })[];
154
- readonly model: string;
155
- readonly stream: true;
155
+ readonly instructions?: string | undefined;
156
+ readonly store?: boolean | undefined;
156
157
  readonly metadata?: {
157
158
  readonly [x: string]: string;
158
159
  } | undefined;
159
- readonly instructions?: string | undefined;
160
+ readonly safety_identifier?: string | undefined;
161
+ readonly stream_options?: {
162
+ readonly include_obfuscation?: boolean | undefined;
163
+ } | undefined;
164
+ readonly top_logprobs?: number | undefined;
165
+ readonly truncation?: "auto" | "disabled" | undefined;
166
+ readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
167
+ readonly prompt_cache_key?: string | undefined;
168
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
160
169
  readonly reasoning?: {
161
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
162
170
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
171
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
172
+ } | undefined;
173
+ readonly text?: {
174
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
163
175
  } | undefined;
176
+ readonly max_output_tokens?: number | undefined;
177
+ readonly max_tool_calls?: number | undefined;
178
+ readonly parallel_tool_calls?: boolean | undefined;
164
179
  readonly temperature?: number | undefined;
180
+ readonly top_p?: number | undefined;
181
+ readonly presence_penalty?: number | undefined;
182
+ readonly frequency_penalty?: number | undefined;
165
183
  readonly tools?: readonly ({
166
184
  readonly type: "function";
167
- readonly description: string;
168
185
  readonly name: string;
186
+ readonly description: string;
169
187
  readonly parameters: {
170
188
  readonly [x: string]: unknown;
171
189
  };
172
190
  readonly strict?: boolean | undefined;
173
191
  } | {
174
192
  readonly type: "image_generation";
175
- readonly size?: string | undefined;
176
- readonly action?: "auto" | "generate" | "edit" | undefined;
177
- readonly output_format?: "png" | "jpeg" | "webp" | undefined;
178
- readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
193
+ readonly action?: "auto" | "edit" | "generate" | undefined;
179
194
  readonly background?: "auto" | "opaque" | "transparent" | undefined;
180
- readonly partial_images?: number | undefined;
195
+ readonly input_fidelity?: "high" | "low" | undefined;
181
196
  readonly output_compression?: number | undefined;
182
- readonly input_fidelity?: "low" | "high" | undefined;
197
+ readonly output_format?: "jpeg" | "png" | "webp" | undefined;
198
+ readonly partial_images?: number | undefined;
199
+ readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
200
+ readonly size?: string | undefined;
183
201
  } | {
184
202
  readonly type: "namespace";
185
203
  readonly name: string;
186
204
  readonly description: string;
187
205
  readonly tools: readonly {
188
206
  readonly type: "function";
189
- readonly description: string;
190
207
  readonly name: string;
208
+ readonly description: string;
191
209
  readonly parameters: {
192
210
  readonly [x: string]: unknown;
193
211
  };
194
212
  readonly strict?: boolean | undefined;
195
213
  }[];
196
214
  })[] | undefined;
197
- readonly text?: {
198
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
199
- } | undefined;
200
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
201
- readonly context_management?: readonly {
202
- readonly type: "compaction";
203
- readonly compact_threshold?: number | undefined;
204
- }[] | undefined;
205
- readonly tool_choice?: "required" | "auto" | "none" | {
215
+ readonly tool_choice?: "auto" | "none" | "required" | {
206
216
  readonly type: "function";
207
217
  readonly name: string;
208
218
  } | {
209
219
  readonly type: "allowed_tools";
210
- readonly mode: "required" | "auto" | "none";
220
+ readonly mode: "auto" | "none" | "required";
211
221
  readonly tools: readonly {
212
222
  readonly type: "function";
213
223
  readonly name: string;
@@ -215,28 +225,36 @@ export declare const responsesRoute: import("../route/client.js").Route<{
215
225
  } | {
216
226
  readonly type: "image_generation";
217
227
  } | undefined;
218
- readonly top_p?: number | undefined;
219
- readonly frequency_penalty?: number | undefined;
220
- readonly presence_penalty?: number | undefined;
221
- readonly store?: boolean | undefined;
222
- readonly max_output_tokens?: number | undefined;
223
- readonly prompt_cache_key?: string | undefined;
224
- readonly parallel_tool_calls?: boolean | undefined;
225
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
226
- readonly truncation?: "auto" | "disabled" | undefined;
227
- readonly stream_options?: {
228
- readonly include_obfuscation?: boolean | undefined;
229
- } | undefined;
230
- readonly safety_identifier?: string | undefined;
231
- readonly top_logprobs?: number | undefined;
232
- readonly max_tool_calls?: number | undefined;
228
+ readonly context_management?: readonly {
229
+ readonly type: "compaction";
230
+ readonly compact_threshold?: number | undefined;
231
+ }[] | undefined;
232
+ readonly stream: true;
233
233
  }, import("../protocols/open-responses-channel.js").Prepared, {
234
234
  endpoint: import("../route/client.js").CompactOperation;
235
235
  trigger: import("../route/client.js").TriggerCompactOperation;
236
236
  }>;
237
237
  export declare const messagesRoute: import("../route/client.js").Route<{
238
- readonly max_tokens: number;
238
+ readonly context_management?: {
239
+ readonly edits: readonly {
240
+ readonly type: "compact_20260112";
241
+ readonly trigger?: {
242
+ readonly type: "input_tokens";
243
+ readonly value: number;
244
+ } | undefined;
245
+ readonly pause_after_compaction?: boolean | undefined;
246
+ readonly instructions?: string | undefined;
247
+ }[];
248
+ } | undefined;
239
249
  readonly model: string;
250
+ readonly system?: readonly {
251
+ readonly type: "text";
252
+ readonly text: string;
253
+ readonly cache_control?: {
254
+ readonly type: "ephemeral";
255
+ readonly ttl?: "1h" | "5m" | undefined;
256
+ } | undefined;
257
+ }[] | undefined;
240
258
  readonly messages: readonly ({
241
259
  readonly role: "user";
242
260
  readonly content: readonly ({
@@ -264,7 +282,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
264
282
  readonly ttl?: "1h" | "5m" | undefined;
265
283
  } | undefined;
266
284
  readonly transformations?: {
267
- readonly oversized_image?: "error" | "downsize" | undefined;
285
+ readonly oversized_image?: "downsize" | "error" | undefined;
268
286
  } | undefined;
269
287
  } | {
270
288
  readonly type: "document";
@@ -283,17 +301,18 @@ export declare const messagesRoute: import("../route/client.js").Route<{
283
301
  readonly type: "file";
284
302
  readonly file_id: string;
285
303
  };
286
- readonly title?: string | undefined;
287
- readonly context?: string | undefined;
288
304
  readonly cache_control?: {
289
305
  readonly type: "ephemeral";
290
306
  readonly ttl?: "1h" | "5m" | undefined;
291
307
  } | undefined;
308
+ readonly title?: string | undefined;
309
+ readonly context?: string | undefined;
292
310
  readonly citations?: {
293
311
  readonly enabled: boolean;
294
312
  } | undefined;
295
313
  } | {
296
314
  readonly type: "tool_result";
315
+ readonly tool_use_id: string;
297
316
  readonly content: string | readonly ({
298
317
  readonly type: "text";
299
318
  readonly text: string;
@@ -319,7 +338,7 @@ export declare const messagesRoute: import("../route/client.js").Route<{
319
338
  readonly ttl?: "1h" | "5m" | undefined;
320
339
  } | undefined;
321
340
  readonly transformations?: {
322
- readonly oversized_image?: "error" | "downsize" | undefined;
341
+ readonly oversized_image?: "downsize" | "error" | undefined;
323
342
  } | undefined;
324
343
  } | {
325
344
  readonly type: "document";
@@ -338,22 +357,21 @@ export declare const messagesRoute: import("../route/client.js").Route<{
338
357
  readonly type: "file";
339
358
  readonly file_id: string;
340
359
  };
341
- readonly title?: string | undefined;
342
- readonly context?: string | undefined;
343
360
  readonly cache_control?: {
344
361
  readonly type: "ephemeral";
345
362
  readonly ttl?: "1h" | "5m" | undefined;
346
363
  } | undefined;
364
+ readonly title?: string | undefined;
365
+ readonly context?: string | undefined;
347
366
  readonly citations?: {
348
367
  readonly enabled: boolean;
349
368
  } | undefined;
350
369
  })[];
351
- readonly tool_use_id: string;
370
+ readonly is_error?: boolean | undefined;
352
371
  readonly cache_control?: {
353
372
  readonly type: "ephemeral";
354
373
  readonly ttl?: "1h" | "5m" | undefined;
355
374
  } | undefined;
356
- readonly is_error?: boolean | undefined;
357
375
  })[];
358
376
  } | {
359
377
  readonly role: "assistant";
@@ -365,51 +383,52 @@ export declare const messagesRoute: import("../route/client.js").Route<{
365
383
  readonly ttl?: "1h" | "5m" | undefined;
366
384
  } | undefined;
367
385
  } | {
368
- readonly id: string;
369
- readonly type: "tool_use";
370
- readonly name: string;
371
- readonly input: unknown;
386
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
387
+ readonly tool_use_id: string;
388
+ readonly content: unknown;
372
389
  readonly cache_control?: {
373
390
  readonly type: "ephemeral";
374
391
  readonly ttl?: "1h" | "5m" | undefined;
375
392
  } | undefined;
376
393
  } | {
377
- readonly id: string;
378
- readonly type: "server_tool_use";
379
- readonly name: string;
380
- readonly input: unknown;
394
+ readonly type: "compaction";
395
+ readonly content: string | null;
396
+ } | {
397
+ readonly type: "thinking";
398
+ readonly thinking: string;
399
+ readonly signature: string;
381
400
  readonly cache_control?: {
382
401
  readonly type: "ephemeral";
383
402
  readonly ttl?: "1h" | "5m" | undefined;
384
403
  } | undefined;
385
404
  } | {
386
- readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
387
- readonly content: unknown;
388
- readonly tool_use_id: string;
405
+ readonly type: "redacted_thinking";
406
+ readonly data: string;
389
407
  readonly cache_control?: {
390
408
  readonly type: "ephemeral";
391
409
  readonly ttl?: "1h" | "5m" | undefined;
392
410
  } | undefined;
393
411
  } | {
394
- readonly type: "thinking";
395
- readonly thinking: string;
396
- readonly signature: string;
412
+ readonly type: "tool_use";
413
+ readonly id: string;
414
+ readonly name: string;
415
+ readonly input: unknown;
397
416
  readonly cache_control?: {
398
417
  readonly type: "ephemeral";
399
418
  readonly ttl?: "1h" | "5m" | undefined;
400
419
  } | undefined;
401
420
  } | {
402
- readonly data: string;
403
- readonly type: "redacted_thinking";
421
+ readonly type: "server_tool_use";
422
+ readonly id: string;
423
+ readonly name: string;
424
+ readonly input: unknown;
404
425
  readonly cache_control?: {
405
426
  readonly type: "ephemeral";
406
427
  readonly ttl?: "1h" | "5m" | undefined;
407
428
  } | undefined;
408
- } | {
409
- readonly type: "compaction";
410
- readonly content: string | null;
411
429
  })[];
412
430
  } | {
431
+ readonly role: "system";
413
432
  readonly content: readonly {
414
433
  readonly type: "text";
415
434
  readonly text: string;
@@ -418,19 +437,13 @@ export declare const messagesRoute: import("../route/client.js").Route<{
418
437
  readonly ttl?: "1h" | "5m" | undefined;
419
438
  } | undefined;
420
439
  }[];
421
- readonly role: "system";
422
440
  readonly output_config?: {
423
441
  readonly effort: string;
424
442
  } | undefined;
425
443
  })[];
426
- readonly stream: true;
427
- readonly metadata?: {
428
- readonly user_id?: string | null | undefined;
429
- } | undefined;
430
- readonly temperature?: number | undefined;
431
444
  readonly tools?: readonly {
432
- readonly description: string;
433
445
  readonly name: string;
446
+ readonly description: string;
434
447
  readonly input_schema: {
435
448
  readonly [x: string]: unknown;
436
449
  };
@@ -439,73 +452,60 @@ export declare const messagesRoute: import("../route/client.js").Route<{
439
452
  readonly ttl?: "1h" | "5m" | undefined;
440
453
  } | undefined;
441
454
  }[] | undefined;
442
- readonly system?: readonly {
443
- readonly type: "text";
444
- readonly text: string;
445
- readonly cache_control?: {
446
- readonly type: "ephemeral";
447
- readonly ttl?: "1h" | "5m" | undefined;
448
- } | undefined;
449
- }[] | undefined;
455
+ readonly tool_choice?: {
456
+ readonly type: "any" | "auto" | "none";
457
+ readonly disable_parallel_tool_use?: boolean | undefined;
458
+ } | {
459
+ readonly type: "tool";
460
+ readonly name: string;
461
+ readonly disable_parallel_tool_use?: boolean | undefined;
462
+ } | undefined;
463
+ readonly stream: true;
464
+ readonly max_tokens: number;
465
+ readonly temperature?: number | undefined;
466
+ readonly top_p?: number | undefined;
467
+ readonly top_k?: number | undefined;
468
+ readonly stop_sequences?: readonly string[] | undefined;
450
469
  readonly thinking?: {
451
- readonly type: "enabled";
452
- readonly budget_tokens: number;
453
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
470
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
454
471
  readonly block_binding?: {
455
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
472
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
456
473
  } | undefined;
474
+ readonly type: "enabled";
475
+ readonly budget_tokens: number;
457
476
  } | {
458
- readonly type: "adaptive";
459
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
477
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
460
478
  readonly block_binding?: {
461
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
479
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
462
480
  } | undefined;
481
+ readonly type: "adaptive";
463
482
  } | {
464
- readonly type: "disabled" | "between_tools";
465
- } | undefined;
466
- readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
467
- readonly container?: string | {
468
- readonly id?: string | null | undefined;
469
- readonly skills?: readonly {
470
- readonly [x: string]: unknown;
471
- }[] | null | undefined;
472
- } | null | undefined;
473
- readonly inference_geo?: string | null | undefined;
474
- readonly cache_control?: {
475
- readonly type: "ephemeral";
476
- readonly ttl?: "1h" | "5m" | undefined;
483
+ readonly type: "between_tools" | "disabled";
477
484
  } | undefined;
478
485
  readonly output_config?: {
486
+ readonly effort?: string | undefined;
479
487
  readonly format?: {
480
488
  readonly type: "json_schema";
481
489
  readonly schema: {
482
490
  readonly [x: string]: unknown;
483
491
  };
484
492
  } | null | undefined;
485
- readonly effort?: string | undefined;
486
493
  } | undefined;
487
- readonly context_management?: {
488
- readonly edits: readonly {
489
- readonly type: "compact_20260112";
490
- readonly instructions?: string | undefined;
491
- readonly trigger?: {
492
- readonly type: "input_tokens";
493
- readonly value: number;
494
- } | undefined;
495
- readonly pause_after_compaction?: boolean | undefined;
496
- }[];
494
+ readonly cache_control?: {
495
+ readonly type: "ephemeral";
496
+ readonly ttl?: "1h" | "5m" | undefined;
497
497
  } | undefined;
498
- readonly tool_choice?: {
499
- readonly type: "auto" | "none" | "any";
500
- readonly disable_parallel_tool_use?: boolean | undefined;
501
- } | {
502
- readonly type: "tool";
503
- readonly name: string;
504
- readonly disable_parallel_tool_use?: boolean | undefined;
498
+ readonly container?: string | {
499
+ readonly id?: string | null | undefined;
500
+ readonly skills?: readonly {
501
+ readonly [x: string]: unknown;
502
+ }[] | null | undefined;
503
+ } | null | undefined;
504
+ readonly inference_geo?: string | null | undefined;
505
+ readonly metadata?: {
506
+ readonly user_id?: string | null | undefined;
505
507
  } | undefined;
506
- readonly top_p?: number | undefined;
507
- readonly top_k?: number | undefined;
508
- readonly stop_sequences?: readonly string[] | undefined;
508
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
509
509
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
510
510
  export declare const route: import("../route/client.js").Route<{
511
511
  readonly model: string;
@@ -551,8 +551,20 @@ export declare const route: import("../route/client.js").Route<{
551
551
  readonly file_data: string;
552
552
  };
553
553
  })[];
554
+ } | {
555
+ readonly role: "tool";
556
+ readonly tool_call_id: string;
557
+ readonly content: string | readonly {
558
+ readonly type: "text";
559
+ readonly text: string;
560
+ readonly cache_control?: {
561
+ readonly type: "ephemeral";
562
+ readonly ttl?: string | undefined;
563
+ } | undefined;
564
+ }[];
554
565
  } | {
555
566
  readonly [x: string]: unknown;
567
+ readonly role: "assistant";
556
568
  readonly content: string | readonly {
557
569
  readonly type: "text";
558
570
  readonly text: string;
@@ -561,77 +573,83 @@ export declare const route: import("../route/client.js").Route<{
561
573
  readonly ttl?: string | undefined;
562
574
  } | undefined;
563
575
  }[] | null;
564
- readonly role: "assistant";
565
- readonly reasoning?: string | undefined;
566
- readonly reasoning_content?: string | undefined;
567
- readonly reasoning_text?: string | undefined;
568
576
  readonly tool_calls?: readonly {
577
+ readonly id: string;
578
+ readonly type: "function";
569
579
  readonly function: {
570
580
  readonly name: string;
571
581
  readonly arguments: string;
572
582
  };
573
- readonly id: string;
574
- readonly type: "function";
575
583
  readonly extra_content?: {
576
584
  readonly google: {
577
585
  readonly thought_signature: string;
578
586
  };
579
587
  } | undefined;
580
588
  }[] | undefined;
589
+ readonly reasoning_content?: string | undefined;
590
+ readonly reasoning?: string | undefined;
591
+ readonly reasoning_text?: string | undefined;
581
592
  readonly reasoning_details?: unknown;
582
- } | {
583
- readonly role: "tool";
584
- readonly tool_call_id: string;
585
- readonly content: string | readonly {
586
- readonly type: "text";
587
- readonly text: string;
588
- readonly cache_control?: {
589
- readonly type: "ephemeral";
590
- readonly ttl?: string | undefined;
591
- } | undefined;
592
- }[];
593
593
  })[];
594
- readonly stream: true;
595
- readonly max_completion_tokens?: number | undefined;
596
- readonly max_tokens?: number | undefined;
597
- readonly temperature?: number | undefined;
598
594
  readonly tools?: readonly {
595
+ readonly type: "function";
599
596
  readonly function: {
600
- readonly description: string;
601
597
  readonly name: string;
598
+ readonly description: string;
602
599
  readonly parameters: {
603
600
  readonly [x: string]: unknown;
604
601
  };
605
602
  readonly strict?: boolean | undefined;
606
603
  };
607
- readonly type: "function";
608
604
  readonly cache_control?: {
609
605
  readonly type: "ephemeral";
610
606
  readonly ttl?: string | undefined;
611
607
  } | undefined;
612
608
  }[] | undefined;
613
- readonly stop?: readonly string[] | undefined;
614
- readonly seed?: number | undefined;
615
- readonly tool_choice?: "required" | "auto" | "none" | {
609
+ readonly tool_choice?: "auto" | "none" | "required" | {
616
610
  readonly type: "function";
617
611
  readonly function: {
618
612
  readonly name: string;
619
613
  };
620
614
  } | undefined;
621
- readonly top_p?: number | undefined;
622
- readonly frequency_penalty?: number | undefined;
623
- readonly presence_penalty?: number | undefined;
624
- readonly store?: boolean | undefined;
625
- readonly prompt_cache_key?: string | undefined;
626
- readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
615
+ readonly stream: true;
627
616
  readonly stream_options?: {
628
617
  readonly include_usage: boolean;
629
618
  } | undefined;
619
+ readonly store?: boolean | undefined;
620
+ readonly prompt_cache_key?: string | undefined;
621
+ readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
630
622
  readonly tool_stream?: boolean | undefined;
623
+ readonly max_completion_tokens?: number | undefined;
624
+ readonly max_tokens?: number | undefined;
625
+ readonly temperature?: number | undefined;
626
+ readonly top_p?: number | undefined;
627
+ readonly frequency_penalty?: number | undefined;
628
+ readonly presence_penalty?: number | undefined;
629
+ readonly seed?: number | undefined;
630
+ readonly stop?: readonly string[] | undefined;
631
631
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>;
632
632
  export declare const routes: (import("../route/client.js").Route<{
633
- readonly max_tokens: number;
633
+ readonly context_management?: {
634
+ readonly edits: readonly {
635
+ readonly type: "compact_20260112";
636
+ readonly trigger?: {
637
+ readonly type: "input_tokens";
638
+ readonly value: number;
639
+ } | undefined;
640
+ readonly pause_after_compaction?: boolean | undefined;
641
+ readonly instructions?: string | undefined;
642
+ }[];
643
+ } | undefined;
634
644
  readonly model: string;
645
+ readonly system?: readonly {
646
+ readonly type: "text";
647
+ readonly text: string;
648
+ readonly cache_control?: {
649
+ readonly type: "ephemeral";
650
+ readonly ttl?: "1h" | "5m" | undefined;
651
+ } | undefined;
652
+ }[] | undefined;
635
653
  readonly messages: readonly ({
636
654
  readonly role: "user";
637
655
  readonly content: readonly ({
@@ -659,7 +677,7 @@ export declare const routes: (import("../route/client.js").Route<{
659
677
  readonly ttl?: "1h" | "5m" | undefined;
660
678
  } | undefined;
661
679
  readonly transformations?: {
662
- readonly oversized_image?: "error" | "downsize" | undefined;
680
+ readonly oversized_image?: "downsize" | "error" | undefined;
663
681
  } | undefined;
664
682
  } | {
665
683
  readonly type: "document";
@@ -678,17 +696,18 @@ export declare const routes: (import("../route/client.js").Route<{
678
696
  readonly type: "file";
679
697
  readonly file_id: string;
680
698
  };
681
- readonly title?: string | undefined;
682
- readonly context?: string | undefined;
683
699
  readonly cache_control?: {
684
700
  readonly type: "ephemeral";
685
701
  readonly ttl?: "1h" | "5m" | undefined;
686
702
  } | undefined;
703
+ readonly title?: string | undefined;
704
+ readonly context?: string | undefined;
687
705
  readonly citations?: {
688
706
  readonly enabled: boolean;
689
707
  } | undefined;
690
708
  } | {
691
709
  readonly type: "tool_result";
710
+ readonly tool_use_id: string;
692
711
  readonly content: string | readonly ({
693
712
  readonly type: "text";
694
713
  readonly text: string;
@@ -714,7 +733,7 @@ export declare const routes: (import("../route/client.js").Route<{
714
733
  readonly ttl?: "1h" | "5m" | undefined;
715
734
  } | undefined;
716
735
  readonly transformations?: {
717
- readonly oversized_image?: "error" | "downsize" | undefined;
736
+ readonly oversized_image?: "downsize" | "error" | undefined;
718
737
  } | undefined;
719
738
  } | {
720
739
  readonly type: "document";
@@ -733,22 +752,21 @@ export declare const routes: (import("../route/client.js").Route<{
733
752
  readonly type: "file";
734
753
  readonly file_id: string;
735
754
  };
736
- readonly title?: string | undefined;
737
- readonly context?: string | undefined;
738
755
  readonly cache_control?: {
739
756
  readonly type: "ephemeral";
740
757
  readonly ttl?: "1h" | "5m" | undefined;
741
758
  } | undefined;
759
+ readonly title?: string | undefined;
760
+ readonly context?: string | undefined;
742
761
  readonly citations?: {
743
762
  readonly enabled: boolean;
744
763
  } | undefined;
745
764
  })[];
746
- readonly tool_use_id: string;
765
+ readonly is_error?: boolean | undefined;
747
766
  readonly cache_control?: {
748
767
  readonly type: "ephemeral";
749
768
  readonly ttl?: "1h" | "5m" | undefined;
750
769
  } | undefined;
751
- readonly is_error?: boolean | undefined;
752
770
  })[];
753
771
  } | {
754
772
  readonly role: "assistant";
@@ -760,51 +778,52 @@ export declare const routes: (import("../route/client.js").Route<{
760
778
  readonly ttl?: "1h" | "5m" | undefined;
761
779
  } | undefined;
762
780
  } | {
763
- readonly id: string;
764
- readonly type: "tool_use";
765
- readonly name: string;
766
- readonly input: unknown;
781
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
782
+ readonly tool_use_id: string;
783
+ readonly content: unknown;
767
784
  readonly cache_control?: {
768
785
  readonly type: "ephemeral";
769
786
  readonly ttl?: "1h" | "5m" | undefined;
770
787
  } | undefined;
771
788
  } | {
772
- readonly id: string;
773
- readonly type: "server_tool_use";
774
- readonly name: string;
775
- readonly input: unknown;
789
+ readonly type: "compaction";
790
+ readonly content: string | null;
791
+ } | {
792
+ readonly type: "thinking";
793
+ readonly thinking: string;
794
+ readonly signature: string;
776
795
  readonly cache_control?: {
777
796
  readonly type: "ephemeral";
778
797
  readonly ttl?: "1h" | "5m" | undefined;
779
798
  } | undefined;
780
799
  } | {
781
- readonly type: "web_search_tool_result" | "code_execution_tool_result" | "web_fetch_tool_result";
782
- readonly content: unknown;
783
- readonly tool_use_id: string;
800
+ readonly type: "redacted_thinking";
801
+ readonly data: string;
784
802
  readonly cache_control?: {
785
803
  readonly type: "ephemeral";
786
804
  readonly ttl?: "1h" | "5m" | undefined;
787
805
  } | undefined;
788
806
  } | {
789
- readonly type: "thinking";
790
- readonly thinking: string;
791
- readonly signature: string;
807
+ readonly type: "tool_use";
808
+ readonly id: string;
809
+ readonly name: string;
810
+ readonly input: unknown;
792
811
  readonly cache_control?: {
793
812
  readonly type: "ephemeral";
794
813
  readonly ttl?: "1h" | "5m" | undefined;
795
814
  } | undefined;
796
815
  } | {
797
- readonly data: string;
798
- readonly type: "redacted_thinking";
816
+ readonly type: "server_tool_use";
817
+ readonly id: string;
818
+ readonly name: string;
819
+ readonly input: unknown;
799
820
  readonly cache_control?: {
800
821
  readonly type: "ephemeral";
801
822
  readonly ttl?: "1h" | "5m" | undefined;
802
823
  } | undefined;
803
- } | {
804
- readonly type: "compaction";
805
- readonly content: string | null;
806
824
  })[];
807
825
  } | {
826
+ readonly role: "system";
808
827
  readonly content: readonly {
809
828
  readonly type: "text";
810
829
  readonly text: string;
@@ -813,19 +832,13 @@ export declare const routes: (import("../route/client.js").Route<{
813
832
  readonly ttl?: "1h" | "5m" | undefined;
814
833
  } | undefined;
815
834
  }[];
816
- readonly role: "system";
817
835
  readonly output_config?: {
818
836
  readonly effort: string;
819
837
  } | undefined;
820
838
  })[];
821
- readonly stream: true;
822
- readonly metadata?: {
823
- readonly user_id?: string | null | undefined;
824
- } | undefined;
825
- readonly temperature?: number | undefined;
826
839
  readonly tools?: readonly {
827
- readonly description: string;
828
840
  readonly name: string;
841
+ readonly description: string;
829
842
  readonly input_schema: {
830
843
  readonly [x: string]: unknown;
831
844
  };
@@ -834,73 +847,60 @@ export declare const routes: (import("../route/client.js").Route<{
834
847
  readonly ttl?: "1h" | "5m" | undefined;
835
848
  } | undefined;
836
849
  }[] | undefined;
837
- readonly system?: readonly {
838
- readonly type: "text";
839
- readonly text: string;
840
- readonly cache_control?: {
841
- readonly type: "ephemeral";
842
- readonly ttl?: "1h" | "5m" | undefined;
843
- } | undefined;
844
- }[] | undefined;
850
+ readonly tool_choice?: {
851
+ readonly type: "any" | "auto" | "none";
852
+ readonly disable_parallel_tool_use?: boolean | undefined;
853
+ } | {
854
+ readonly type: "tool";
855
+ readonly name: string;
856
+ readonly disable_parallel_tool_use?: boolean | undefined;
857
+ } | undefined;
858
+ readonly stream: true;
859
+ readonly max_tokens: number;
860
+ readonly temperature?: number | undefined;
861
+ readonly top_p?: number | undefined;
862
+ readonly top_k?: number | undefined;
863
+ readonly stop_sequences?: readonly string[] | undefined;
845
864
  readonly thinking?: {
846
- readonly type: "enabled";
847
- readonly budget_tokens: number;
848
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
865
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
849
866
  readonly block_binding?: {
850
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
867
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
851
868
  } | undefined;
869
+ readonly type: "enabled";
870
+ readonly budget_tokens: number;
852
871
  } | {
853
- readonly type: "adaptive";
854
- readonly display?: import("../schema/options.js").OpenString<"summarized" | "omitted"> | undefined;
872
+ readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
855
873
  readonly block_binding?: {
856
- readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"error" | "drop_block"> | undefined;
874
+ readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
857
875
  } | undefined;
876
+ readonly type: "adaptive";
858
877
  } | {
859
- readonly type: "disabled" | "between_tools";
860
- } | undefined;
861
- readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
862
- readonly container?: string | {
863
- readonly id?: string | null | undefined;
864
- readonly skills?: readonly {
865
- readonly [x: string]: unknown;
866
- }[] | null | undefined;
867
- } | null | undefined;
868
- readonly inference_geo?: string | null | undefined;
869
- readonly cache_control?: {
870
- readonly type: "ephemeral";
871
- readonly ttl?: "1h" | "5m" | undefined;
878
+ readonly type: "between_tools" | "disabled";
872
879
  } | undefined;
873
880
  readonly output_config?: {
881
+ readonly effort?: string | undefined;
874
882
  readonly format?: {
875
883
  readonly type: "json_schema";
876
884
  readonly schema: {
877
885
  readonly [x: string]: unknown;
878
886
  };
879
887
  } | null | undefined;
880
- readonly effort?: string | undefined;
881
888
  } | undefined;
882
- readonly context_management?: {
883
- readonly edits: readonly {
884
- readonly type: "compact_20260112";
885
- readonly instructions?: string | undefined;
886
- readonly trigger?: {
887
- readonly type: "input_tokens";
888
- readonly value: number;
889
- } | undefined;
890
- readonly pause_after_compaction?: boolean | undefined;
891
- }[];
889
+ readonly cache_control?: {
890
+ readonly type: "ephemeral";
891
+ readonly ttl?: "1h" | "5m" | undefined;
892
892
  } | undefined;
893
- readonly tool_choice?: {
894
- readonly type: "auto" | "none" | "any";
895
- readonly disable_parallel_tool_use?: boolean | undefined;
896
- } | {
897
- readonly type: "tool";
898
- readonly name: string;
899
- readonly disable_parallel_tool_use?: boolean | undefined;
893
+ readonly container?: string | {
894
+ readonly id?: string | null | undefined;
895
+ readonly skills?: readonly {
896
+ readonly [x: string]: unknown;
897
+ }[] | null | undefined;
898
+ } | null | undefined;
899
+ readonly inference_geo?: string | null | undefined;
900
+ readonly metadata?: {
901
+ readonly user_id?: string | null | undefined;
900
902
  } | undefined;
901
- readonly top_p?: number | undefined;
902
- readonly top_k?: number | undefined;
903
- readonly stop_sequences?: readonly string[] | undefined;
903
+ readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
904
904
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
905
905
  readonly model: string;
906
906
  readonly messages: readonly ({
@@ -945,8 +945,20 @@ export declare const routes: (import("../route/client.js").Route<{
945
945
  readonly file_data: string;
946
946
  };
947
947
  })[];
948
+ } | {
949
+ readonly role: "tool";
950
+ readonly tool_call_id: string;
951
+ readonly content: string | readonly {
952
+ readonly type: "text";
953
+ readonly text: string;
954
+ readonly cache_control?: {
955
+ readonly type: "ephemeral";
956
+ readonly ttl?: string | undefined;
957
+ } | undefined;
958
+ }[];
948
959
  } | {
949
960
  readonly [x: string]: unknown;
961
+ readonly role: "assistant";
950
962
  readonly content: string | readonly {
951
963
  readonly type: "text";
952
964
  readonly text: string;
@@ -955,86 +967,75 @@ export declare const routes: (import("../route/client.js").Route<{
955
967
  readonly ttl?: string | undefined;
956
968
  } | undefined;
957
969
  }[] | null;
958
- readonly role: "assistant";
959
- readonly reasoning?: string | undefined;
960
- readonly reasoning_content?: string | undefined;
961
- readonly reasoning_text?: string | undefined;
962
970
  readonly tool_calls?: readonly {
971
+ readonly id: string;
972
+ readonly type: "function";
963
973
  readonly function: {
964
974
  readonly name: string;
965
975
  readonly arguments: string;
966
976
  };
967
- readonly id: string;
968
- readonly type: "function";
969
977
  readonly extra_content?: {
970
978
  readonly google: {
971
979
  readonly thought_signature: string;
972
980
  };
973
981
  } | undefined;
974
982
  }[] | undefined;
983
+ readonly reasoning_content?: string | undefined;
984
+ readonly reasoning?: string | undefined;
985
+ readonly reasoning_text?: string | undefined;
975
986
  readonly reasoning_details?: unknown;
976
- } | {
977
- readonly role: "tool";
978
- readonly tool_call_id: string;
979
- readonly content: string | readonly {
980
- readonly type: "text";
981
- readonly text: string;
982
- readonly cache_control?: {
983
- readonly type: "ephemeral";
984
- readonly ttl?: string | undefined;
985
- } | undefined;
986
- }[];
987
987
  })[];
988
- readonly stream: true;
989
- readonly max_completion_tokens?: number | undefined;
990
- readonly max_tokens?: number | undefined;
991
- readonly temperature?: number | undefined;
992
988
  readonly tools?: readonly {
989
+ readonly type: "function";
993
990
  readonly function: {
994
- readonly description: string;
995
991
  readonly name: string;
992
+ readonly description: string;
996
993
  readonly parameters: {
997
994
  readonly [x: string]: unknown;
998
995
  };
999
996
  readonly strict?: boolean | undefined;
1000
997
  };
1001
- readonly type: "function";
1002
998
  readonly cache_control?: {
1003
999
  readonly type: "ephemeral";
1004
1000
  readonly ttl?: string | undefined;
1005
1001
  } | undefined;
1006
1002
  }[] | undefined;
1007
- readonly stop?: readonly string[] | undefined;
1008
- readonly seed?: number | undefined;
1009
- readonly tool_choice?: "required" | "auto" | "none" | {
1003
+ readonly tool_choice?: "auto" | "none" | "required" | {
1010
1004
  readonly type: "function";
1011
1005
  readonly function: {
1012
1006
  readonly name: string;
1013
1007
  };
1014
1008
  } | undefined;
1015
- readonly top_p?: number | undefined;
1016
- readonly frequency_penalty?: number | undefined;
1017
- readonly presence_penalty?: number | undefined;
1018
- readonly store?: boolean | undefined;
1019
- readonly prompt_cache_key?: string | undefined;
1020
- readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
1009
+ readonly stream: true;
1021
1010
  readonly stream_options?: {
1022
1011
  readonly include_usage: boolean;
1023
1012
  } | undefined;
1013
+ readonly store?: boolean | undefined;
1014
+ readonly prompt_cache_key?: string | undefined;
1015
+ readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
1024
1016
  readonly tool_stream?: boolean | undefined;
1017
+ readonly max_completion_tokens?: number | undefined;
1018
+ readonly max_tokens?: number | undefined;
1019
+ readonly temperature?: number | undefined;
1020
+ readonly top_p?: number | undefined;
1021
+ readonly frequency_penalty?: number | undefined;
1022
+ readonly presence_penalty?: number | undefined;
1023
+ readonly seed?: number | undefined;
1024
+ readonly stop?: readonly string[] | undefined;
1025
1025
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | import("../route/client.js").Route<{
1026
+ readonly model: string;
1026
1027
  readonly input: readonly ({
1027
1028
  readonly [x: string]: unknown;
1028
- readonly id: string;
1029
1029
  readonly type: "web_search_call";
1030
+ readonly id: string;
1030
1031
  readonly status?: string | undefined;
1031
1032
  readonly action?: {
1032
1033
  readonly [x: string]: unknown;
1033
1034
  } | null | undefined;
1034
1035
  } | {
1035
1036
  readonly [x: string]: unknown;
1036
- readonly id: string;
1037
1037
  readonly type: "file_search_call";
1038
+ readonly id: string;
1038
1039
  readonly status?: string | undefined;
1039
1040
  readonly queries?: readonly string[] | undefined;
1040
1041
  readonly results?: readonly {
@@ -1042,8 +1043,8 @@ export declare const routes: (import("../route/client.js").Route<{
1042
1043
  }[] | null | undefined;
1043
1044
  } | {
1044
1045
  readonly [x: string]: unknown;
1045
- readonly id: string;
1046
1046
  readonly type: "code_interpreter_call";
1047
+ readonly id: string;
1047
1048
  readonly status?: string | undefined;
1048
1049
  readonly code?: string | null | undefined;
1049
1050
  readonly container_id?: string | null | undefined;
@@ -1052,14 +1053,14 @@ export declare const routes: (import("../route/client.js").Route<{
1052
1053
  }[] | null | undefined;
1053
1054
  } | {
1054
1055
  readonly [x: string]: unknown;
1055
- readonly id: string;
1056
1056
  readonly type: "mcp_call";
1057
+ readonly id: string;
1057
1058
  readonly status?: string | undefined;
1059
+ readonly server_label?: string | undefined;
1058
1060
  readonly name?: string | undefined;
1061
+ readonly arguments?: string | undefined;
1059
1062
  readonly output?: string | null | undefined;
1060
1063
  readonly error?: unknown;
1061
- readonly arguments?: string | undefined;
1062
- readonly server_label?: string | undefined;
1063
1064
  } | {
1064
1065
  readonly type: "configuration_update";
1065
1066
  readonly reasoning: {
@@ -1069,18 +1070,10 @@ export declare const routes: (import("../route/client.js").Route<{
1069
1070
  readonly [x: string]: unknown;
1070
1071
  readonly type: string;
1071
1072
  readonly id: string;
1072
- } | {
1073
- readonly type: "reasoning";
1074
- readonly summary: readonly {
1075
- readonly type: "summary_text";
1076
- readonly text: string;
1077
- }[];
1078
- readonly id?: string | undefined;
1079
- readonly encrypted_content?: string | null | undefined;
1080
1073
  } | {
1081
1074
  readonly type: "compaction";
1082
- readonly encrypted_content: string;
1083
1075
  readonly id?: string | null | undefined;
1076
+ readonly encrypted_content: string;
1084
1077
  } | {
1085
1078
  readonly type: "message";
1086
1079
  readonly role: "system";
@@ -1091,6 +1084,7 @@ export declare const routes: (import("../route/client.js").Route<{
1091
1084
  readonly content: string;
1092
1085
  } | {
1093
1086
  readonly type: "message";
1087
+ readonly role: "user";
1094
1088
  readonly content: readonly ({
1095
1089
  readonly type: "input_image";
1096
1090
  readonly image_url: string;
@@ -1105,26 +1099,33 @@ export declare const routes: (import("../route/client.js").Route<{
1105
1099
  readonly type: "input_text";
1106
1100
  readonly text: string;
1107
1101
  })[];
1108
- readonly role: "user";
1109
1102
  readonly id?: string | undefined;
1110
1103
  readonly status?: string | undefined;
1111
1104
  } | {
1112
1105
  readonly type: "message";
1106
+ readonly id?: string | undefined;
1107
+ readonly role: "assistant";
1113
1108
  readonly content: readonly {
1114
1109
  readonly type: "output_text";
1115
1110
  readonly text: string;
1116
1111
  }[];
1117
- readonly role: "assistant";
1118
- readonly id?: string | undefined;
1119
- readonly status?: string | undefined;
1120
1112
  readonly phase?: "commentary" | "final_answer" | null | undefined;
1113
+ readonly status?: string | undefined;
1114
+ } | {
1115
+ readonly type: "reasoning";
1116
+ readonly id?: string | undefined;
1117
+ readonly summary: readonly {
1118
+ readonly type: "summary_text";
1119
+ readonly text: string;
1120
+ }[];
1121
+ readonly encrypted_content?: string | null | undefined;
1121
1122
  } | {
1122
1123
  readonly type: "function_call";
1123
- readonly name: string;
1124
- readonly arguments: string;
1125
- readonly call_id: string;
1126
1124
  readonly id?: string | undefined;
1125
+ readonly call_id: string;
1126
+ readonly name: string;
1127
1127
  readonly namespace?: string | undefined;
1128
+ readonly arguments: string;
1128
1129
  } | {
1129
1130
  readonly type: "function_call_output";
1130
1131
  readonly call_id: string;
@@ -1146,63 +1147,72 @@ export declare const routes: (import("../route/client.js").Route<{
1146
1147
  readonly video_url: string;
1147
1148
  })[];
1148
1149
  })[];
1149
- readonly model: string;
1150
- readonly stream: true;
1150
+ readonly instructions?: string | undefined;
1151
+ readonly store?: boolean | undefined;
1151
1152
  readonly metadata?: {
1152
1153
  readonly [x: string]: string;
1153
1154
  } | undefined;
1154
- readonly instructions?: string | undefined;
1155
+ readonly safety_identifier?: string | undefined;
1156
+ readonly stream_options?: {
1157
+ readonly include_obfuscation?: boolean | undefined;
1158
+ } | undefined;
1159
+ readonly top_logprobs?: number | undefined;
1160
+ readonly truncation?: "auto" | "disabled" | undefined;
1161
+ readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
1162
+ readonly prompt_cache_key?: string | undefined;
1163
+ readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
1155
1164
  readonly reasoning?: {
1156
- readonly summary?: "auto" | "concise" | "detailed" | undefined;
1157
1165
  readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
1166
+ readonly summary?: "auto" | "concise" | "detailed" | undefined;
1167
+ } | undefined;
1168
+ readonly text?: {
1169
+ readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
1158
1170
  } | undefined;
1171
+ readonly max_output_tokens?: number | undefined;
1172
+ readonly max_tool_calls?: number | undefined;
1173
+ readonly parallel_tool_calls?: boolean | undefined;
1159
1174
  readonly temperature?: number | undefined;
1175
+ readonly top_p?: number | undefined;
1176
+ readonly presence_penalty?: number | undefined;
1177
+ readonly frequency_penalty?: number | undefined;
1160
1178
  readonly tools?: readonly ({
1161
1179
  readonly type: "function";
1162
- readonly description: string;
1163
1180
  readonly name: string;
1181
+ readonly description: string;
1164
1182
  readonly parameters: {
1165
1183
  readonly [x: string]: unknown;
1166
1184
  };
1167
1185
  readonly strict?: boolean | undefined;
1168
1186
  } | {
1169
1187
  readonly type: "image_generation";
1170
- readonly size?: string | undefined;
1171
- readonly action?: "auto" | "generate" | "edit" | undefined;
1172
- readonly output_format?: "png" | "jpeg" | "webp" | undefined;
1173
- readonly quality?: "auto" | "low" | "medium" | "high" | undefined;
1188
+ readonly action?: "auto" | "edit" | "generate" | undefined;
1174
1189
  readonly background?: "auto" | "opaque" | "transparent" | undefined;
1175
- readonly partial_images?: number | undefined;
1190
+ readonly input_fidelity?: "high" | "low" | undefined;
1176
1191
  readonly output_compression?: number | undefined;
1177
- readonly input_fidelity?: "low" | "high" | undefined;
1192
+ readonly output_format?: "jpeg" | "png" | "webp" | undefined;
1193
+ readonly partial_images?: number | undefined;
1194
+ readonly quality?: "auto" | "high" | "low" | "medium" | undefined;
1195
+ readonly size?: string | undefined;
1178
1196
  } | {
1179
1197
  readonly type: "namespace";
1180
1198
  readonly name: string;
1181
1199
  readonly description: string;
1182
1200
  readonly tools: readonly {
1183
1201
  readonly type: "function";
1184
- readonly description: string;
1185
1202
  readonly name: string;
1203
+ readonly description: string;
1186
1204
  readonly parameters: {
1187
1205
  readonly [x: string]: unknown;
1188
1206
  };
1189
1207
  readonly strict?: boolean | undefined;
1190
1208
  }[];
1191
1209
  })[] | undefined;
1192
- readonly text?: {
1193
- readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
1194
- } | undefined;
1195
- readonly service_tier?: import("../protocols/utils/open-responses-options.js").ServiceTier | undefined;
1196
- readonly context_management?: readonly {
1197
- readonly type: "compaction";
1198
- readonly compact_threshold?: number | undefined;
1199
- }[] | undefined;
1200
- readonly tool_choice?: "required" | "auto" | "none" | {
1210
+ readonly tool_choice?: "auto" | "none" | "required" | {
1201
1211
  readonly type: "function";
1202
1212
  readonly name: string;
1203
1213
  } | {
1204
1214
  readonly type: "allowed_tools";
1205
- readonly mode: "required" | "auto" | "none";
1215
+ readonly mode: "auto" | "none" | "required";
1206
1216
  readonly tools: readonly {
1207
1217
  readonly type: "function";
1208
1218
  readonly name: string;
@@ -1210,21 +1220,11 @@ export declare const routes: (import("../route/client.js").Route<{
1210
1220
  } | {
1211
1221
  readonly type: "image_generation";
1212
1222
  } | undefined;
1213
- readonly top_p?: number | undefined;
1214
- readonly frequency_penalty?: number | undefined;
1215
- readonly presence_penalty?: number | undefined;
1216
- readonly store?: boolean | undefined;
1217
- readonly max_output_tokens?: number | undefined;
1218
- readonly prompt_cache_key?: string | undefined;
1219
- readonly parallel_tool_calls?: boolean | undefined;
1220
- readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
1221
- readonly truncation?: "auto" | "disabled" | undefined;
1222
- readonly stream_options?: {
1223
- readonly include_obfuscation?: boolean | undefined;
1224
- } | undefined;
1225
- readonly safety_identifier?: string | undefined;
1226
- readonly top_logprobs?: number | undefined;
1227
- readonly max_tool_calls?: number | undefined;
1223
+ readonly context_management?: readonly {
1224
+ readonly type: "compaction";
1225
+ readonly compact_threshold?: number | undefined;
1226
+ }[] | undefined;
1227
+ readonly stream: true;
1228
1228
  }, import("../protocols/open-responses-channel.js").Prepared, {
1229
1229
  endpoint: import("../route/client.js").CompactOperation;
1230
1230
  trigger: import("../route/client.js").TriggerCompactOperation;
@@ -1232,15 +1232,11 @@ export declare const routes: (import("../route/client.js").Route<{
1232
1232
  export declare const configure: (input: LanguageModelOptions) => {
1233
1233
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
1234
1234
  model: (input: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
1235
- configure: (input: LanguageModelOptions) => /*elided*/ any;
1235
+ configure: typeof configure;
1236
1236
  };
1237
1237
  export declare const provider: {
1238
1238
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
1239
- configure: (input: LanguageModelOptions) => {
1240
- id: string & import("effect/Brand").Brand<"AI.ProviderID">;
1241
- model: (input: string | ModelID) => import("../schema/options.js").LanguageModel<import("./openai-options.js").OpenAIOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
1242
- configure: /*elided*/ any;
1243
- };
1239
+ configure: typeof configure;
1244
1240
  };
1245
1241
  export declare const model: ProviderPackage.Definition<Settings, OpenAIProviderOptionsInput>["model"];
1246
1242
  export * as CloudflareAIGateway from "./cloudflare-ai-gateway.js";