@opencode/ai 0.0.0-dev-20052 → 0.0.0-dev-20055

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 (36) hide show
  1. package/dist/protocols/alibaba-chat.d.ts +12 -0
  2. package/dist/protocols/alibaba-responses.d.ts +2 -2
  3. package/dist/protocols/meta-responses.d.ts +4 -4
  4. package/dist/protocols/open-responses.d.ts +6 -6
  5. package/dist/protocols/openai-chat.d.ts +84 -0
  6. package/dist/protocols/openai-chat.js +25 -12
  7. package/dist/protocols/openai-compatible-chat.d.ts +12 -0
  8. package/dist/protocols/openai-compatible-responses.d.ts +2 -2
  9. package/dist/protocols/openai-responses.d.ts +10 -10
  10. package/dist/protocols/xai-responses.d.ts +2 -2
  11. package/dist/protocols/zai-chat.d.ts +12 -0
  12. package/dist/providers/alibaba.d.ts +14 -2
  13. package/dist/providers/amazon-bedrock-mantle.d.ts +14 -2
  14. package/dist/providers/azure.d.ts +16 -4
  15. package/dist/providers/baseten.d.ts +24 -0
  16. package/dist/providers/cerebras.d.ts +24 -0
  17. package/dist/providers/cloudflare-ai-gateway.d.ts +28 -4
  18. package/dist/providers/cloudflare-workers-ai.d.ts +24 -0
  19. package/dist/providers/deepinfra.d.ts +24 -0
  20. package/dist/providers/deepseek.d.ts +24 -0
  21. package/dist/providers/fireworks.d.ts +24 -0
  22. package/dist/providers/google-vertex-chat.d.ts +12 -0
  23. package/dist/providers/google-vertex-responses.d.ts +2 -2
  24. package/dist/providers/groq.d.ts +24 -0
  25. package/dist/providers/meta.d.ts +14 -2
  26. package/dist/providers/minimax.d.ts +14 -2
  27. package/dist/providers/moonshot.d.ts +14 -2
  28. package/dist/providers/openai-compatible-responses.d.ts +2 -2
  29. package/dist/providers/openai-compatible.d.ts +12 -0
  30. package/dist/providers/openai.d.ts +14 -2
  31. package/dist/providers/openrouter.d.ts +48 -0
  32. package/dist/providers/togetherai.d.ts +24 -0
  33. package/dist/providers/xai.d.ts +12 -0
  34. package/dist/providers/zai-coding-plan.d.ts +14 -2
  35. package/dist/providers/zai.d.ts +12 -0
  36. package/package.json +3 -3
@@ -370,8 +370,8 @@ export declare const routes: (Route<{
370
370
  } | {
371
371
  readonly type: "input_file";
372
372
  readonly filename: string;
373
- readonly detail?: string | undefined;
374
373
  readonly file_data?: string | undefined;
374
+ readonly detail?: string | undefined;
375
375
  readonly file_url?: string | undefined;
376
376
  } | {
377
377
  readonly type: "input_text";
@@ -407,8 +407,8 @@ export declare const routes: (Route<{
407
407
  } | {
408
408
  readonly type: "input_file";
409
409
  readonly filename: string;
410
- readonly detail?: string | undefined;
411
410
  readonly file_data?: string | undefined;
411
+ readonly detail?: string | undefined;
412
412
  readonly file_url?: string | undefined;
413
413
  } | {
414
414
  readonly type: "input_text";
@@ -484,6 +484,12 @@ export declare const routes: (Route<{
484
484
  readonly image_url: {
485
485
  readonly url: string;
486
486
  };
487
+ } | {
488
+ readonly type: "file";
489
+ readonly file: {
490
+ readonly filename: string;
491
+ readonly file_data: string;
492
+ };
487
493
  })[];
488
494
  } | {
489
495
  readonly role: "user";
@@ -499,6 +505,12 @@ export declare const routes: (Route<{
499
505
  readonly image_url: {
500
506
  readonly url: string;
501
507
  };
508
+ } | {
509
+ readonly type: "file";
510
+ readonly file: {
511
+ readonly filename: string;
512
+ readonly file_data: string;
513
+ };
502
514
  })[];
503
515
  } | {
504
516
  readonly [x: string]: unknown;
@@ -82,8 +82,8 @@ export declare const routes: import("../route/client.js").Route<{
82
82
  } | {
83
83
  readonly type: "input_file";
84
84
  readonly filename: string;
85
- readonly detail?: string | undefined;
86
85
  readonly file_data?: string | undefined;
86
+ readonly detail?: string | undefined;
87
87
  readonly file_url?: string | undefined;
88
88
  } | {
89
89
  readonly type: "input_text";
@@ -119,8 +119,8 @@ export declare const routes: import("../route/client.js").Route<{
119
119
  } | {
120
120
  readonly type: "input_file";
121
121
  readonly filename: string;
122
- readonly detail?: string | undefined;
123
122
  readonly file_data?: string | undefined;
123
+ readonly detail?: string | undefined;
124
124
  readonly file_url?: string | undefined;
125
125
  } | {
126
126
  readonly type: "input_text";
@@ -30,6 +30,12 @@ export declare const routes: import("../route/client.js").Route<{
30
30
  readonly image_url: {
31
31
  readonly url: string;
32
32
  };
33
+ } | {
34
+ readonly type: "file";
35
+ readonly file: {
36
+ readonly filename: string;
37
+ readonly file_data: string;
38
+ };
33
39
  })[];
34
40
  } | {
35
41
  readonly role: "user";
@@ -45,6 +51,12 @@ export declare const routes: import("../route/client.js").Route<{
45
51
  readonly image_url: {
46
52
  readonly url: string;
47
53
  };
54
+ } | {
55
+ readonly type: "file";
56
+ readonly file: {
57
+ readonly filename: string;
58
+ readonly file_data: string;
59
+ };
48
60
  })[];
49
61
  } | {
50
62
  readonly [x: string]: unknown;
@@ -26,6 +26,12 @@ export declare const routes: (Route<{
26
26
  readonly image_url: {
27
27
  readonly url: string;
28
28
  };
29
+ } | {
30
+ readonly type: "file";
31
+ readonly file: {
32
+ readonly filename: string;
33
+ readonly file_data: string;
34
+ };
29
35
  })[];
30
36
  } | {
31
37
  readonly role: "user";
@@ -41,6 +47,12 @@ export declare const routes: (Route<{
41
47
  readonly image_url: {
42
48
  readonly url: string;
43
49
  };
50
+ } | {
51
+ readonly type: "file";
52
+ readonly file: {
53
+ readonly filename: string;
54
+ readonly file_data: string;
55
+ };
44
56
  })[];
45
57
  } | {
46
58
  readonly [x: string]: unknown;
@@ -180,8 +192,8 @@ export declare const routes: (Route<{
180
192
  } | {
181
193
  readonly type: "input_file";
182
194
  readonly filename: string;
183
- readonly detail?: string | undefined;
184
195
  readonly file_data?: string | undefined;
196
+ readonly detail?: string | undefined;
185
197
  readonly file_url?: string | undefined;
186
198
  } | {
187
199
  readonly type: "input_text";
@@ -217,8 +229,8 @@ export declare const routes: (Route<{
217
229
  } | {
218
230
  readonly type: "input_file";
219
231
  readonly filename: string;
220
- readonly detail?: string | undefined;
221
232
  readonly file_data?: string | undefined;
233
+ readonly detail?: string | undefined;
222
234
  readonly file_url?: string | undefined;
223
235
  } | {
224
236
  readonly type: "input_text";
@@ -104,6 +104,12 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
104
104
  readonly image_url: Schema.Struct<{
105
105
  readonly url: Schema.String;
106
106
  }>;
107
+ }>, Schema.Struct<{
108
+ readonly type: Schema.Literal<"file">;
109
+ readonly file: Schema.Struct<{
110
+ readonly filename: Schema.String;
111
+ readonly file_data: Schema.String;
112
+ }>;
107
113
  }>]>>]>;
108
114
  }>, Schema.Struct<{
109
115
  readonly role: Schema.Literal<"user">;
@@ -119,6 +125,12 @@ declare const OpenRouterBody: Schema.StructWithRest<Schema.Struct<{
119
125
  readonly image_url: Schema.Struct<{
120
126
  readonly url: Schema.String;
121
127
  }>;
128
+ }>, Schema.Struct<{
129
+ readonly type: Schema.Literal<"file">;
130
+ readonly file: Schema.Struct<{
131
+ readonly filename: Schema.String;
132
+ readonly file_data: Schema.String;
133
+ }>;
122
134
  }>]>>]>;
123
135
  }>, Schema.StructWithRest<Schema.Struct<{
124
136
  readonly role: Schema.Literal<"assistant">;
@@ -202,6 +214,12 @@ export declare const protocol: Protocol<{
202
214
  readonly image_url: {
203
215
  readonly url: string;
204
216
  };
217
+ } | {
218
+ readonly type: "file";
219
+ readonly file: {
220
+ readonly filename: string;
221
+ readonly file_data: string;
222
+ };
205
223
  })[];
206
224
  } | {
207
225
  readonly role: "user";
@@ -217,6 +235,12 @@ export declare const protocol: Protocol<{
217
235
  readonly image_url: {
218
236
  readonly url: string;
219
237
  };
238
+ } | {
239
+ readonly type: "file";
240
+ readonly file: {
241
+ readonly filename: string;
242
+ readonly file_data: string;
243
+ };
220
244
  })[];
221
245
  } | {
222
246
  readonly [x: string]: unknown;
@@ -369,6 +393,12 @@ export declare const route: Route<{
369
393
  readonly image_url: {
370
394
  readonly url: string;
371
395
  };
396
+ } | {
397
+ readonly type: "file";
398
+ readonly file: {
399
+ readonly filename: string;
400
+ readonly file_data: string;
401
+ };
372
402
  })[];
373
403
  } | {
374
404
  readonly role: "user";
@@ -384,6 +414,12 @@ export declare const route: Route<{
384
414
  readonly image_url: {
385
415
  readonly url: string;
386
416
  };
417
+ } | {
418
+ readonly type: "file";
419
+ readonly file: {
420
+ readonly filename: string;
421
+ readonly file_data: string;
422
+ };
387
423
  })[];
388
424
  } | {
389
425
  readonly [x: string]: unknown;
@@ -469,6 +505,12 @@ export declare const routes: Route<{
469
505
  readonly image_url: {
470
506
  readonly url: string;
471
507
  };
508
+ } | {
509
+ readonly type: "file";
510
+ readonly file: {
511
+ readonly filename: string;
512
+ readonly file_data: string;
513
+ };
472
514
  })[];
473
515
  } | {
474
516
  readonly role: "user";
@@ -484,6 +526,12 @@ export declare const routes: Route<{
484
526
  readonly image_url: {
485
527
  readonly url: string;
486
528
  };
529
+ } | {
530
+ readonly type: "file";
531
+ readonly file: {
532
+ readonly filename: string;
533
+ readonly file_data: string;
534
+ };
487
535
  })[];
488
536
  } | {
489
537
  readonly [x: string]: unknown;
@@ -28,6 +28,12 @@ export declare const route: Route<{
28
28
  readonly image_url: {
29
29
  readonly url: string;
30
30
  };
31
+ } | {
32
+ readonly type: "file";
33
+ readonly file: {
34
+ readonly filename: string;
35
+ readonly file_data: string;
36
+ };
31
37
  })[];
32
38
  } | {
33
39
  readonly role: "user";
@@ -43,6 +49,12 @@ export declare const route: Route<{
43
49
  readonly image_url: {
44
50
  readonly url: string;
45
51
  };
52
+ } | {
53
+ readonly type: "file";
54
+ readonly file: {
55
+ readonly filename: string;
56
+ readonly file_data: string;
57
+ };
46
58
  })[];
47
59
  } | {
48
60
  readonly [x: string]: unknown;
@@ -127,6 +139,12 @@ export declare const routes: Route<{
127
139
  readonly image_url: {
128
140
  readonly url: string;
129
141
  };
142
+ } | {
143
+ readonly type: "file";
144
+ readonly file: {
145
+ readonly filename: string;
146
+ readonly file_data: string;
147
+ };
130
148
  })[];
131
149
  } | {
132
150
  readonly role: "user";
@@ -142,6 +160,12 @@ export declare const routes: Route<{
142
160
  readonly image_url: {
143
161
  readonly url: string;
144
162
  };
163
+ } | {
164
+ readonly type: "file";
165
+ readonly file: {
166
+ readonly filename: string;
167
+ readonly file_data: string;
168
+ };
145
169
  })[];
146
170
  } | {
147
171
  readonly [x: string]: unknown;
@@ -36,6 +36,12 @@ export declare const routes: (Route<{
36
36
  readonly image_url: {
37
37
  readonly url: string;
38
38
  };
39
+ } | {
40
+ readonly type: "file";
41
+ readonly file: {
42
+ readonly filename: string;
43
+ readonly file_data: string;
44
+ };
39
45
  })[];
40
46
  } | {
41
47
  readonly role: "user";
@@ -51,6 +57,12 @@ export declare const routes: (Route<{
51
57
  readonly image_url: {
52
58
  readonly url: string;
53
59
  };
60
+ } | {
61
+ readonly type: "file";
62
+ readonly file: {
63
+ readonly filename: string;
64
+ readonly file_data: string;
65
+ };
54
66
  })[];
55
67
  } | {
56
68
  readonly [x: string]: unknown;
@@ -86,8 +86,8 @@ export declare const routes: (Route<{
86
86
  } | {
87
87
  readonly type: "input_file";
88
88
  readonly filename: string;
89
- readonly detail?: string | undefined;
90
89
  readonly file_data?: string | undefined;
90
+ readonly detail?: string | undefined;
91
91
  readonly file_url?: string | undefined;
92
92
  } | {
93
93
  readonly type: "input_text";
@@ -123,8 +123,8 @@ export declare const routes: (Route<{
123
123
  } | {
124
124
  readonly type: "input_file";
125
125
  readonly filename: string;
126
- readonly detail?: string | undefined;
127
126
  readonly file_data?: string | undefined;
127
+ readonly detail?: string | undefined;
128
128
  readonly file_url?: string | undefined;
129
129
  } | {
130
130
  readonly type: "input_text";
@@ -200,6 +200,12 @@ export declare const routes: (Route<{
200
200
  readonly image_url: {
201
201
  readonly url: string;
202
202
  };
203
+ } | {
204
+ readonly type: "file";
205
+ readonly file: {
206
+ readonly filename: string;
207
+ readonly file_data: string;
208
+ };
203
209
  })[];
204
210
  } | {
205
211
  readonly role: "user";
@@ -215,6 +221,12 @@ export declare const routes: (Route<{
215
221
  readonly image_url: {
216
222
  readonly url: string;
217
223
  };
224
+ } | {
225
+ readonly type: "file";
226
+ readonly file: {
227
+ readonly filename: string;
228
+ readonly file_data: string;
229
+ };
218
230
  })[];
219
231
  } | {
220
232
  readonly [x: string]: unknown;
@@ -30,6 +30,12 @@ export declare const routes: Route<{
30
30
  readonly image_url: {
31
31
  readonly url: string;
32
32
  };
33
+ } | {
34
+ readonly type: "file";
35
+ readonly file: {
36
+ readonly filename: string;
37
+ readonly file_data: string;
38
+ };
33
39
  })[];
34
40
  } | {
35
41
  readonly role: "user";
@@ -45,6 +51,12 @@ export declare const routes: Route<{
45
51
  readonly image_url: {
46
52
  readonly url: string;
47
53
  };
54
+ } | {
55
+ readonly type: "file";
56
+ readonly file: {
57
+ readonly filename: string;
58
+ readonly file_data: string;
59
+ };
48
60
  })[];
49
61
  } | {
50
62
  readonly [x: string]: unknown;
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-20052",
3
+ "version": "0.0.0-dev-20055",
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-20052",
37
+ "@opencode/http-recorder": "0.0.0-dev-20055",
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-20052",
47
+ "@opencode/schema": "0.0.0-dev-20055",
48
48
  "aws4fetch": "1.0.20",
49
49
  "effect": "4.0.0-rc.112",
50
50
  "google-auth-library": "10.5.0"