@opencode/ai 0.0.0-dev-20498 → 0.0.0-dev-20501
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.
- package/README.md +25 -0
- package/dist/protocols/alibaba-chat.d.ts +3 -3
- package/dist/protocols/alibaba-responses.d.ts +16 -12
- package/dist/protocols/alibaba-responses.js +3 -5
- package/dist/protocols/google-interactions.d.ts +236 -0
- package/dist/protocols/google-interactions.js +478 -0
- package/dist/protocols/index.d.ts +1 -0
- package/dist/protocols/index.js +1 -0
- package/dist/protocols/meta-responses.d.ts +31 -58
- package/dist/protocols/meta-responses.js +5 -24
- package/dist/protocols/mistral-chat.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +406 -91
- package/dist/protocols/open-responses.js +12 -6
- package/dist/protocols/openai-chat.d.ts +5 -5
- package/dist/protocols/openai-compatible-chat.d.ts +1 -1
- package/dist/protocols/openai-compatible-responses.d.ts +16 -4
- package/dist/protocols/openai-responses.d.ts +87 -223
- package/dist/protocols/openai-responses.js +3 -10
- package/dist/protocols/xai-responses.d.ts +18 -21
- package/dist/protocols/xai-responses.js +2 -8
- package/dist/protocols/zai-chat.d.ts +3 -3
- package/dist/providers/alibaba.d.ts +17 -13
- package/dist/providers/amazon-bedrock-mantle.d.ts +17 -5
- package/dist/providers/azure.d.ts +13 -61
- package/dist/providers/baseten.d.ts +2 -2
- package/dist/providers/cerebras.d.ts +2 -2
- package/dist/providers/cloudflare-ai-gateway.d.ts +14 -62
- package/dist/providers/cloudflare-workers-ai.d.ts +2 -2
- package/dist/providers/cohere.d.ts +2 -2
- package/dist/providers/deepinfra.d.ts +2 -2
- package/dist/providers/deepseek.d.ts +2 -2
- package/dist/providers/digitalocean.d.ts +5 -5
- package/dist/providers/fireworks.d.ts +2 -2
- package/dist/providers/google/interactions.d.ts +7 -0
- package/dist/providers/google/interactions.js +8 -0
- package/dist/providers/google-vertex-chat.d.ts +1 -1
- package/dist/providers/google-vertex-responses.d.ts +16 -4
- package/dist/providers/google.d.ts +94 -3
- package/dist/providers/google.js +8 -1
- package/dist/providers/groq.d.ts +4 -4
- package/dist/providers/meta.d.ts +15 -28
- package/dist/providers/minimax.d.ts +17 -5
- package/dist/providers/moonshot.d.ts +17 -5
- package/dist/providers/openai-compatible-responses.d.ts +16 -4
- package/dist/providers/openai-compatible.d.ts +1 -1
- package/dist/providers/openai.d.ts +7 -31
- package/dist/providers/openrouter.d.ts +5 -5
- package/dist/providers/togetherai.d.ts +2 -2
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/zai-coding-plan.d.ts +17 -5
- package/dist/providers/zai.d.ts +1 -1
- package/dist/route/client.js +2 -5
- package/package.json +3 -3
package/dist/providers/meta.d.ts
CHANGED
|
@@ -152,9 +152,9 @@ export declare const routes: (Route<{
|
|
|
152
152
|
readonly top_p?: number | undefined;
|
|
153
153
|
readonly frequency_penalty?: number | undefined;
|
|
154
154
|
readonly presence_penalty?: number | undefined;
|
|
155
|
+
readonly store?: boolean | undefined;
|
|
155
156
|
readonly prompt_cache_key?: string | undefined;
|
|
156
157
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
157
|
-
readonly store?: boolean | undefined;
|
|
158
158
|
readonly stream_options?: {
|
|
159
159
|
readonly include_usage: boolean;
|
|
160
160
|
} | undefined;
|
|
@@ -197,6 +197,15 @@ export declare const routes: (Route<{
|
|
|
197
197
|
readonly error?: unknown;
|
|
198
198
|
readonly arguments?: string | undefined;
|
|
199
199
|
readonly server_label?: string | undefined;
|
|
200
|
+
} | {
|
|
201
|
+
readonly type: "configuration_update";
|
|
202
|
+
readonly reasoning: {
|
|
203
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
204
|
+
};
|
|
205
|
+
} | {
|
|
206
|
+
readonly [x: string]: unknown;
|
|
207
|
+
readonly type: string;
|
|
208
|
+
readonly id: string;
|
|
200
209
|
} | {
|
|
201
210
|
readonly type: "reasoning";
|
|
202
211
|
readonly summary: readonly {
|
|
@@ -273,13 +282,6 @@ export declare const routes: (Route<{
|
|
|
273
282
|
readonly type: "input_video";
|
|
274
283
|
readonly video_url: string;
|
|
275
284
|
})[];
|
|
276
|
-
} | {
|
|
277
|
-
readonly id: string;
|
|
278
|
-
readonly type: "image_generation_call";
|
|
279
|
-
readonly status?: string | undefined;
|
|
280
|
-
readonly error?: unknown;
|
|
281
|
-
readonly result?: string | null | undefined;
|
|
282
|
-
readonly output_format?: string | undefined;
|
|
283
285
|
})[];
|
|
284
286
|
readonly model: string;
|
|
285
287
|
readonly stream: true;
|
|
@@ -292,6 +294,9 @@ export declare const routes: (Route<{
|
|
|
292
294
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
293
295
|
} | undefined;
|
|
294
296
|
readonly tools?: readonly ({
|
|
297
|
+
readonly [x: string]: unknown;
|
|
298
|
+
readonly type: string;
|
|
299
|
+
} | {
|
|
295
300
|
readonly type: "function";
|
|
296
301
|
readonly description: string;
|
|
297
302
|
readonly name: string;
|
|
@@ -299,24 +304,6 @@ export declare const routes: (Route<{
|
|
|
299
304
|
readonly [x: string]: unknown;
|
|
300
305
|
};
|
|
301
306
|
readonly strict?: boolean | undefined;
|
|
302
|
-
} | {
|
|
303
|
-
readonly type: "web_search";
|
|
304
|
-
readonly search_context_size?: string | undefined;
|
|
305
|
-
readonly user_location?: {
|
|
306
|
-
readonly type: "approximate";
|
|
307
|
-
readonly region?: string | undefined;
|
|
308
|
-
readonly city?: string | undefined;
|
|
309
|
-
readonly country?: string | undefined;
|
|
310
|
-
readonly timezone?: string | undefined;
|
|
311
|
-
} | undefined;
|
|
312
|
-
} | {
|
|
313
|
-
readonly type: "image_generation";
|
|
314
|
-
readonly size?: string | undefined;
|
|
315
|
-
readonly output_format?: string | undefined;
|
|
316
|
-
readonly reasoning_strength?: string | undefined;
|
|
317
|
-
readonly enable_image_search?: boolean | undefined;
|
|
318
|
-
readonly enable_web_search?: boolean | undefined;
|
|
319
|
-
readonly enable_shell?: boolean | undefined;
|
|
320
307
|
})[] | undefined;
|
|
321
308
|
readonly text?: {
|
|
322
309
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
@@ -337,9 +324,10 @@ export declare const routes: (Route<{
|
|
|
337
324
|
readonly top_p?: number | undefined;
|
|
338
325
|
readonly frequency_penalty?: number | undefined;
|
|
339
326
|
readonly presence_penalty?: number | undefined;
|
|
327
|
+
readonly store?: boolean | undefined;
|
|
328
|
+
readonly max_output_tokens?: number | undefined;
|
|
340
329
|
readonly prompt_cache_key?: string | undefined;
|
|
341
330
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
342
|
-
readonly store?: boolean | undefined;
|
|
343
331
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
344
332
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
345
333
|
readonly stream_options?: {
|
|
@@ -347,7 +335,6 @@ export declare const routes: (Route<{
|
|
|
347
335
|
} | undefined;
|
|
348
336
|
readonly safety_identifier?: string | undefined;
|
|
349
337
|
readonly top_logprobs?: number | undefined;
|
|
350
|
-
readonly max_output_tokens?: number | undefined;
|
|
351
338
|
readonly max_tool_calls?: number | undefined;
|
|
352
339
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
353
340
|
readonly max_tokens: number;
|
|
@@ -343,6 +343,15 @@ export declare const routes: (Route<{
|
|
|
343
343
|
readonly error?: unknown;
|
|
344
344
|
readonly arguments?: string | undefined;
|
|
345
345
|
readonly server_label?: string | undefined;
|
|
346
|
+
} | {
|
|
347
|
+
readonly type: "configuration_update";
|
|
348
|
+
readonly reasoning: {
|
|
349
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
350
|
+
};
|
|
351
|
+
} | {
|
|
352
|
+
readonly [x: string]: unknown;
|
|
353
|
+
readonly type: string;
|
|
354
|
+
readonly id: string;
|
|
346
355
|
} | {
|
|
347
356
|
readonly type: "reasoning";
|
|
348
357
|
readonly summary: readonly {
|
|
@@ -430,7 +439,10 @@ export declare const routes: (Route<{
|
|
|
430
439
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
431
440
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
432
441
|
} | undefined;
|
|
433
|
-
readonly tools?: readonly {
|
|
442
|
+
readonly tools?: readonly ({
|
|
443
|
+
readonly [x: string]: unknown;
|
|
444
|
+
readonly type: string;
|
|
445
|
+
} | {
|
|
434
446
|
readonly type: "function";
|
|
435
447
|
readonly description: string;
|
|
436
448
|
readonly name: string;
|
|
@@ -438,7 +450,7 @@ export declare const routes: (Route<{
|
|
|
438
450
|
readonly [x: string]: unknown;
|
|
439
451
|
};
|
|
440
452
|
readonly strict?: boolean | undefined;
|
|
441
|
-
}[] | undefined;
|
|
453
|
+
})[] | undefined;
|
|
442
454
|
readonly text?: {
|
|
443
455
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
444
456
|
} | undefined;
|
|
@@ -458,9 +470,10 @@ export declare const routes: (Route<{
|
|
|
458
470
|
readonly top_p?: number | undefined;
|
|
459
471
|
readonly frequency_penalty?: number | undefined;
|
|
460
472
|
readonly presence_penalty?: number | undefined;
|
|
473
|
+
readonly store?: boolean | undefined;
|
|
474
|
+
readonly max_output_tokens?: number | undefined;
|
|
461
475
|
readonly prompt_cache_key?: string | undefined;
|
|
462
476
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
463
|
-
readonly store?: boolean | undefined;
|
|
464
477
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
465
478
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
466
479
|
readonly stream_options?: {
|
|
@@ -468,7 +481,6 @@ export declare const routes: (Route<{
|
|
|
468
481
|
} | undefined;
|
|
469
482
|
readonly safety_identifier?: string | undefined;
|
|
470
483
|
readonly top_logprobs?: number | undefined;
|
|
471
|
-
readonly max_output_tokens?: number | undefined;
|
|
472
484
|
readonly max_tool_calls?: number | undefined;
|
|
473
485
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
474
486
|
readonly model: string;
|
|
@@ -588,9 +600,9 @@ export declare const routes: (Route<{
|
|
|
588
600
|
readonly top_p?: number | undefined;
|
|
589
601
|
readonly frequency_penalty?: number | undefined;
|
|
590
602
|
readonly presence_penalty?: number | undefined;
|
|
603
|
+
readonly store?: boolean | undefined;
|
|
591
604
|
readonly prompt_cache_key?: string | undefined;
|
|
592
605
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
593
|
-
readonly store?: boolean | undefined;
|
|
594
606
|
readonly stream_options?: {
|
|
595
607
|
readonly include_usage: boolean;
|
|
596
608
|
} | undefined;
|
|
@@ -341,6 +341,15 @@ export declare const routes: (Route<{
|
|
|
341
341
|
readonly error?: unknown;
|
|
342
342
|
readonly arguments?: string | undefined;
|
|
343
343
|
readonly server_label?: string | undefined;
|
|
344
|
+
} | {
|
|
345
|
+
readonly type: "configuration_update";
|
|
346
|
+
readonly reasoning: {
|
|
347
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
348
|
+
};
|
|
349
|
+
} | {
|
|
350
|
+
readonly [x: string]: unknown;
|
|
351
|
+
readonly type: string;
|
|
352
|
+
readonly id: string;
|
|
344
353
|
} | {
|
|
345
354
|
readonly type: "reasoning";
|
|
346
355
|
readonly summary: readonly {
|
|
@@ -428,7 +437,10 @@ export declare const routes: (Route<{
|
|
|
428
437
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
429
438
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
430
439
|
} | undefined;
|
|
431
|
-
readonly tools?: readonly {
|
|
440
|
+
readonly tools?: readonly ({
|
|
441
|
+
readonly [x: string]: unknown;
|
|
442
|
+
readonly type: string;
|
|
443
|
+
} | {
|
|
432
444
|
readonly type: "function";
|
|
433
445
|
readonly description: string;
|
|
434
446
|
readonly name: string;
|
|
@@ -436,7 +448,7 @@ export declare const routes: (Route<{
|
|
|
436
448
|
readonly [x: string]: unknown;
|
|
437
449
|
};
|
|
438
450
|
readonly strict?: boolean | undefined;
|
|
439
|
-
}[] | undefined;
|
|
451
|
+
})[] | undefined;
|
|
440
452
|
readonly text?: {
|
|
441
453
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
442
454
|
} | undefined;
|
|
@@ -456,9 +468,10 @@ export declare const routes: (Route<{
|
|
|
456
468
|
readonly top_p?: number | undefined;
|
|
457
469
|
readonly frequency_penalty?: number | undefined;
|
|
458
470
|
readonly presence_penalty?: number | undefined;
|
|
471
|
+
readonly store?: boolean | undefined;
|
|
472
|
+
readonly max_output_tokens?: number | undefined;
|
|
459
473
|
readonly prompt_cache_key?: string | undefined;
|
|
460
474
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
461
|
-
readonly store?: boolean | undefined;
|
|
462
475
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
463
476
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
464
477
|
readonly stream_options?: {
|
|
@@ -466,7 +479,6 @@ export declare const routes: (Route<{
|
|
|
466
479
|
} | undefined;
|
|
467
480
|
readonly safety_identifier?: string | undefined;
|
|
468
481
|
readonly top_logprobs?: number | undefined;
|
|
469
|
-
readonly max_output_tokens?: number | undefined;
|
|
470
482
|
readonly max_tool_calls?: number | undefined;
|
|
471
483
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
472
484
|
readonly model: string;
|
|
@@ -586,9 +598,9 @@ export declare const routes: (Route<{
|
|
|
586
598
|
readonly top_p?: number | undefined;
|
|
587
599
|
readonly frequency_penalty?: number | undefined;
|
|
588
600
|
readonly presence_penalty?: number | undefined;
|
|
601
|
+
readonly store?: boolean | undefined;
|
|
589
602
|
readonly prompt_cache_key?: string | undefined;
|
|
590
603
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
591
|
-
readonly store?: boolean | undefined;
|
|
592
604
|
readonly stream_options?: {
|
|
593
605
|
readonly include_usage: boolean;
|
|
594
606
|
} | undefined;
|
|
@@ -53,6 +53,15 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
53
53
|
readonly error?: unknown;
|
|
54
54
|
readonly arguments?: string | undefined;
|
|
55
55
|
readonly server_label?: string | undefined;
|
|
56
|
+
} | {
|
|
57
|
+
readonly type: "configuration_update";
|
|
58
|
+
readonly reasoning: {
|
|
59
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
60
|
+
};
|
|
61
|
+
} | {
|
|
62
|
+
readonly [x: string]: unknown;
|
|
63
|
+
readonly type: string;
|
|
64
|
+
readonly id: string;
|
|
56
65
|
} | {
|
|
57
66
|
readonly type: "reasoning";
|
|
58
67
|
readonly summary: readonly {
|
|
@@ -140,7 +149,10 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
140
149
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
141
150
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
142
151
|
} | undefined;
|
|
143
|
-
readonly tools?: readonly {
|
|
152
|
+
readonly tools?: readonly ({
|
|
153
|
+
readonly [x: string]: unknown;
|
|
154
|
+
readonly type: string;
|
|
155
|
+
} | {
|
|
144
156
|
readonly type: "function";
|
|
145
157
|
readonly description: string;
|
|
146
158
|
readonly name: string;
|
|
@@ -148,7 +160,7 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
148
160
|
readonly [x: string]: unknown;
|
|
149
161
|
};
|
|
150
162
|
readonly strict?: boolean | undefined;
|
|
151
|
-
}[] | undefined;
|
|
163
|
+
})[] | undefined;
|
|
152
164
|
readonly text?: {
|
|
153
165
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
154
166
|
} | undefined;
|
|
@@ -168,9 +180,10 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
168
180
|
readonly top_p?: number | undefined;
|
|
169
181
|
readonly frequency_penalty?: number | undefined;
|
|
170
182
|
readonly presence_penalty?: number | undefined;
|
|
183
|
+
readonly store?: boolean | undefined;
|
|
184
|
+
readonly max_output_tokens?: number | undefined;
|
|
171
185
|
readonly prompt_cache_key?: string | undefined;
|
|
172
186
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
173
|
-
readonly store?: boolean | undefined;
|
|
174
187
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
175
188
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
176
189
|
readonly stream_options?: {
|
|
@@ -178,7 +191,6 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
178
191
|
} | undefined;
|
|
179
192
|
readonly safety_identifier?: string | undefined;
|
|
180
193
|
readonly top_logprobs?: number | undefined;
|
|
181
|
-
readonly max_output_tokens?: number | undefined;
|
|
182
194
|
readonly max_tool_calls?: number | undefined;
|
|
183
195
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined>[];
|
|
184
196
|
export declare const configure: (input: Config) => {
|
|
@@ -128,9 +128,9 @@ export declare const routes: import("../route/client.js").Route<{
|
|
|
128
128
|
readonly top_p?: number | undefined;
|
|
129
129
|
readonly frequency_penalty?: number | undefined;
|
|
130
130
|
readonly presence_penalty?: number | undefined;
|
|
131
|
+
readonly store?: boolean | undefined;
|
|
131
132
|
readonly prompt_cache_key?: string | undefined;
|
|
132
133
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
133
|
-
readonly store?: boolean | undefined;
|
|
134
134
|
readonly stream_options?: {
|
|
135
135
|
readonly include_usage: boolean;
|
|
136
136
|
} | undefined;
|
|
@@ -123,9 +123,9 @@ export declare const routes: (Route<{
|
|
|
123
123
|
readonly top_p?: number | undefined;
|
|
124
124
|
readonly frequency_penalty?: number | undefined;
|
|
125
125
|
readonly presence_penalty?: number | undefined;
|
|
126
|
+
readonly store?: boolean | undefined;
|
|
126
127
|
readonly prompt_cache_key?: string | undefined;
|
|
127
128
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
128
|
-
readonly store?: boolean | undefined;
|
|
129
129
|
readonly stream_options?: {
|
|
130
130
|
readonly include_usage: boolean;
|
|
131
131
|
} | undefined;
|
|
@@ -173,6 +173,10 @@ export declare const routes: (Route<{
|
|
|
173
173
|
readonly reasoning: {
|
|
174
174
|
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
175
175
|
};
|
|
176
|
+
} | {
|
|
177
|
+
readonly [x: string]: unknown;
|
|
178
|
+
readonly type: string;
|
|
179
|
+
readonly id: string;
|
|
176
180
|
} | {
|
|
177
181
|
readonly type: "reasoning";
|
|
178
182
|
readonly summary: readonly {
|
|
@@ -249,34 +253,6 @@ export declare const routes: (Route<{
|
|
|
249
253
|
readonly type: "input_video";
|
|
250
254
|
readonly video_url: string;
|
|
251
255
|
})[];
|
|
252
|
-
} | {
|
|
253
|
-
readonly [x: string]: unknown;
|
|
254
|
-
readonly id: string;
|
|
255
|
-
readonly type: "computer_call";
|
|
256
|
-
readonly status?: string | undefined;
|
|
257
|
-
readonly action?: {
|
|
258
|
-
readonly [x: string]: unknown;
|
|
259
|
-
} | null | undefined;
|
|
260
|
-
readonly call_id?: string | undefined;
|
|
261
|
-
readonly pending_safety_checks?: readonly {
|
|
262
|
-
readonly [x: string]: unknown;
|
|
263
|
-
}[] | undefined;
|
|
264
|
-
} | {
|
|
265
|
-
readonly [x: string]: unknown;
|
|
266
|
-
readonly id: string;
|
|
267
|
-
readonly type: "web_search_preview_call";
|
|
268
|
-
readonly status?: string | undefined;
|
|
269
|
-
readonly action?: {
|
|
270
|
-
readonly [x: string]: unknown;
|
|
271
|
-
} | null | undefined;
|
|
272
|
-
} | {
|
|
273
|
-
readonly [x: string]: unknown;
|
|
274
|
-
readonly id: string;
|
|
275
|
-
readonly type: "image_generation_call";
|
|
276
|
-
readonly status?: string | undefined;
|
|
277
|
-
readonly result?: string | null | undefined;
|
|
278
|
-
readonly output_format?: "png" | "jpeg" | "webp" | undefined;
|
|
279
|
-
readonly revised_prompt?: string | null | undefined;
|
|
280
256
|
})[];
|
|
281
257
|
readonly model: string;
|
|
282
258
|
readonly stream: true;
|
|
@@ -345,9 +321,10 @@ export declare const routes: (Route<{
|
|
|
345
321
|
readonly top_p?: number | undefined;
|
|
346
322
|
readonly frequency_penalty?: number | undefined;
|
|
347
323
|
readonly presence_penalty?: number | undefined;
|
|
324
|
+
readonly store?: boolean | undefined;
|
|
325
|
+
readonly max_output_tokens?: number | undefined;
|
|
348
326
|
readonly prompt_cache_key?: string | undefined;
|
|
349
327
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
350
|
-
readonly store?: boolean | undefined;
|
|
351
328
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
352
329
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
353
330
|
readonly stream_options?: {
|
|
@@ -355,7 +332,6 @@ export declare const routes: (Route<{
|
|
|
355
332
|
} | undefined;
|
|
356
333
|
readonly safety_identifier?: string | undefined;
|
|
357
334
|
readonly top_logprobs?: number | undefined;
|
|
358
|
-
readonly max_output_tokens?: number | undefined;
|
|
359
335
|
readonly max_tool_calls?: number | undefined;
|
|
360
336
|
}, import("../protocols/open-responses-channel.js").Prepared, {
|
|
361
337
|
endpoint: import("../route/client.js").CompactOperation;
|
|
@@ -322,9 +322,9 @@ export declare const protocol: Protocol<{
|
|
|
322
322
|
readonly top_p?: number | undefined;
|
|
323
323
|
readonly frequency_penalty?: number | undefined;
|
|
324
324
|
readonly presence_penalty?: number | undefined;
|
|
325
|
+
readonly store?: boolean | undefined;
|
|
325
326
|
readonly prompt_cache_key?: string | undefined;
|
|
326
327
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
327
|
-
readonly store?: boolean | undefined;
|
|
328
328
|
readonly stream_options?: {
|
|
329
329
|
readonly include_usage: boolean;
|
|
330
330
|
} | undefined;
|
|
@@ -340,9 +340,9 @@ export declare const protocol: Protocol<{
|
|
|
340
340
|
readonly [x: string]: unknown;
|
|
341
341
|
readonly cache_read_input_tokens?: number | null | undefined;
|
|
342
342
|
readonly cached_tokens?: number | null | undefined;
|
|
343
|
+
readonly total_tokens?: number | null | undefined;
|
|
343
344
|
readonly prompt_tokens?: number | null | undefined;
|
|
344
345
|
readonly completion_tokens?: number | null | undefined;
|
|
345
|
-
readonly total_tokens?: number | null | undefined;
|
|
346
346
|
readonly prompt_tokens_details?: {
|
|
347
347
|
readonly [x: string]: unknown;
|
|
348
348
|
readonly cached_tokens?: number | null | undefined;
|
|
@@ -381,9 +381,9 @@ export declare const protocol: Protocol<{
|
|
|
381
381
|
readonly [x: string]: unknown;
|
|
382
382
|
readonly cache_read_input_tokens?: number | null | undefined;
|
|
383
383
|
readonly cached_tokens?: number | null | undefined;
|
|
384
|
+
readonly total_tokens?: number | null | undefined;
|
|
384
385
|
readonly prompt_tokens?: number | null | undefined;
|
|
385
386
|
readonly completion_tokens?: number | null | undefined;
|
|
386
|
-
readonly total_tokens?: number | null | undefined;
|
|
387
387
|
readonly prompt_tokens_details?: {
|
|
388
388
|
readonly [x: string]: unknown;
|
|
389
389
|
readonly cached_tokens?: number | null | undefined;
|
|
@@ -517,9 +517,9 @@ export declare const route: Route<{
|
|
|
517
517
|
readonly top_p?: number | undefined;
|
|
518
518
|
readonly frequency_penalty?: number | undefined;
|
|
519
519
|
readonly presence_penalty?: number | undefined;
|
|
520
|
+
readonly store?: boolean | undefined;
|
|
520
521
|
readonly prompt_cache_key?: string | undefined;
|
|
521
522
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
522
|
-
readonly store?: boolean | undefined;
|
|
523
523
|
readonly stream_options?: {
|
|
524
524
|
readonly include_usage: boolean;
|
|
525
525
|
} | undefined;
|
|
@@ -640,9 +640,9 @@ export declare const routes: Route<{
|
|
|
640
640
|
readonly top_p?: number | undefined;
|
|
641
641
|
readonly frequency_penalty?: number | undefined;
|
|
642
642
|
readonly presence_penalty?: number | undefined;
|
|
643
|
+
readonly store?: boolean | undefined;
|
|
643
644
|
readonly prompt_cache_key?: string | undefined;
|
|
644
645
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
645
|
-
readonly store?: boolean | undefined;
|
|
646
646
|
readonly stream_options?: {
|
|
647
647
|
readonly include_usage: boolean;
|
|
648
648
|
} | undefined;
|
|
@@ -126,9 +126,9 @@ export declare const route: Route<{
|
|
|
126
126
|
readonly top_p?: number | undefined;
|
|
127
127
|
readonly frequency_penalty?: number | undefined;
|
|
128
128
|
readonly presence_penalty?: number | undefined;
|
|
129
|
+
readonly store?: boolean | undefined;
|
|
129
130
|
readonly prompt_cache_key?: string | undefined;
|
|
130
131
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
131
|
-
readonly store?: boolean | undefined;
|
|
132
132
|
readonly stream_options?: {
|
|
133
133
|
readonly include_usage: boolean;
|
|
134
134
|
} | undefined;
|
|
@@ -248,9 +248,9 @@ export declare const routes: Route<{
|
|
|
248
248
|
readonly top_p?: number | undefined;
|
|
249
249
|
readonly frequency_penalty?: number | undefined;
|
|
250
250
|
readonly presence_penalty?: number | undefined;
|
|
251
|
+
readonly store?: boolean | undefined;
|
|
251
252
|
readonly prompt_cache_key?: string | undefined;
|
|
252
253
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
253
|
-
readonly store?: boolean | undefined;
|
|
254
254
|
readonly stream_options?: {
|
|
255
255
|
readonly include_usage: boolean;
|
|
256
256
|
} | undefined;
|
package/dist/providers/xai.d.ts
CHANGED
|
@@ -134,9 +134,9 @@ export declare const routes: (Route<{
|
|
|
134
134
|
readonly top_p?: number | undefined;
|
|
135
135
|
readonly frequency_penalty?: number | undefined;
|
|
136
136
|
readonly presence_penalty?: number | undefined;
|
|
137
|
+
readonly store?: boolean | undefined;
|
|
137
138
|
readonly prompt_cache_key?: string | undefined;
|
|
138
139
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
139
|
-
readonly store?: boolean | undefined;
|
|
140
140
|
readonly stream_options?: {
|
|
141
141
|
readonly include_usage: boolean;
|
|
142
142
|
} | undefined;
|
|
@@ -57,6 +57,15 @@ export declare const routes: (Route<{
|
|
|
57
57
|
readonly error?: unknown;
|
|
58
58
|
readonly arguments?: string | undefined;
|
|
59
59
|
readonly server_label?: string | undefined;
|
|
60
|
+
} | {
|
|
61
|
+
readonly type: "configuration_update";
|
|
62
|
+
readonly reasoning: {
|
|
63
|
+
readonly effort: import("../schema/options.js").ReasoningEffort;
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
readonly [x: string]: unknown;
|
|
67
|
+
readonly type: string;
|
|
68
|
+
readonly id: string;
|
|
60
69
|
} | {
|
|
61
70
|
readonly type: "reasoning";
|
|
62
71
|
readonly summary: readonly {
|
|
@@ -144,7 +153,10 @@ export declare const routes: (Route<{
|
|
|
144
153
|
readonly summary?: "auto" | "concise" | "detailed" | undefined;
|
|
145
154
|
readonly effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
146
155
|
} | undefined;
|
|
147
|
-
readonly tools?: readonly {
|
|
156
|
+
readonly tools?: readonly ({
|
|
157
|
+
readonly [x: string]: unknown;
|
|
158
|
+
readonly type: string;
|
|
159
|
+
} | {
|
|
148
160
|
readonly type: "function";
|
|
149
161
|
readonly description: string;
|
|
150
162
|
readonly name: string;
|
|
@@ -152,7 +164,7 @@ export declare const routes: (Route<{
|
|
|
152
164
|
readonly [x: string]: unknown;
|
|
153
165
|
};
|
|
154
166
|
readonly strict?: boolean | undefined;
|
|
155
|
-
}[] | undefined;
|
|
167
|
+
})[] | undefined;
|
|
156
168
|
readonly text?: {
|
|
157
169
|
readonly verbosity?: import("../protocols/utils/open-responses-options.js").TextVerbosity | undefined;
|
|
158
170
|
} | undefined;
|
|
@@ -172,9 +184,10 @@ export declare const routes: (Route<{
|
|
|
172
184
|
readonly top_p?: number | undefined;
|
|
173
185
|
readonly frequency_penalty?: number | undefined;
|
|
174
186
|
readonly presence_penalty?: number | undefined;
|
|
187
|
+
readonly store?: boolean | undefined;
|
|
188
|
+
readonly max_output_tokens?: number | undefined;
|
|
175
189
|
readonly prompt_cache_key?: string | undefined;
|
|
176
190
|
readonly parallel_tool_calls?: boolean | undefined;
|
|
177
|
-
readonly store?: boolean | undefined;
|
|
178
191
|
readonly include?: readonly import("../protocols/utils/open-responses-options.js").ResponseIncludable[] | undefined;
|
|
179
192
|
readonly truncation?: "auto" | "disabled" | undefined;
|
|
180
193
|
readonly stream_options?: {
|
|
@@ -182,7 +195,6 @@ export declare const routes: (Route<{
|
|
|
182
195
|
} | undefined;
|
|
183
196
|
readonly safety_identifier?: string | undefined;
|
|
184
197
|
readonly top_logprobs?: number | undefined;
|
|
185
|
-
readonly max_output_tokens?: number | undefined;
|
|
186
198
|
readonly max_tool_calls?: number | undefined;
|
|
187
199
|
}, import("../route/transport/http.js").HttpPrepared<string>, import("../route/client.js").CompactionOperations | undefined> | Route<{
|
|
188
200
|
readonly model: string;
|
|
@@ -303,9 +315,9 @@ export declare const routes: (Route<{
|
|
|
303
315
|
readonly top_p?: number | undefined;
|
|
304
316
|
readonly frequency_penalty?: number | undefined;
|
|
305
317
|
readonly presence_penalty?: number | undefined;
|
|
318
|
+
readonly store?: boolean | undefined;
|
|
306
319
|
readonly prompt_cache_key?: string | undefined;
|
|
307
320
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
308
|
-
readonly store?: boolean | undefined;
|
|
309
321
|
readonly stream_options?: {
|
|
310
322
|
readonly include_usage: boolean;
|
|
311
323
|
} | undefined;
|
package/dist/providers/zai.d.ts
CHANGED
|
@@ -133,9 +133,9 @@ export declare const routes: Route<{
|
|
|
133
133
|
readonly top_p?: number | undefined;
|
|
134
134
|
readonly frequency_penalty?: number | undefined;
|
|
135
135
|
readonly presence_penalty?: number | undefined;
|
|
136
|
+
readonly store?: boolean | undefined;
|
|
136
137
|
readonly prompt_cache_key?: string | undefined;
|
|
137
138
|
readonly reasoning_effort?: import("../schema/options.js").ReasoningEffort | undefined;
|
|
138
|
-
readonly store?: boolean | undefined;
|
|
139
139
|
readonly stream_options?: {
|
|
140
140
|
readonly include_usage: boolean;
|
|
141
141
|
} | undefined;
|
package/dist/route/client.js
CHANGED
|
@@ -102,7 +102,6 @@ const requireTerminalEvent = (route) => (events) => Stream.suspend(() => {
|
|
|
102
102
|
});
|
|
103
103
|
function makeFromTransport(input) {
|
|
104
104
|
const protocol = input.protocol;
|
|
105
|
-
const encodeBody = Schema.encodeSync(Schema.fromJsonString(protocol.body.schema));
|
|
106
105
|
const decodeEventEffect = Schema.decodeUnknownEffect(protocol.stream.event);
|
|
107
106
|
const decodeEvent = (route) => (frame) => decodeEventEffect(frame).pipe(Effect.mapError((cause) => ProviderShared.eventError(input.id, `Invalid ${route} stream event`, typeof frame === "string" ? frame : ProviderShared.encodeJson(frame), cause)));
|
|
108
107
|
const build = (routeInput) => {
|
|
@@ -143,7 +142,7 @@ function makeFromTransport(input) {
|
|
|
143
142
|
request,
|
|
144
143
|
endpoint: routeInput.endpoint,
|
|
145
144
|
auth: routeInput.auth ?? Auth.none,
|
|
146
|
-
encodeBody,
|
|
145
|
+
encodeBody: ProviderShared.encodeJson,
|
|
147
146
|
middleware: options?.http,
|
|
148
147
|
webSocket: options?.webSocket,
|
|
149
148
|
}),
|
|
@@ -221,9 +220,7 @@ const prepareRequest = (request) => {
|
|
|
221
220
|
const compile = Effect.fn("LLM.compile")(function* (request, options) {
|
|
222
221
|
const resolved = prepareRequest(request);
|
|
223
222
|
const route = resolved.model.route;
|
|
224
|
-
const body = yield* route.body
|
|
225
|
-
.from(resolved)
|
|
226
|
-
.pipe(Effect.flatMap(ProviderShared.validateWith(Schema.decodeUnknownEffect(route.body.schema))));
|
|
223
|
+
const body = yield* route.body.from(resolved);
|
|
227
224
|
const prepared = yield* route.prepareTransport(body, resolved, options);
|
|
228
225
|
return {
|
|
229
226
|
request: resolved,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20501",
|
|
4
4
|
"name": "@opencode/ai",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@clack/prompts": "1.0.0-alpha.1",
|
|
36
36
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
37
|
-
"@opencode/http-recorder": "0.0.0-dev-
|
|
37
|
+
"@opencode/http-recorder": "0.0.0-dev-20501",
|
|
38
38
|
"@tsconfig/bun": "1.0.9",
|
|
39
39
|
"@types/bun": "1.4.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@aws-sdk/credential-providers": "3.1057.0",
|
|
45
45
|
"@smithy/eventstream-codec": "4.2.14",
|
|
46
46
|
"@smithy/util-utf8": "4.2.2",
|
|
47
|
-
"@opencode/schema": "0.0.0-dev-
|
|
47
|
+
"@opencode/schema": "0.0.0-dev-20501",
|
|
48
48
|
"aws4fetch": "1.0.20",
|
|
49
49
|
"effect": "4.0.0-rc.112",
|
|
50
50
|
"google-auth-library": "10.5.0"
|