@opencode/ai 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/experimental/evaluation.js +3 -10
  2. package/dist/image-client.d.ts +8 -8
  3. package/dist/image.d.ts +148 -148
  4. package/dist/promise.d.ts +120 -120
  5. package/dist/protocols/alibaba-chat.d.ts +12 -12
  6. package/dist/protocols/alibaba-messages.d.ts +11 -11
  7. package/dist/protocols/alibaba-responses.d.ts +35 -35
  8. package/dist/protocols/anthropic-messages.d.ts +40 -44
  9. package/dist/protocols/anthropic-messages.js +3 -3
  10. package/dist/protocols/bedrock-converse.d.ts +30 -32
  11. package/dist/protocols/bedrock-converse.js +2 -3
  12. package/dist/protocols/cartesia-speech.d.ts +32 -32
  13. package/dist/protocols/cohere-chat.d.ts +7 -8
  14. package/dist/protocols/deepgram-speech.d.ts +32 -32
  15. package/dist/protocols/elevenlabs-speech.d.ts +32 -32
  16. package/dist/protocols/gemini.d.ts +34 -34
  17. package/dist/protocols/gemini.js +2 -2
  18. package/dist/protocols/google-interactions.d.ts +14 -14
  19. package/dist/protocols/google-interactions.js +2 -2
  20. package/dist/protocols/google-speech.d.ts +32 -32
  21. package/dist/protocols/google-transcription.d.ts +32 -32
  22. package/dist/protocols/meta-messages.d.ts +23 -23
  23. package/dist/protocols/meta-responses.d.ts +78 -78
  24. package/dist/protocols/mistral-chat.d.ts +81 -78
  25. package/dist/protocols/mistral-chat.js +2 -1
  26. package/dist/protocols/open-responses-channel.js +47 -46
  27. package/dist/protocols/open-responses-continuation.d.ts +8 -2
  28. package/dist/protocols/open-responses-continuation.js +3 -1
  29. package/dist/protocols/open-responses.d.ts +398 -398
  30. package/dist/protocols/open-responses.js +8 -7
  31. package/dist/protocols/openai-chat.d.ts +60 -60
  32. package/dist/protocols/openai-chat.js +3 -3
  33. package/dist/protocols/openai-compatible-chat.d.ts +13 -14
  34. package/dist/protocols/openai-compatible-responses.d.ts +36 -37
  35. package/dist/protocols/openai-images.d.ts +32 -32
  36. package/dist/protocols/openai-responses.d.ts +235 -235
  37. package/dist/protocols/openai-responses.js +1 -1
  38. package/dist/protocols/openai-speech.d.ts +32 -32
  39. package/dist/protocols/openai-transcription.d.ts +32 -32
  40. package/dist/protocols/openai-transcription.js +12 -7
  41. package/dist/protocols/utils/partial-json-options.d.ts +0 -1
  42. package/dist/protocols/utils/partial-json-options.js +0 -1
  43. package/dist/protocols/utils/tool-stream.d.ts +1 -1
  44. package/dist/protocols/venice-chat.d.ts +52 -53
  45. package/dist/protocols/venice-chat.js +6 -5
  46. package/dist/protocols/xai-responses.d.ts +78 -78
  47. package/dist/protocols/zai-chat.d.ts +33 -30
  48. package/dist/protocols/zai-chat.js +8 -3
  49. package/dist/protocols/zai-messages.d.ts +21 -19
  50. package/dist/protocols/zai-messages.js +3 -2
  51. package/dist/provider-error.js +5 -3
  52. package/dist/providers/alibaba.d.ts +69 -69
  53. package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
  54. package/dist/providers/amazon-bedrock.d.ts +15 -15
  55. package/dist/providers/anthropic-compatible.d.ts +13 -13
  56. package/dist/providers/anthropic.d.ts +13 -13
  57. package/dist/providers/azure.d.ts +106 -106
  58. package/dist/providers/baseten.d.ts +24 -24
  59. package/dist/providers/cerebras.d.ts +24 -24
  60. package/dist/providers/cloudflare-ai-gateway.d.ts +230 -227
  61. package/dist/providers/cloudflare-ai-gateway.js +1 -2
  62. package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
  63. package/dist/providers/cohere.d.ts +75 -75
  64. package/dist/providers/deepinfra.d.ts +24 -24
  65. package/dist/providers/deepseek.d.ts +24 -24
  66. package/dist/providers/digitalocean.d.ts +36 -36
  67. package/dist/providers/fireworks.d.ts +24 -24
  68. package/dist/providers/google-vertex-chat.d.ts +12 -12
  69. package/dist/providers/google-vertex-messages.d.ts +13 -13
  70. package/dist/providers/google-vertex-mistral.d.ts +17 -17
  71. package/dist/providers/google-vertex-responses.d.ts +35 -35
  72. package/dist/providers/google-vertex.d.ts +17 -17
  73. package/dist/providers/google-vertex.js +2 -2
  74. package/dist/providers/google.d.ts +17 -17
  75. package/dist/providers/groq.d.ts +24 -24
  76. package/dist/providers/meta.d.ts +179 -179
  77. package/dist/providers/minimax.d.ts +71 -71
  78. package/dist/providers/mistral.d.ts +28 -28
  79. package/dist/providers/moonshot.d.ts +202 -202
  80. package/dist/providers/open-responses-options.d.ts +0 -1
  81. package/dist/providers/open-responses-options.js +1 -1
  82. package/dist/providers/openai-compatible-responses.d.ts +35 -35
  83. package/dist/providers/openai-compatible.d.ts +12 -12
  84. package/dist/providers/openai-compatible.js +1 -1
  85. package/dist/providers/openai-options.d.ts +0 -1
  86. package/dist/providers/openai-options.js +0 -1
  87. package/dist/providers/openai.d.ts +100 -100
  88. package/dist/providers/openrouter.d.ts +36 -36
  89. package/dist/providers/togetherai.d.ts +24 -24
  90. package/dist/providers/venice.d.ts +195 -20
  91. package/dist/providers/xai.d.ts +12 -12
  92. package/dist/providers/zai-coding-plan.d.ts +149 -69
  93. package/dist/providers/zai.d.ts +84 -19
  94. package/dist/route/auth-options.d.ts +0 -3
  95. package/dist/route/auth.d.ts +0 -2
  96. package/dist/route/auth.js +0 -2
  97. package/dist/route/client.d.ts +0 -2
  98. package/dist/route/client.js +3 -4
  99. package/dist/route/executor-service.js +1 -1
  100. package/dist/speech-client.d.ts +8 -8
  101. package/dist/speech.d.ts +148 -148
  102. package/dist/transcription-client.d.ts +8 -8
  103. package/dist/transcription.d.ts +148 -148
  104. package/dist/video-client.d.ts +8 -8
  105. package/dist/video.d.ts +114 -114
  106. package/package.json +6 -5
@@ -40,11 +40,128 @@ export type Settings = ProviderPackage.Settings & ProviderOptionsInput & {
40
40
  };
41
41
  export declare const routes: (Route<{
42
42
  readonly model: string;
43
- readonly input: readonly ({
44
- readonly type: "compaction";
45
- readonly id?: string | null | undefined;
46
- readonly encrypted_content: string;
43
+ readonly messages: readonly ({
44
+ readonly role: "system";
45
+ readonly content: string | readonly ({
46
+ readonly type: "image_url";
47
+ readonly image_url: {
48
+ readonly url: string;
49
+ };
50
+ } | {
51
+ readonly type: "file";
52
+ readonly file: {
53
+ readonly filename: string;
54
+ readonly file_data: string;
55
+ };
56
+ } | {
57
+ readonly type: "text";
58
+ readonly text: string;
59
+ readonly cache_control?: {
60
+ readonly type: "ephemeral";
61
+ readonly ttl?: string | undefined;
62
+ } | undefined;
63
+ })[];
64
+ } | {
65
+ readonly role: "user";
66
+ readonly content: string | readonly ({
67
+ readonly type: "image_url";
68
+ readonly image_url: {
69
+ readonly url: string;
70
+ };
71
+ } | {
72
+ readonly type: "file";
73
+ readonly file: {
74
+ readonly filename: string;
75
+ readonly file_data: string;
76
+ };
77
+ } | {
78
+ readonly type: "text";
79
+ readonly text: string;
80
+ readonly cache_control?: {
81
+ readonly type: "ephemeral";
82
+ readonly ttl?: string | undefined;
83
+ } | undefined;
84
+ })[];
85
+ } | {
86
+ readonly role: "tool";
87
+ readonly tool_call_id: string;
88
+ readonly content: string | readonly {
89
+ readonly type: "text";
90
+ readonly text: string;
91
+ readonly cache_control?: {
92
+ readonly type: "ephemeral";
93
+ readonly ttl?: string | undefined;
94
+ } | undefined;
95
+ }[];
47
96
  } | {
97
+ readonly [x: string]: unknown;
98
+ readonly role: "assistant";
99
+ readonly content: string | readonly {
100
+ readonly type: "text";
101
+ readonly text: string;
102
+ readonly cache_control?: {
103
+ readonly type: "ephemeral";
104
+ readonly ttl?: string | undefined;
105
+ } | undefined;
106
+ }[] | null;
107
+ readonly tool_calls?: readonly {
108
+ readonly id: string;
109
+ readonly type: "function";
110
+ readonly function: {
111
+ readonly name: string;
112
+ readonly arguments: string;
113
+ };
114
+ readonly extra_content?: {
115
+ readonly google: {
116
+ readonly thought_signature: string;
117
+ };
118
+ } | undefined;
119
+ }[] | undefined;
120
+ readonly reasoning_content?: string | undefined;
121
+ readonly reasoning?: string | undefined;
122
+ readonly reasoning_text?: string | undefined;
123
+ readonly reasoning_details?: unknown;
124
+ })[];
125
+ readonly tools?: readonly {
126
+ readonly type: "function";
127
+ readonly function: {
128
+ readonly name: string;
129
+ readonly description: string;
130
+ readonly parameters: {
131
+ readonly [x: string]: unknown;
132
+ };
133
+ readonly strict?: boolean | undefined;
134
+ };
135
+ readonly cache_control?: {
136
+ readonly type: "ephemeral";
137
+ readonly ttl?: string | undefined;
138
+ } | undefined;
139
+ }[] | undefined;
140
+ readonly tool_choice?: "auto" | "none" | "required" | {
141
+ readonly type: "function";
142
+ readonly function: {
143
+ readonly name: string;
144
+ };
145
+ } | undefined;
146
+ readonly stream: true;
147
+ readonly stream_options?: {
148
+ readonly include_usage: boolean;
149
+ } | undefined;
150
+ readonly store?: boolean | undefined;
151
+ readonly prompt_cache_key?: string | undefined;
152
+ readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
153
+ readonly tool_stream?: boolean | undefined;
154
+ readonly max_completion_tokens?: number | undefined;
155
+ readonly max_tokens?: number | undefined;
156
+ readonly temperature?: number | undefined;
157
+ readonly top_p?: number | undefined;
158
+ readonly frequency_penalty?: number | undefined;
159
+ readonly presence_penalty?: number | undefined;
160
+ readonly seed?: number | undefined;
161
+ readonly stop?: readonly string[] | undefined;
162
+ }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
163
+ readonly model: string;
164
+ readonly input: readonly ({
48
165
  readonly type: "configuration_update";
49
166
  readonly reasoning: {
50
167
  readonly effort: import("../schema/options.js").ReasoningEffort;
@@ -57,10 +174,45 @@ export declare const routes: (Route<{
57
174
  readonly type: "message";
58
175
  readonly role: "developer";
59
176
  readonly content: string;
177
+ } | {
178
+ readonly type: "function_call_output";
179
+ readonly call_id: string;
180
+ readonly output: string | readonly ({
181
+ readonly type: "input_text";
182
+ readonly text: string;
183
+ } | {
184
+ readonly type: "input_video";
185
+ readonly video_url: string;
186
+ } | {
187
+ readonly type: "input_image";
188
+ readonly image_url: string;
189
+ readonly detail?: string | undefined;
190
+ } | {
191
+ readonly type: "input_file";
192
+ readonly filename: string;
193
+ readonly detail?: string | undefined;
194
+ readonly file_data?: string | undefined;
195
+ readonly file_url?: string | undefined;
196
+ })[];
197
+ } | {
198
+ readonly type: "reasoning";
199
+ readonly id?: string | undefined;
200
+ readonly summary: readonly {
201
+ readonly type: "summary_text";
202
+ readonly text: string;
203
+ }[];
204
+ readonly encrypted_content?: string | null | undefined;
205
+ } | {
206
+ readonly type: "compaction";
207
+ readonly id?: string | null | undefined;
208
+ readonly encrypted_content: string;
60
209
  } | {
61
210
  readonly type: "message";
62
211
  readonly role: "user";
63
212
  readonly content: readonly ({
213
+ readonly type: "input_text";
214
+ readonly text: string;
215
+ } | {
64
216
  readonly type: "input_image";
65
217
  readonly image_url: string;
66
218
  readonly detail?: string | undefined;
@@ -70,9 +222,6 @@ export declare const routes: (Route<{
70
222
  readonly detail?: string | undefined;
71
223
  readonly file_data?: string | undefined;
72
224
  readonly file_url?: string | undefined;
73
- } | {
74
- readonly type: "input_text";
75
- readonly text: string;
76
225
  })[];
77
226
  readonly id?: string | undefined;
78
227
  readonly status?: string | undefined;
@@ -86,14 +235,6 @@ export declare const routes: (Route<{
86
235
  }[];
87
236
  readonly phase?: "commentary" | "final_answer" | null | undefined;
88
237
  readonly status?: string | undefined;
89
- } | {
90
- readonly type: "reasoning";
91
- readonly id?: string | undefined;
92
- readonly summary: readonly {
93
- readonly type: "summary_text";
94
- readonly text: string;
95
- }[];
96
- readonly encrypted_content?: string | null | undefined;
97
238
  } | {
98
239
  readonly type: "function_call";
99
240
  readonly id?: string | undefined;
@@ -101,26 +242,6 @@ export declare const routes: (Route<{
101
242
  readonly name: string;
102
243
  readonly namespace?: string | undefined;
103
244
  readonly arguments: string;
104
- } | {
105
- readonly type: "function_call_output";
106
- readonly call_id: string;
107
- readonly output: string | readonly ({
108
- readonly type: "input_image";
109
- readonly image_url: string;
110
- readonly detail?: string | undefined;
111
- } | {
112
- readonly type: "input_file";
113
- readonly filename: string;
114
- readonly detail?: string | undefined;
115
- readonly file_data?: string | undefined;
116
- readonly file_url?: string | undefined;
117
- } | {
118
- readonly type: "input_text";
119
- readonly text: string;
120
- } | {
121
- readonly type: "input_video";
122
- readonly video_url: string;
123
- })[];
124
245
  } | {
125
246
  readonly [x: string]: unknown;
126
247
  readonly type: "web_search_call";
@@ -215,127 +336,6 @@ export declare const routes: (Route<{
215
336
  readonly presence_penalty?: number | undefined;
216
337
  readonly frequency_penalty?: number | undefined;
217
338
  readonly stream: true;
218
- }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
219
- readonly model: string;
220
- readonly messages: readonly ({
221
- readonly role: "system";
222
- readonly content: string | readonly ({
223
- readonly type: "text";
224
- readonly text: string;
225
- readonly cache_control?: {
226
- readonly type: "ephemeral";
227
- readonly ttl?: string | undefined;
228
- } | undefined;
229
- } | {
230
- readonly type: "image_url";
231
- readonly image_url: {
232
- readonly url: string;
233
- };
234
- } | {
235
- readonly type: "file";
236
- readonly file: {
237
- readonly filename: string;
238
- readonly file_data: string;
239
- };
240
- })[];
241
- } | {
242
- readonly role: "user";
243
- readonly content: string | readonly ({
244
- readonly type: "text";
245
- readonly text: string;
246
- readonly cache_control?: {
247
- readonly type: "ephemeral";
248
- readonly ttl?: string | undefined;
249
- } | undefined;
250
- } | {
251
- readonly type: "image_url";
252
- readonly image_url: {
253
- readonly url: string;
254
- };
255
- } | {
256
- readonly type: "file";
257
- readonly file: {
258
- readonly filename: string;
259
- readonly file_data: string;
260
- };
261
- })[];
262
- } | {
263
- readonly role: "tool";
264
- readonly tool_call_id: string;
265
- readonly content: string | readonly {
266
- readonly type: "text";
267
- readonly text: string;
268
- readonly cache_control?: {
269
- readonly type: "ephemeral";
270
- readonly ttl?: string | undefined;
271
- } | undefined;
272
- }[];
273
- } | {
274
- readonly [x: string]: unknown;
275
- readonly role: "assistant";
276
- readonly content: string | readonly {
277
- readonly type: "text";
278
- readonly text: string;
279
- readonly cache_control?: {
280
- readonly type: "ephemeral";
281
- readonly ttl?: string | undefined;
282
- } | undefined;
283
- }[] | null;
284
- readonly tool_calls?: readonly {
285
- readonly id: string;
286
- readonly type: "function";
287
- readonly function: {
288
- readonly name: string;
289
- readonly arguments: string;
290
- };
291
- readonly extra_content?: {
292
- readonly google: {
293
- readonly thought_signature: string;
294
- };
295
- } | undefined;
296
- }[] | undefined;
297
- readonly reasoning_content?: string | undefined;
298
- readonly reasoning?: string | undefined;
299
- readonly reasoning_text?: string | undefined;
300
- readonly reasoning_details?: unknown;
301
- })[];
302
- readonly tools?: readonly {
303
- readonly type: "function";
304
- readonly function: {
305
- readonly name: string;
306
- readonly description: string;
307
- readonly parameters: {
308
- readonly [x: string]: unknown;
309
- };
310
- readonly strict?: boolean | undefined;
311
- };
312
- readonly cache_control?: {
313
- readonly type: "ephemeral";
314
- readonly ttl?: string | undefined;
315
- } | undefined;
316
- }[] | undefined;
317
- readonly tool_choice?: "auto" | "none" | "required" | {
318
- readonly type: "function";
319
- readonly function: {
320
- readonly name: string;
321
- };
322
- } | undefined;
323
- readonly stream: true;
324
- readonly stream_options?: {
325
- readonly include_usage: boolean;
326
- } | undefined;
327
- readonly store?: boolean | undefined;
328
- readonly prompt_cache_key?: string | undefined;
329
- readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
330
- readonly tool_stream?: boolean | undefined;
331
- readonly max_completion_tokens?: number | undefined;
332
- readonly max_tokens?: number | undefined;
333
- readonly temperature?: number | undefined;
334
- readonly top_p?: number | undefined;
335
- readonly frequency_penalty?: number | undefined;
336
- readonly presence_penalty?: number | undefined;
337
- readonly seed?: number | undefined;
338
- readonly stop?: readonly string[] | undefined;
339
339
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
340
340
  readonly context_management?: {
341
341
  readonly edits: readonly {
@@ -478,23 +478,15 @@ export declare const routes: (Route<{
478
478
  } | {
479
479
  readonly role: "assistant";
480
480
  readonly content: readonly ({
481
+ readonly type: "compaction";
482
+ readonly content: string | null;
483
+ } | {
481
484
  readonly type: "text";
482
485
  readonly text: string;
483
486
  readonly cache_control?: {
484
487
  readonly type: "ephemeral";
485
488
  readonly ttl?: "1h" | "5m" | undefined;
486
489
  } | undefined;
487
- } | {
488
- readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
489
- readonly tool_use_id: string;
490
- readonly content: unknown;
491
- readonly cache_control?: {
492
- readonly type: "ephemeral";
493
- readonly ttl?: "1h" | "5m" | undefined;
494
- } | undefined;
495
- } | {
496
- readonly type: "compaction";
497
- readonly content: string | null;
498
490
  } | {
499
491
  readonly type: "thinking";
500
492
  readonly thinking: string;
@@ -528,6 +520,14 @@ export declare const routes: (Route<{
528
520
  readonly type: "ephemeral";
529
521
  readonly ttl?: "1h" | "5m" | undefined;
530
522
  } | undefined;
523
+ } | {
524
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
525
+ readonly tool_use_id: string;
526
+ readonly content: unknown;
527
+ readonly cache_control?: {
528
+ readonly type: "ephemeral";
529
+ readonly ttl?: "1h" | "5m" | undefined;
530
+ } | undefined;
531
531
  })[];
532
532
  } | {
533
533
  readonly role: "system";
@@ -558,6 +558,8 @@ export declare const routes: (Route<{
558
558
  readonly top_k?: number | undefined;
559
559
  readonly stop_sequences?: readonly string[] | undefined;
560
560
  readonly thinking?: {
561
+ readonly type: "between_tools" | "disabled";
562
+ } | {
561
563
  readonly display?: OpenString<"omitted" | "summarized"> | undefined;
562
564
  readonly block_binding?: {
563
565
  readonly prefix_mismatch_behavior?: OpenString<"drop_block" | "error"> | undefined;
@@ -570,8 +572,6 @@ export declare const routes: (Route<{
570
572
  readonly prefix_mismatch_behavior?: OpenString<"drop_block" | "error"> | undefined;
571
573
  } | undefined;
572
574
  readonly type: "adaptive";
573
- } | {
574
- readonly type: "between_tools" | "disabled";
575
575
  } | undefined;
576
576
  readonly output_config?: {
577
577
  readonly effort?: string | undefined;
@@ -598,16 +598,6 @@ export declare const routes: (Route<{
598
598
  } | undefined;
599
599
  readonly service_tier?: OpenString<"auto" | "standard_only"> | undefined;
600
600
  readonly tools?: readonly ({
601
- readonly name: string;
602
- readonly description: string;
603
- readonly input_schema: {
604
- readonly [x: string]: unknown;
605
- };
606
- readonly cache_control?: {
607
- readonly type: "ephemeral";
608
- readonly ttl?: "1h" | "5m" | undefined;
609
- } | undefined;
610
- } | {
611
601
  readonly type: "web_search";
612
602
  readonly name: "web_search";
613
603
  readonly user_location?: {
@@ -617,6 +607,16 @@ export declare const routes: (Route<{
617
607
  readonly country?: string | undefined;
618
608
  readonly timezone?: string | undefined;
619
609
  } | undefined;
610
+ } | {
611
+ readonly name: string;
612
+ readonly description: string;
613
+ readonly input_schema: {
614
+ readonly [x: string]: unknown;
615
+ };
616
+ readonly cache_control?: {
617
+ readonly type: "ephemeral";
618
+ readonly ttl?: "1h" | "5m" | undefined;
619
+ } | undefined;
620
620
  })[] | undefined;
621
621
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>)[];
622
622
  export declare const configure: (input?: LanguageModelOptions) => {
@@ -175,12 +175,30 @@ export declare const routes: (Route<{
175
175
  } | {
176
176
  readonly role: "assistant";
177
177
  readonly content: readonly ({
178
+ readonly type: "compaction";
179
+ readonly content: string | null;
180
+ } | {
178
181
  readonly type: "text";
179
182
  readonly text: string;
180
183
  readonly cache_control?: {
181
184
  readonly type: "ephemeral";
182
185
  readonly ttl?: "1h" | "5m" | undefined;
183
186
  } | undefined;
187
+ } | {
188
+ readonly type: "thinking";
189
+ readonly thinking: string;
190
+ readonly signature: string;
191
+ readonly cache_control?: {
192
+ readonly type: "ephemeral";
193
+ readonly ttl?: "1h" | "5m" | undefined;
194
+ } | undefined;
195
+ } | {
196
+ readonly type: "redacted_thinking";
197
+ readonly data: string;
198
+ readonly cache_control?: {
199
+ readonly type: "ephemeral";
200
+ readonly ttl?: "1h" | "5m" | undefined;
201
+ } | undefined;
184
202
  } | {
185
203
  readonly type: "tool_use";
186
204
  readonly id: string;
@@ -207,24 +225,6 @@ export declare const routes: (Route<{
207
225
  readonly type: "ephemeral";
208
226
  readonly ttl?: "1h" | "5m" | undefined;
209
227
  } | undefined;
210
- } | {
211
- readonly type: "compaction";
212
- readonly content: string | null;
213
- } | {
214
- readonly type: "thinking";
215
- readonly thinking: string;
216
- readonly signature: string;
217
- readonly cache_control?: {
218
- readonly type: "ephemeral";
219
- readonly ttl?: "1h" | "5m" | undefined;
220
- } | undefined;
221
- } | {
222
- readonly type: "redacted_thinking";
223
- readonly data: string;
224
- readonly cache_control?: {
225
- readonly type: "ephemeral";
226
- readonly ttl?: "1h" | "5m" | undefined;
227
- } | undefined;
228
228
  })[];
229
229
  } | {
230
230
  readonly role: "system";
@@ -266,6 +266,8 @@ export declare const routes: (Route<{
266
266
  readonly top_k?: number | undefined;
267
267
  readonly stop_sequences?: readonly string[] | undefined;
268
268
  readonly thinking?: {
269
+ readonly type: "between_tools" | "disabled";
270
+ } | {
269
271
  readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
270
272
  readonly block_binding?: {
271
273
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
@@ -278,8 +280,6 @@ export declare const routes: (Route<{
278
280
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
279
281
  } | undefined;
280
282
  readonly type: "adaptive";
281
- } | {
282
- readonly type: "between_tools" | "disabled";
283
283
  } | undefined;
284
284
  readonly output_config?: {
285
285
  readonly effort?: string | undefined;
@@ -308,14 +308,6 @@ export declare const routes: (Route<{
308
308
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
309
309
  readonly model: string;
310
310
  readonly input: readonly ({
311
- readonly [x: string]: unknown;
312
- readonly type: string;
313
- readonly id: string;
314
- } | {
315
- readonly type: "compaction";
316
- readonly id?: string | null | undefined;
317
- readonly encrypted_content: string;
318
- } | {
319
311
  readonly type: "configuration_update";
320
312
  readonly reasoning: {
321
313
  readonly effort: import("../schema/options.js").ReasoningEffort;
@@ -328,10 +320,45 @@ export declare const routes: (Route<{
328
320
  readonly type: "message";
329
321
  readonly role: "developer";
330
322
  readonly content: string;
323
+ } | {
324
+ readonly type: "function_call_output";
325
+ readonly call_id: string;
326
+ readonly output: string | readonly ({
327
+ readonly type: "input_text";
328
+ readonly text: string;
329
+ } | {
330
+ readonly type: "input_video";
331
+ readonly video_url: string;
332
+ } | {
333
+ readonly type: "input_image";
334
+ readonly image_url: string;
335
+ readonly detail?: string | undefined;
336
+ } | {
337
+ readonly type: "input_file";
338
+ readonly filename: string;
339
+ readonly detail?: string | undefined;
340
+ readonly file_data?: string | undefined;
341
+ readonly file_url?: string | undefined;
342
+ })[];
343
+ } | {
344
+ readonly type: "reasoning";
345
+ readonly id?: string | undefined;
346
+ readonly summary: readonly {
347
+ readonly type: "summary_text";
348
+ readonly text: string;
349
+ }[];
350
+ readonly encrypted_content?: string | null | undefined;
351
+ } | {
352
+ readonly type: "compaction";
353
+ readonly id?: string | null | undefined;
354
+ readonly encrypted_content: string;
331
355
  } | {
332
356
  readonly type: "message";
333
357
  readonly role: "user";
334
358
  readonly content: readonly ({
359
+ readonly type: "input_text";
360
+ readonly text: string;
361
+ } | {
335
362
  readonly type: "input_image";
336
363
  readonly image_url: string;
337
364
  readonly detail?: string | undefined;
@@ -341,9 +368,6 @@ export declare const routes: (Route<{
341
368
  readonly detail?: string | undefined;
342
369
  readonly file_data?: string | undefined;
343
370
  readonly file_url?: string | undefined;
344
- } | {
345
- readonly type: "input_text";
346
- readonly text: string;
347
371
  })[];
348
372
  readonly id?: string | undefined;
349
373
  readonly status?: string | undefined;
@@ -357,14 +381,6 @@ export declare const routes: (Route<{
357
381
  }[];
358
382
  readonly phase?: "commentary" | "final_answer" | null | undefined;
359
383
  readonly status?: string | undefined;
360
- } | {
361
- readonly type: "reasoning";
362
- readonly id?: string | undefined;
363
- readonly summary: readonly {
364
- readonly type: "summary_text";
365
- readonly text: string;
366
- }[];
367
- readonly encrypted_content?: string | null | undefined;
368
384
  } | {
369
385
  readonly type: "function_call";
370
386
  readonly id?: string | undefined;
@@ -372,26 +388,6 @@ export declare const routes: (Route<{
372
388
  readonly name: string;
373
389
  readonly namespace?: string | undefined;
374
390
  readonly arguments: string;
375
- } | {
376
- readonly type: "function_call_output";
377
- readonly call_id: string;
378
- readonly output: string | readonly ({
379
- readonly type: "input_image";
380
- readonly image_url: string;
381
- readonly detail?: string | undefined;
382
- } | {
383
- readonly type: "input_file";
384
- readonly filename: string;
385
- readonly detail?: string | undefined;
386
- readonly file_data?: string | undefined;
387
- readonly file_url?: string | undefined;
388
- } | {
389
- readonly type: "input_text";
390
- readonly text: string;
391
- } | {
392
- readonly type: "input_video";
393
- readonly video_url: string;
394
- })[];
395
391
  } | {
396
392
  readonly [x: string]: unknown;
397
393
  readonly type: "web_search_call";
@@ -429,6 +425,10 @@ export declare const routes: (Route<{
429
425
  readonly arguments?: string | undefined;
430
426
  readonly output?: string | null | undefined;
431
427
  readonly error?: unknown;
428
+ } | {
429
+ readonly [x: string]: unknown;
430
+ readonly type: string;
431
+ readonly id: string;
432
432
  })[];
433
433
  readonly instructions?: string | undefined;
434
434
  readonly tools?: readonly ({
@@ -487,13 +487,6 @@ export declare const routes: (Route<{
487
487
  readonly messages: readonly ({
488
488
  readonly role: "system";
489
489
  readonly content: string | readonly ({
490
- readonly type: "text";
491
- readonly text: string;
492
- readonly cache_control?: {
493
- readonly type: "ephemeral";
494
- readonly ttl?: string | undefined;
495
- } | undefined;
496
- } | {
497
490
  readonly type: "image_url";
498
491
  readonly image_url: {
499
492
  readonly url: string;
@@ -504,17 +497,17 @@ export declare const routes: (Route<{
504
497
  readonly filename: string;
505
498
  readonly file_data: string;
506
499
  };
507
- })[];
508
- } | {
509
- readonly role: "user";
510
- readonly content: string | readonly ({
500
+ } | {
511
501
  readonly type: "text";
512
502
  readonly text: string;
513
503
  readonly cache_control?: {
514
504
  readonly type: "ephemeral";
515
505
  readonly ttl?: string | undefined;
516
506
  } | undefined;
517
- } | {
507
+ })[];
508
+ } | {
509
+ readonly role: "user";
510
+ readonly content: string | readonly ({
518
511
  readonly type: "image_url";
519
512
  readonly image_url: {
520
513
  readonly url: string;
@@ -525,6 +518,13 @@ export declare const routes: (Route<{
525
518
  readonly filename: string;
526
519
  readonly file_data: string;
527
520
  };
521
+ } | {
522
+ readonly type: "text";
523
+ readonly text: string;
524
+ readonly cache_control?: {
525
+ readonly type: "ephemeral";
526
+ readonly ttl?: string | undefined;
527
+ } | undefined;
528
528
  })[];
529
529
  } | {
530
530
  readonly role: "tool";