@opencode/ai 2.0.32 → 2.1.1

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