@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
@@ -57,13 +57,6 @@ export declare const routes: Route<{
57
57
  readonly messages: readonly ({
58
58
  readonly role: "system";
59
59
  readonly content: string | readonly ({
60
- readonly type: "text";
61
- readonly text: string;
62
- readonly cache_control?: {
63
- readonly type: "ephemeral";
64
- readonly ttl?: string | undefined;
65
- } | undefined;
66
- } | {
67
60
  readonly type: "image_url";
68
61
  readonly image_url: {
69
62
  readonly url: string;
@@ -74,17 +67,17 @@ export declare const routes: Route<{
74
67
  readonly filename: string;
75
68
  readonly file_data: string;
76
69
  };
77
- })[];
78
- } | {
79
- readonly role: "user";
80
- readonly content: string | readonly ({
70
+ } | {
81
71
  readonly type: "text";
82
72
  readonly text: string;
83
73
  readonly cache_control?: {
84
74
  readonly type: "ephemeral";
85
75
  readonly ttl?: string | undefined;
86
76
  } | undefined;
87
- } | {
77
+ })[];
78
+ } | {
79
+ readonly role: "user";
80
+ readonly content: string | readonly ({
88
81
  readonly type: "image_url";
89
82
  readonly image_url: {
90
83
  readonly url: string;
@@ -95,6 +88,13 @@ export declare const routes: Route<{
95
88
  readonly filename: string;
96
89
  readonly file_data: string;
97
90
  };
91
+ } | {
92
+ readonly type: "text";
93
+ readonly text: string;
94
+ readonly cache_control?: {
95
+ readonly type: "ephemeral";
96
+ readonly ttl?: string | undefined;
97
+ } | undefined;
98
98
  })[];
99
99
  } | {
100
100
  readonly role: "tool";
@@ -139,14 +139,14 @@ export declare const routes: Route<{
139
139
  readonly thought_signature?: string | undefined;
140
140
  })[];
141
141
  readonly reasoning?: {
142
- readonly effort?: string | undefined;
142
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
143
143
  readonly enabled?: boolean | undefined;
144
- readonly summary?: string | undefined;
144
+ readonly summary?: import("../schema/options.js").OpenString<"auto" | "concise" | "detailed"> | undefined;
145
145
  } | undefined;
146
146
  readonly venice_parameters: {
147
147
  readonly [x: string]: string | boolean;
148
148
  };
149
- readonly prompt_cache_retention?: string | undefined;
149
+ readonly prompt_cache_retention?: import("../schema/options.js").OpenString<"24h" | "default" | "extended"> | undefined;
150
150
  readonly parallel_tool_calls?: boolean | undefined;
151
151
  readonly min_p?: number | undefined;
152
152
  readonly top_k?: number | undefined;
@@ -163,16 +163,191 @@ export declare const routes: Route<{
163
163
  }, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
164
164
  export declare const configure: (input?: Config) => {
165
165
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
166
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
167
- chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
166
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
167
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
168
+ readonly reasoning?: {
169
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
170
+ readonly enabled?: boolean | undefined;
171
+ readonly summary?: import("../schema/options.js").OpenString<"auto" | "concise" | "detailed"> | undefined;
172
+ } | undefined;
173
+ readonly veniceParameters?: {
174
+ readonly enableWebSearch?: import("../schema/options.js").OpenString<"auto" | "off" | "on"> | undefined;
175
+ readonly enableWebScraping?: boolean | undefined;
176
+ readonly enableWebCitations?: boolean | undefined;
177
+ readonly enableXSearch?: boolean | undefined;
178
+ readonly stripThinkingResponse?: boolean | undefined;
179
+ readonly disableThinking?: boolean | undefined;
180
+ readonly includeVeniceSystemPrompt?: boolean | undefined;
181
+ readonly characterSlug?: string | undefined;
182
+ readonly includeSearchResultsInStream?: boolean | undefined;
183
+ readonly returnSearchResultsAsDocuments?: boolean | undefined;
184
+ } | undefined;
185
+ readonly promptCacheKey?: string | undefined;
186
+ readonly promptCacheRetention?: import("../schema/options.js").OpenString<"24h" | "default" | "extended"> | undefined;
187
+ readonly parallelToolCalls?: boolean | undefined;
188
+ readonly maxCompletionTokens?: number | undefined;
189
+ readonly maxTokens?: number | undefined;
190
+ readonly minP?: number | undefined;
191
+ readonly repetitionPenalty?: number | undefined;
192
+ readonly stopTokenIds?: readonly number[] | undefined;
193
+ readonly logprobs?: boolean | undefined;
194
+ readonly topLogprobs?: number | undefined;
195
+ readonly maxTemp?: number | undefined;
196
+ readonly minTemp?: number | undefined;
197
+ readonly responseFormat?: {
198
+ readonly [x: string]: unknown;
199
+ } | undefined;
200
+ readonly user?: string | undefined;
201
+ }, import("../route/client.js").CompactionOperations | undefined>;
202
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
203
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
204
+ readonly reasoning?: {
205
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
206
+ readonly enabled?: boolean | undefined;
207
+ readonly summary?: import("../schema/options.js").OpenString<"auto" | "concise" | "detailed"> | undefined;
208
+ } | undefined;
209
+ readonly veniceParameters?: {
210
+ readonly enableWebSearch?: import("../schema/options.js").OpenString<"auto" | "off" | "on"> | undefined;
211
+ readonly enableWebScraping?: boolean | undefined;
212
+ readonly enableWebCitations?: boolean | undefined;
213
+ readonly enableXSearch?: boolean | undefined;
214
+ readonly stripThinkingResponse?: boolean | undefined;
215
+ readonly disableThinking?: boolean | undefined;
216
+ readonly includeVeniceSystemPrompt?: boolean | undefined;
217
+ readonly characterSlug?: string | undefined;
218
+ readonly includeSearchResultsInStream?: boolean | undefined;
219
+ readonly returnSearchResultsAsDocuments?: boolean | undefined;
220
+ } | undefined;
221
+ readonly promptCacheKey?: string | undefined;
222
+ readonly promptCacheRetention?: import("../schema/options.js").OpenString<"24h" | "default" | "extended"> | undefined;
223
+ readonly parallelToolCalls?: boolean | undefined;
224
+ readonly maxCompletionTokens?: number | undefined;
225
+ readonly maxTokens?: number | undefined;
226
+ readonly minP?: number | undefined;
227
+ readonly repetitionPenalty?: number | undefined;
228
+ readonly stopTokenIds?: readonly number[] | undefined;
229
+ readonly logprobs?: boolean | undefined;
230
+ readonly topLogprobs?: number | undefined;
231
+ readonly maxTemp?: number | undefined;
232
+ readonly minTemp?: number | undefined;
233
+ readonly responseFormat?: {
234
+ readonly [x: string]: unknown;
235
+ } | undefined;
236
+ readonly user?: string | undefined;
237
+ }, import("../route/client.js").CompactionOperations | undefined>;
168
238
  configure: typeof configure;
169
239
  };
170
240
  export declare const provider: {
171
241
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
172
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
173
- chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
242
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
243
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
244
+ readonly reasoning?: {
245
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
246
+ readonly enabled?: boolean | undefined;
247
+ readonly summary?: import("../schema/options.js").OpenString<"auto" | "concise" | "detailed"> | undefined;
248
+ } | undefined;
249
+ readonly veniceParameters?: {
250
+ readonly enableWebSearch?: import("../schema/options.js").OpenString<"auto" | "off" | "on"> | undefined;
251
+ readonly enableWebScraping?: boolean | undefined;
252
+ readonly enableWebCitations?: boolean | undefined;
253
+ readonly enableXSearch?: boolean | undefined;
254
+ readonly stripThinkingResponse?: boolean | undefined;
255
+ readonly disableThinking?: boolean | undefined;
256
+ readonly includeVeniceSystemPrompt?: boolean | undefined;
257
+ readonly characterSlug?: string | undefined;
258
+ readonly includeSearchResultsInStream?: boolean | undefined;
259
+ readonly returnSearchResultsAsDocuments?: boolean | undefined;
260
+ } | undefined;
261
+ readonly promptCacheKey?: string | undefined;
262
+ readonly promptCacheRetention?: import("../schema/options.js").OpenString<"24h" | "default" | "extended"> | undefined;
263
+ readonly parallelToolCalls?: boolean | undefined;
264
+ readonly maxCompletionTokens?: number | undefined;
265
+ readonly maxTokens?: number | undefined;
266
+ readonly minP?: number | undefined;
267
+ readonly repetitionPenalty?: number | undefined;
268
+ readonly stopTokenIds?: readonly number[] | undefined;
269
+ readonly logprobs?: boolean | undefined;
270
+ readonly topLogprobs?: number | undefined;
271
+ readonly maxTemp?: number | undefined;
272
+ readonly minTemp?: number | undefined;
273
+ readonly responseFormat?: {
274
+ readonly [x: string]: unknown;
275
+ } | undefined;
276
+ readonly user?: string | undefined;
277
+ }, import("../route/client.js").CompactionOperations | undefined>;
278
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
279
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
280
+ readonly reasoning?: {
281
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
282
+ readonly enabled?: boolean | undefined;
283
+ readonly summary?: import("../schema/options.js").OpenString<"auto" | "concise" | "detailed"> | undefined;
284
+ } | undefined;
285
+ readonly veniceParameters?: {
286
+ readonly enableWebSearch?: import("../schema/options.js").OpenString<"auto" | "off" | "on"> | undefined;
287
+ readonly enableWebScraping?: boolean | undefined;
288
+ readonly enableWebCitations?: boolean | undefined;
289
+ readonly enableXSearch?: boolean | undefined;
290
+ readonly stripThinkingResponse?: boolean | undefined;
291
+ readonly disableThinking?: boolean | undefined;
292
+ readonly includeVeniceSystemPrompt?: boolean | undefined;
293
+ readonly characterSlug?: string | undefined;
294
+ readonly includeSearchResultsInStream?: boolean | undefined;
295
+ readonly returnSearchResultsAsDocuments?: boolean | undefined;
296
+ } | undefined;
297
+ readonly promptCacheKey?: string | undefined;
298
+ readonly promptCacheRetention?: import("../schema/options.js").OpenString<"24h" | "default" | "extended"> | undefined;
299
+ readonly parallelToolCalls?: boolean | undefined;
300
+ readonly maxCompletionTokens?: number | undefined;
301
+ readonly maxTokens?: number | undefined;
302
+ readonly minP?: number | undefined;
303
+ readonly repetitionPenalty?: number | undefined;
304
+ readonly stopTokenIds?: readonly number[] | undefined;
305
+ readonly logprobs?: boolean | undefined;
306
+ readonly topLogprobs?: number | undefined;
307
+ readonly maxTemp?: number | undefined;
308
+ readonly minTemp?: number | undefined;
309
+ readonly responseFormat?: {
310
+ readonly [x: string]: unknown;
311
+ } | undefined;
312
+ readonly user?: string | undefined;
313
+ }, import("../route/client.js").CompactionOperations | undefined>;
174
314
  configure: typeof configure;
175
315
  };
176
- export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<VeniceChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
316
+ export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
317
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
318
+ readonly reasoning?: {
319
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
320
+ readonly enabled?: boolean | undefined;
321
+ readonly summary?: import("../schema/options.js").OpenString<"auto" | "concise" | "detailed"> | undefined;
322
+ } | undefined;
323
+ readonly veniceParameters?: {
324
+ readonly enableWebSearch?: import("../schema/options.js").OpenString<"auto" | "off" | "on"> | undefined;
325
+ readonly enableWebScraping?: boolean | undefined;
326
+ readonly enableWebCitations?: boolean | undefined;
327
+ readonly enableXSearch?: boolean | undefined;
328
+ readonly stripThinkingResponse?: boolean | undefined;
329
+ readonly disableThinking?: boolean | undefined;
330
+ readonly includeVeniceSystemPrompt?: boolean | undefined;
331
+ readonly characterSlug?: string | undefined;
332
+ readonly includeSearchResultsInStream?: boolean | undefined;
333
+ readonly returnSearchResultsAsDocuments?: boolean | undefined;
334
+ } | undefined;
335
+ readonly promptCacheKey?: string | undefined;
336
+ readonly promptCacheRetention?: import("../schema/options.js").OpenString<"24h" | "default" | "extended"> | undefined;
337
+ readonly parallelToolCalls?: boolean | undefined;
338
+ readonly maxCompletionTokens?: number | undefined;
339
+ readonly maxTokens?: number | undefined;
340
+ readonly minP?: number | undefined;
341
+ readonly repetitionPenalty?: number | undefined;
342
+ readonly stopTokenIds?: readonly number[] | undefined;
343
+ readonly logprobs?: boolean | undefined;
344
+ readonly topLogprobs?: number | undefined;
345
+ readonly maxTemp?: number | undefined;
346
+ readonly minTemp?: number | undefined;
347
+ readonly responseFormat?: {
348
+ readonly [x: string]: unknown;
349
+ } | undefined;
350
+ readonly user?: string | undefined;
351
+ }, import("../route/client.js").CompactionOperations | undefined>;
177
352
  export declare const model: ProviderPackage.Definition<Settings, ChatOptionsInput>["model"];
178
353
  export * as Venice from "./venice.js";
@@ -27,13 +27,6 @@ export declare const routes: (Route<unknown, import("../protocols/open-responses
27
27
  readonly messages: readonly ({
28
28
  readonly role: "system";
29
29
  readonly content: string | readonly ({
30
- readonly type: "text";
31
- readonly text: string;
32
- readonly cache_control?: {
33
- readonly type: "ephemeral";
34
- readonly ttl?: string | undefined;
35
- } | undefined;
36
- } | {
37
30
  readonly type: "image_url";
38
31
  readonly image_url: {
39
32
  readonly url: string;
@@ -44,17 +37,17 @@ export declare const routes: (Route<unknown, import("../protocols/open-responses
44
37
  readonly filename: string;
45
38
  readonly file_data: string;
46
39
  };
47
- })[];
48
- } | {
49
- readonly role: "user";
50
- readonly content: string | readonly ({
40
+ } | {
51
41
  readonly type: "text";
52
42
  readonly text: string;
53
43
  readonly cache_control?: {
54
44
  readonly type: "ephemeral";
55
45
  readonly ttl?: string | undefined;
56
46
  } | undefined;
57
- } | {
47
+ })[];
48
+ } | {
49
+ readonly role: "user";
50
+ readonly content: string | readonly ({
58
51
  readonly type: "image_url";
59
52
  readonly image_url: {
60
53
  readonly url: string;
@@ -65,6 +58,13 @@ export declare const routes: (Route<unknown, import("../protocols/open-responses
65
58
  readonly filename: string;
66
59
  readonly file_data: string;
67
60
  };
61
+ } | {
62
+ readonly type: "text";
63
+ readonly text: string;
64
+ readonly cache_control?: {
65
+ readonly type: "ephemeral";
66
+ readonly ttl?: string | undefined;
67
+ } | undefined;
68
68
  })[];
69
69
  } | {
70
70
  readonly role: "tool";
@@ -22,10 +22,6 @@ export type Settings<Options = ChatOptionsInput> = ProviderPackage.Settings & Op
22
22
  export declare const routes: (Route<{
23
23
  readonly model: string;
24
24
  readonly input: readonly ({
25
- readonly type: "compaction";
26
- readonly id?: string | null | undefined;
27
- readonly encrypted_content: string;
28
- } | {
29
25
  readonly type: "configuration_update";
30
26
  readonly reasoning: {
31
27
  readonly effort: import("../schema/options.js").ReasoningEffort;
@@ -38,10 +34,45 @@ export declare const routes: (Route<{
38
34
  readonly type: "message";
39
35
  readonly role: "developer";
40
36
  readonly content: string;
37
+ } | {
38
+ readonly type: "function_call_output";
39
+ readonly call_id: string;
40
+ readonly output: string | readonly ({
41
+ readonly type: "input_text";
42
+ readonly text: string;
43
+ } | {
44
+ readonly type: "input_video";
45
+ readonly video_url: string;
46
+ } | {
47
+ readonly type: "input_image";
48
+ readonly image_url: string;
49
+ readonly detail?: string | undefined;
50
+ } | {
51
+ readonly type: "input_file";
52
+ readonly filename: string;
53
+ readonly detail?: string | undefined;
54
+ readonly file_data?: string | undefined;
55
+ readonly file_url?: string | undefined;
56
+ })[];
57
+ } | {
58
+ readonly type: "reasoning";
59
+ readonly id?: string | undefined;
60
+ readonly summary: readonly {
61
+ readonly type: "summary_text";
62
+ readonly text: string;
63
+ }[];
64
+ readonly encrypted_content?: string | null | undefined;
65
+ } | {
66
+ readonly type: "compaction";
67
+ readonly id?: string | null | undefined;
68
+ readonly encrypted_content: string;
41
69
  } | {
42
70
  readonly type: "message";
43
71
  readonly role: "user";
44
72
  readonly content: readonly ({
73
+ readonly type: "input_text";
74
+ readonly text: string;
75
+ } | {
45
76
  readonly type: "input_image";
46
77
  readonly image_url: string;
47
78
  readonly detail?: string | undefined;
@@ -51,9 +82,6 @@ export declare const routes: (Route<{
51
82
  readonly detail?: string | undefined;
52
83
  readonly file_data?: string | undefined;
53
84
  readonly file_url?: string | undefined;
54
- } | {
55
- readonly type: "input_text";
56
- readonly text: string;
57
85
  })[];
58
86
  readonly id?: string | undefined;
59
87
  readonly status?: string | undefined;
@@ -67,14 +95,6 @@ export declare const routes: (Route<{
67
95
  }[];
68
96
  readonly phase?: "commentary" | "final_answer" | null | undefined;
69
97
  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;
78
98
  } | {
79
99
  readonly type: "function_call";
80
100
  readonly id?: string | undefined;
@@ -82,26 +102,6 @@ export declare const routes: (Route<{
82
102
  readonly name: string;
83
103
  readonly namespace?: string | undefined;
84
104
  readonly arguments: string;
85
- } | {
86
- readonly type: "function_call_output";
87
- readonly call_id: string;
88
- readonly output: string | readonly ({
89
- readonly type: "input_image";
90
- readonly image_url: string;
91
- readonly detail?: string | undefined;
92
- } | {
93
- readonly type: "input_file";
94
- readonly filename: string;
95
- readonly detail?: string | undefined;
96
- readonly file_data?: string | undefined;
97
- readonly file_url?: string | undefined;
98
- } | {
99
- readonly type: "input_text";
100
- readonly text: string;
101
- } | {
102
- readonly type: "input_video";
103
- readonly video_url: string;
104
- })[];
105
105
  } | {
106
106
  readonly [x: string]: unknown;
107
107
  readonly type: "web_search_call";
@@ -201,13 +201,6 @@ export declare const routes: (Route<{
201
201
  readonly messages: readonly ({
202
202
  readonly role: "system";
203
203
  readonly content: string | readonly ({
204
- readonly type: "text";
205
- readonly text: string;
206
- readonly cache_control?: {
207
- readonly type: "ephemeral";
208
- readonly ttl?: string | undefined;
209
- } | undefined;
210
- } | {
211
204
  readonly type: "image_url";
212
205
  readonly image_url: {
213
206
  readonly url: string;
@@ -218,17 +211,17 @@ export declare const routes: (Route<{
218
211
  readonly filename: string;
219
212
  readonly file_data: string;
220
213
  };
221
- })[];
222
- } | {
223
- readonly role: "user";
224
- readonly content: string | readonly ({
214
+ } | {
225
215
  readonly type: "text";
226
216
  readonly text: string;
227
217
  readonly cache_control?: {
228
218
  readonly type: "ephemeral";
229
219
  readonly ttl?: string | undefined;
230
220
  } | undefined;
231
- } | {
221
+ })[];
222
+ } | {
223
+ readonly role: "user";
224
+ readonly content: string | readonly ({
232
225
  readonly type: "image_url";
233
226
  readonly image_url: {
234
227
  readonly url: string;
@@ -239,6 +232,13 @@ export declare const routes: (Route<{
239
232
  readonly filename: string;
240
233
  readonly file_data: string;
241
234
  };
235
+ } | {
236
+ readonly type: "text";
237
+ readonly text: string;
238
+ readonly cache_control?: {
239
+ readonly type: "ephemeral";
240
+ readonly ttl?: string | undefined;
241
+ } | undefined;
242
242
  })[];
243
243
  } | {
244
244
  readonly role: "tool";
@@ -318,12 +318,12 @@ export declare const routes: (Route<{
318
318
  readonly seed?: number | undefined;
319
319
  readonly stop?: readonly string[] | undefined;
320
320
  readonly thinking?: {
321
- readonly type?: string | undefined;
321
+ readonly type?: import("../schema/options.js").OpenString<"disabled" | "enabled"> | undefined;
322
322
  readonly clear_thinking?: boolean | undefined;
323
323
  } | undefined;
324
324
  readonly do_sample?: boolean | undefined;
325
325
  readonly response_format?: {
326
- readonly type: string;
326
+ readonly type: import("../schema/options.js").OpenString<"json_object" | "text">;
327
327
  } | undefined;
328
328
  readonly request_id?: string | undefined;
329
329
  readonly user_id?: string | undefined;
@@ -469,23 +469,15 @@ export declare const routes: (Route<{
469
469
  } | {
470
470
  readonly role: "assistant";
471
471
  readonly content: readonly ({
472
+ readonly type: "compaction";
473
+ readonly content: string | null;
474
+ } | {
472
475
  readonly type: "text";
473
476
  readonly text: string;
474
477
  readonly cache_control?: {
475
478
  readonly type: "ephemeral";
476
479
  readonly ttl?: "1h" | "5m" | undefined;
477
480
  } | undefined;
478
- } | {
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;
482
- readonly cache_control?: {
483
- readonly type: "ephemeral";
484
- readonly ttl?: "1h" | "5m" | undefined;
485
- } | undefined;
486
- } | {
487
- readonly type: "compaction";
488
- readonly content: string | null;
489
481
  } | {
490
482
  readonly type: "thinking";
491
483
  readonly thinking: string;
@@ -519,6 +511,14 @@ export declare const routes: (Route<{
519
511
  readonly type: "ephemeral";
520
512
  readonly ttl?: "1h" | "5m" | undefined;
521
513
  } | undefined;
514
+ } | {
515
+ readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
516
+ readonly tool_use_id: string;
517
+ readonly content: unknown;
518
+ readonly cache_control?: {
519
+ readonly type: "ephemeral";
520
+ readonly ttl?: "1h" | "5m" | undefined;
521
+ } | undefined;
522
522
  })[];
523
523
  } | {
524
524
  readonly role: "system";
@@ -584,27 +584,107 @@ export declare const routes: (Route<{
584
584
  } | undefined;
585
585
  readonly service_tier?: import("../schema/options.js").OpenString<"auto" | "standard_only"> | undefined;
586
586
  readonly thinking?: {
587
- readonly type: string;
587
+ readonly type: import("../schema/options.js").OpenString<"adaptive" | "disabled" | "enabled">;
588
588
  } | 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">;
592
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
593
- chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
594
- messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIMessages.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
592
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
593
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
594
+ readonly thinking?: {
595
+ readonly type?: import("../schema/options.js").OpenString<"disabled" | "enabled"> | undefined;
596
+ readonly clear_thinking?: boolean | undefined;
597
+ } | undefined;
598
+ readonly toolStream?: boolean | undefined;
599
+ readonly doSample?: boolean | undefined;
600
+ readonly responseFormat?: {
601
+ readonly type: import("../schema/options.js").OpenString<"json_object" | "text">;
602
+ } | undefined;
603
+ readonly requestID?: string | undefined;
604
+ readonly userID?: string | undefined;
605
+ }, import("../route/client.js").CompactionOperations | undefined>;
606
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
607
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
608
+ readonly thinking?: {
609
+ readonly type?: import("../schema/options.js").OpenString<"disabled" | "enabled"> | undefined;
610
+ readonly clear_thinking?: boolean | undefined;
611
+ } | undefined;
612
+ readonly toolStream?: boolean | undefined;
613
+ readonly doSample?: boolean | undefined;
614
+ readonly responseFormat?: {
615
+ readonly type: import("../schema/options.js").OpenString<"json_object" | "text">;
616
+ } | undefined;
617
+ readonly requestID?: string | undefined;
618
+ readonly userID?: string | undefined;
619
+ }, import("../route/client.js").CompactionOperations | undefined>;
620
+ messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
621
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
622
+ readonly thinking?: {
623
+ readonly type: import("../schema/options.js").OpenString<"adaptive" | "disabled" | "enabled">;
624
+ } | undefined;
625
+ }, import("../route/client.js").CompactionOperations | undefined>;
595
626
  responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
596
627
  configure: typeof configure;
597
628
  };
598
629
  export declare const provider: {
599
630
  id: string & import("effect/Brand").Brand<"AI.ProviderID">;
600
- model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
601
- chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
602
- messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIMessages.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
631
+ model: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
632
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
633
+ readonly thinking?: {
634
+ readonly type?: import("../schema/options.js").OpenString<"disabled" | "enabled"> | undefined;
635
+ readonly clear_thinking?: boolean | undefined;
636
+ } | undefined;
637
+ readonly toolStream?: boolean | undefined;
638
+ readonly doSample?: boolean | undefined;
639
+ readonly responseFormat?: {
640
+ readonly type: import("../schema/options.js").OpenString<"json_object" | "text">;
641
+ } | undefined;
642
+ readonly requestID?: string | undefined;
643
+ readonly userID?: string | undefined;
644
+ }, import("../route/client.js").CompactionOperations | undefined>;
645
+ chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
646
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
647
+ readonly thinking?: {
648
+ readonly type?: import("../schema/options.js").OpenString<"disabled" | "enabled"> | undefined;
649
+ readonly clear_thinking?: boolean | undefined;
650
+ } | undefined;
651
+ readonly toolStream?: boolean | undefined;
652
+ readonly doSample?: boolean | undefined;
653
+ readonly responseFormat?: {
654
+ readonly type: import("../schema/options.js").OpenString<"json_object" | "text">;
655
+ } | undefined;
656
+ readonly requestID?: string | undefined;
657
+ readonly userID?: string | undefined;
658
+ }, import("../route/client.js").CompactionOperations | undefined>;
659
+ messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
660
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
661
+ readonly thinking?: {
662
+ readonly type: import("../schema/options.js").OpenString<"adaptive" | "disabled" | "enabled">;
663
+ } | undefined;
664
+ }, import("../route/client.js").CompactionOperations | undefined>;
603
665
  responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
604
666
  configure: typeof configure;
605
667
  };
606
- export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIChat.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
607
- export declare const messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ZAIMessages.OptionsInput, import("../route/client.js").CompactionOperations | undefined>;
668
+ export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
669
+ readonly reasoningEffort?: import("../schema/options.js").ReasoningEffort | undefined;
670
+ readonly thinking?: {
671
+ readonly type?: import("../schema/options.js").OpenString<"disabled" | "enabled"> | undefined;
672
+ readonly clear_thinking?: boolean | undefined;
673
+ } | undefined;
674
+ readonly toolStream?: boolean | undefined;
675
+ readonly doSample?: boolean | undefined;
676
+ readonly responseFormat?: {
677
+ readonly type: import("../schema/options.js").OpenString<"json_object" | "text">;
678
+ } | undefined;
679
+ readonly requestID?: string | undefined;
680
+ readonly userID?: string | undefined;
681
+ }, import("../route/client.js").CompactionOperations | undefined>;
682
+ export declare const messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
683
+ readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
684
+ readonly thinking?: {
685
+ readonly type: import("../schema/options.js").OpenString<"adaptive" | "disabled" | "enabled">;
686
+ } | undefined;
687
+ }, import("../route/client.js").CompactionOperations | undefined>;
608
688
  export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
609
689
  export declare const model: ProviderPackage.Definition<Settings, ChatOptionsInput>["model"];
610
690
  export * as ZAICodingPlan from "./zai-coding-plan.js";