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

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
@@ -50,6 +50,12 @@ export declare const protocol: Protocol<{
50
50
  readonly image_url: {
51
51
  readonly url: string;
52
52
  };
53
+ } | {
54
+ readonly type: "file";
55
+ readonly file: {
56
+ readonly filename: string;
57
+ readonly file_data: string;
58
+ };
53
59
  })[];
54
60
  } | {
55
61
  readonly role: "user";
@@ -65,6 +71,12 @@ export declare const protocol: Protocol<{
65
71
  readonly image_url: {
66
72
  readonly url: string;
67
73
  };
74
+ } | {
75
+ readonly type: "file";
76
+ readonly file: {
77
+ readonly filename: string;
78
+ readonly file_data: string;
79
+ };
68
80
  })[];
69
81
  } | {
70
82
  readonly [x: string]: unknown;
@@ -77,8 +77,8 @@ export declare const protocol: Protocol<{
77
77
  } | {
78
78
  readonly type: "input_file";
79
79
  readonly filename: string;
80
- readonly detail?: string | undefined;
81
80
  readonly file_data?: string | undefined;
81
+ readonly detail?: string | undefined;
82
82
  readonly file_url?: string | undefined;
83
83
  } | {
84
84
  readonly type: "input_text";
@@ -114,8 +114,8 @@ export declare const protocol: Protocol<{
114
114
  } | {
115
115
  readonly type: "input_file";
116
116
  readonly filename: string;
117
- readonly detail?: string | undefined;
118
117
  readonly file_data?: string | undefined;
118
+ readonly detail?: string | undefined;
119
119
  readonly file_url?: string | undefined;
120
120
  } | {
121
121
  readonly type: "input_text";
@@ -92,8 +92,8 @@ export declare const protocol: Protocol<{
92
92
  } | {
93
93
  readonly type: "input_file";
94
94
  readonly filename: string;
95
- readonly detail?: string | undefined;
96
95
  readonly file_data?: string | undefined;
96
+ readonly detail?: string | undefined;
97
97
  readonly file_url?: string | undefined;
98
98
  } | {
99
99
  readonly type: "input_text";
@@ -129,8 +129,8 @@ export declare const protocol: Protocol<{
129
129
  } | {
130
130
  readonly type: "input_file";
131
131
  readonly filename: string;
132
- readonly detail?: string | undefined;
133
132
  readonly file_data?: string | undefined;
133
+ readonly detail?: string | undefined;
134
134
  readonly file_url?: string | undefined;
135
135
  } | {
136
136
  readonly type: "input_text";
@@ -338,8 +338,8 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
338
338
  } | {
339
339
  readonly type: "input_file";
340
340
  readonly filename: string;
341
- readonly detail?: string | undefined;
342
341
  readonly file_data?: string | undefined;
342
+ readonly detail?: string | undefined;
343
343
  readonly file_url?: string | undefined;
344
344
  } | {
345
345
  readonly type: "input_text";
@@ -375,8 +375,8 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
375
375
  } | {
376
376
  readonly type: "input_file";
377
377
  readonly filename: string;
378
- readonly detail?: string | undefined;
379
378
  readonly file_data?: string | undefined;
379
+ readonly detail?: string | undefined;
380
380
  readonly file_url?: string | undefined;
381
381
  } | {
382
382
  readonly type: "input_text";
@@ -895,8 +895,8 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
895
895
  } | {
896
896
  readonly type: "input_file";
897
897
  readonly filename: string;
898
- readonly detail?: string | undefined;
899
898
  readonly file_data?: string | undefined;
899
+ readonly detail?: string | undefined;
900
900
  readonly file_url?: string | undefined;
901
901
  } | {
902
902
  readonly type: "input_text";
@@ -932,8 +932,8 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
932
932
  } | {
933
933
  readonly type: "input_file";
934
934
  readonly filename: string;
935
- readonly detail?: string | undefined;
936
935
  readonly file_data?: string | undefined;
936
+ readonly detail?: string | undefined;
937
937
  readonly file_url?: string | undefined;
938
938
  } | {
939
939
  readonly type: "input_text";
@@ -1292,8 +1292,8 @@ export declare const protocol: Protocol<{
1292
1292
  } | {
1293
1293
  readonly type: "input_file";
1294
1294
  readonly filename: string;
1295
- readonly detail?: string | undefined;
1296
1295
  readonly file_data?: string | undefined;
1296
+ readonly detail?: string | undefined;
1297
1297
  readonly file_url?: string | undefined;
1298
1298
  } | {
1299
1299
  readonly type: "input_text";
@@ -1329,8 +1329,8 @@ export declare const protocol: Protocol<{
1329
1329
  } | {
1330
1330
  readonly type: "input_file";
1331
1331
  readonly filename: string;
1332
- readonly detail?: string | undefined;
1333
1332
  readonly file_data?: string | undefined;
1333
+ readonly detail?: string | undefined;
1334
1334
  readonly file_url?: string | undefined;
1335
1335
  } | {
1336
1336
  readonly type: "input_text";
@@ -1513,8 +1513,8 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1513
1513
  } | {
1514
1514
  readonly type: "input_file";
1515
1515
  readonly filename: string;
1516
- readonly detail?: string | undefined;
1517
1516
  readonly file_data?: string | undefined;
1517
+ readonly detail?: string | undefined;
1518
1518
  readonly file_url?: string | undefined;
1519
1519
  } | {
1520
1520
  readonly type: "input_text";
@@ -1550,8 +1550,8 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
1550
1550
  } | {
1551
1551
  readonly type: "input_file";
1552
1552
  readonly filename: string;
1553
- readonly detail?: string | undefined;
1554
1553
  readonly file_data?: string | undefined;
1554
+ readonly detail?: string | undefined;
1555
1555
  readonly file_url?: string | undefined;
1556
1556
  } | {
1557
1557
  readonly type: "input_text";
@@ -59,6 +59,12 @@ export declare const bodyFields: {
59
59
  readonly image_url: Schema.Struct<{
60
60
  readonly url: Schema.String;
61
61
  }>;
62
+ }>, Schema.Struct<{
63
+ readonly type: Schema.Literal<"file">;
64
+ readonly file: Schema.Struct<{
65
+ readonly filename: Schema.String;
66
+ readonly file_data: Schema.String;
67
+ }>;
62
68
  }>]>>]>;
63
69
  }>, Schema.Struct<{
64
70
  readonly role: Schema.Literal<"user">;
@@ -74,6 +80,12 @@ export declare const bodyFields: {
74
80
  readonly image_url: Schema.Struct<{
75
81
  readonly url: Schema.String;
76
82
  }>;
83
+ }>, Schema.Struct<{
84
+ readonly type: Schema.Literal<"file">;
85
+ readonly file: Schema.Struct<{
86
+ readonly filename: Schema.String;
87
+ readonly file_data: Schema.String;
88
+ }>;
77
89
  }>]>>]>;
78
90
  }>, Schema.StructWithRest<Schema.Struct<{
79
91
  readonly role: Schema.Literal<"assistant">;
@@ -155,6 +167,12 @@ declare const OpenAIChatBody: Schema.Struct<{
155
167
  readonly image_url: Schema.Struct<{
156
168
  readonly url: Schema.String;
157
169
  }>;
170
+ }>, Schema.Struct<{
171
+ readonly type: Schema.Literal<"file">;
172
+ readonly file: Schema.Struct<{
173
+ readonly filename: Schema.String;
174
+ readonly file_data: Schema.String;
175
+ }>;
158
176
  }>]>>]>;
159
177
  }>, Schema.Struct<{
160
178
  readonly role: Schema.Literal<"user">;
@@ -170,6 +188,12 @@ declare const OpenAIChatBody: Schema.Struct<{
170
188
  readonly image_url: Schema.Struct<{
171
189
  readonly url: Schema.String;
172
190
  }>;
191
+ }>, Schema.Struct<{
192
+ readonly type: Schema.Literal<"file">;
193
+ readonly file: Schema.Struct<{
194
+ readonly filename: Schema.String;
195
+ readonly file_data: Schema.String;
196
+ }>;
173
197
  }>]>>]>;
174
198
  }>, Schema.StructWithRest<Schema.Struct<{
175
199
  readonly role: Schema.Literal<"assistant">;
@@ -354,6 +378,12 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
354
378
  readonly image_url: {
355
379
  readonly url: string;
356
380
  };
381
+ } | {
382
+ readonly type: "file";
383
+ readonly file: {
384
+ readonly filename: string;
385
+ readonly file_data: string;
386
+ };
357
387
  })[];
358
388
  } | {
359
389
  readonly role: "user";
@@ -369,6 +399,12 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
369
399
  readonly image_url: {
370
400
  readonly url: string;
371
401
  };
402
+ } | {
403
+ readonly type: "file";
404
+ readonly file: {
405
+ readonly filename: string;
406
+ readonly file_data: string;
407
+ };
372
408
  })[];
373
409
  } | {
374
410
  readonly [x: string]: unknown;
@@ -451,6 +487,12 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
451
487
  readonly image_url: {
452
488
  readonly url: string;
453
489
  };
490
+ } | {
491
+ readonly type: "file";
492
+ readonly file: {
493
+ readonly filename: string;
494
+ readonly file_data: string;
495
+ };
454
496
  })[];
455
497
  } | {
456
498
  readonly role: "user";
@@ -466,6 +508,12 @@ export declare const fromRequest: (request: LLMRequest<import("../schema/options
466
508
  readonly image_url: {
467
509
  readonly url: string;
468
510
  };
511
+ } | {
512
+ readonly type: "file";
513
+ readonly file: {
514
+ readonly filename: string;
515
+ readonly file_data: string;
516
+ };
469
517
  })[];
470
518
  } | {
471
519
  readonly [x: string]: unknown;
@@ -541,6 +589,12 @@ export declare const protocol: Protocol<{
541
589
  readonly image_url: {
542
590
  readonly url: string;
543
591
  };
592
+ } | {
593
+ readonly type: "file";
594
+ readonly file: {
595
+ readonly filename: string;
596
+ readonly file_data: string;
597
+ };
544
598
  })[];
545
599
  } | {
546
600
  readonly role: "user";
@@ -556,6 +610,12 @@ export declare const protocol: Protocol<{
556
610
  readonly image_url: {
557
611
  readonly url: string;
558
612
  };
613
+ } | {
614
+ readonly type: "file";
615
+ readonly file: {
616
+ readonly filename: string;
617
+ readonly file_data: string;
618
+ };
559
619
  })[];
560
620
  } | {
561
621
  readonly [x: string]: unknown;
@@ -708,6 +768,12 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
708
768
  readonly image_url: {
709
769
  readonly url: string;
710
770
  };
771
+ } | {
772
+ readonly type: "file";
773
+ readonly file: {
774
+ readonly filename: string;
775
+ readonly file_data: string;
776
+ };
711
777
  })[];
712
778
  } | {
713
779
  readonly role: "user";
@@ -723,6 +789,12 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
723
789
  readonly image_url: {
724
790
  readonly url: string;
725
791
  };
792
+ } | {
793
+ readonly type: "file";
794
+ readonly file: {
795
+ readonly filename: string;
796
+ readonly file_data: string;
797
+ };
726
798
  })[];
727
799
  } | {
728
800
  readonly [x: string]: unknown;
@@ -807,6 +879,12 @@ export declare const route: Route<{
807
879
  readonly image_url: {
808
880
  readonly url: string;
809
881
  };
882
+ } | {
883
+ readonly type: "file";
884
+ readonly file: {
885
+ readonly filename: string;
886
+ readonly file_data: string;
887
+ };
810
888
  })[];
811
889
  } | {
812
890
  readonly role: "user";
@@ -822,6 +900,12 @@ export declare const route: Route<{
822
900
  readonly image_url: {
823
901
  readonly url: string;
824
902
  };
903
+ } | {
904
+ readonly type: "file";
905
+ readonly file: {
906
+ readonly filename: string;
907
+ readonly file_data: string;
908
+ };
825
909
  })[];
826
910
  } | {
827
911
  readonly [x: string]: unknown;
@@ -91,6 +91,10 @@ const OpenAIChatUserContent = Schema.Union([
91
91
  type: Schema.Literal("image_url"),
92
92
  image_url: Schema.Struct({ url: Schema.String }),
93
93
  }),
94
+ Schema.Struct({
95
+ type: Schema.Literal("file"),
96
+ file: Schema.Struct({ filename: Schema.String, file_data: Schema.String }),
97
+ }),
94
98
  ]);
95
99
  const OpenAIChatMessage = Schema.Union([
96
100
  Schema.Struct({
@@ -230,6 +234,15 @@ const lowerToolCall = (part, options) => ({
230
234
  },
231
235
  });
232
236
  const lowerMedia = Effect.fn("OpenAIChat.lowerMedia")(function* (part) {
237
+ // Chat Completions accepts PDFs, and no other documents, as inline `file` parts; file URLs are not supported.
238
+ if (part.media.mediaType.toLowerCase() === "application/pdf")
239
+ return {
240
+ type: "file",
241
+ file: {
242
+ filename: part.filename ?? "document.pdf",
243
+ file_data: (yield* ProviderShared.requireInlineMedia("OpenAI Chat", part.media)).dataUrl,
244
+ },
245
+ };
233
246
  if (part.media.kind !== "image")
234
247
  return yield* ProviderShared.invalidRequest(`OpenAI Chat does not support media type ${part.media.mediaType}`);
235
248
  const url = ProviderShared.mediaUrl(part.media) ?? (yield* ProviderShared.requireInlineMedia("OpenAI Chat", part.media)).dataUrl;
@@ -345,7 +358,7 @@ const lowerAssistantMessage = Effect.fn("OpenAIChat.lowerAssistantMessage")(func
345
358
  });
346
359
  const lowerToolMessages = Effect.fn("OpenAIChat.lowerToolMessages")(function* (message, options) {
347
360
  const messages = [];
348
- const images = [];
361
+ const attachments = [];
349
362
  for (const part of message.content) {
350
363
  if (!ProviderShared.supportsContent(part, ["tool-result"]))
351
364
  return yield* ProviderShared.unsupportedContent("OpenAI Chat", "tool", ["tool-result"]);
@@ -367,9 +380,9 @@ const lowerToolMessages = Effect.fn("OpenAIChat.lowerToolMessages")(function* (m
367
380
  cache_control: options.cacheControl?.(part.cache),
368
381
  });
369
382
  const files = content.filter((item) => item.type === "file");
370
- images.push(...(yield* Effect.forEach(files, (item) => lowerMedia(ProviderShared.toolFileMedia(item)))));
383
+ attachments.push(...(yield* Effect.forEach(files, (item) => lowerMedia(ProviderShared.toolFileMedia(item)))));
371
384
  }
372
- return { messages, images };
385
+ return { messages, attachments };
373
386
  });
374
387
  const lowerMessage = Effect.fn("OpenAIChat.lowerMessage")(function* (message, reasoningField, requireReasoning, options) {
375
388
  if (message.role === "user")
@@ -423,23 +436,23 @@ const lowerMessages = Effect.fn("OpenAIChat.lowerMessages")(function* (request,
423
436
  if (requireAssistantAfterTool && messages.at(-1)?.role === "tool")
424
437
  messages.push({ role: "assistant", content: "Done." });
425
438
  };
426
- const pendingImages = [];
427
- const flushImages = () => {
428
- if (pendingImages.length === 0)
439
+ const pendingAttachments = [];
440
+ const flushAttachments = () => {
441
+ if (pendingAttachments.length === 0)
429
442
  return;
430
443
  bridgeTools();
431
- messages.push({ role: "user", content: pendingImages.splice(0) });
444
+ messages.push({ role: "user", content: pendingAttachments.splice(0) });
432
445
  };
433
446
  for (const message of request.messages) {
434
447
  if (message.role === "user")
435
448
  bridgeTools();
436
449
  if (message.role === "system") {
437
450
  const part = yield* ProviderShared.wrappedSystemUpdate("OpenAI Chat", message);
438
- if (pendingImages.length > 0) {
451
+ if (pendingAttachments.length > 0) {
439
452
  messages.push({
440
453
  role: "user",
441
454
  content: [
442
- ...pendingImages.splice(0),
455
+ ...pendingAttachments.splice(0),
443
456
  { type: "text", text: part.text, cache_control: options.cacheControl?.(part.cache) },
444
457
  ],
445
458
  });
@@ -479,13 +492,13 @@ const lowerMessages = Effect.fn("OpenAIChat.lowerMessages")(function* (request,
479
492
  if (message.role === "tool") {
480
493
  const lowered = yield* lowerToolMessages(message, lowering);
481
494
  messages.push(...lowered.messages);
482
- pendingImages.push(...lowered.images);
495
+ pendingAttachments.push(...lowered.attachments);
483
496
  continue;
484
497
  }
485
- flushImages();
498
+ flushAttachments();
486
499
  messages.push(...(yield* lowerMessage(message, reasoningField, requireReasoning, lowering)));
487
500
  }
488
- flushImages();
501
+ flushAttachments();
489
502
  return messages;
490
503
  });
491
504
  // Anthropic via LiteLLM and Amazon Bedrock require `tools` to be present
@@ -23,6 +23,12 @@ export declare const route: Route<{
23
23
  readonly image_url: {
24
24
  readonly url: string;
25
25
  };
26
+ } | {
27
+ readonly type: "file";
28
+ readonly file: {
29
+ readonly filename: string;
30
+ readonly file_data: string;
31
+ };
26
32
  })[];
27
33
  } | {
28
34
  readonly role: "user";
@@ -38,6 +44,12 @@ export declare const route: Route<{
38
44
  readonly image_url: {
39
45
  readonly url: string;
40
46
  };
47
+ } | {
48
+ readonly type: "file";
49
+ readonly file: {
50
+ readonly filename: string;
51
+ readonly file_data: string;
52
+ };
41
53
  })[];
42
54
  } | {
43
55
  readonly [x: string]: unknown;
@@ -72,8 +72,8 @@ export declare const route: Route<{
72
72
  } | {
73
73
  readonly type: "input_file";
74
74
  readonly filename: string;
75
- readonly detail?: string | undefined;
76
75
  readonly file_data?: string | undefined;
76
+ readonly detail?: string | undefined;
77
77
  readonly file_url?: string | undefined;
78
78
  } | {
79
79
  readonly type: "input_text";
@@ -109,8 +109,8 @@ export declare const route: Route<{
109
109
  } | {
110
110
  readonly type: "input_file";
111
111
  readonly filename: string;
112
- readonly detail?: string | undefined;
113
112
  readonly file_data?: string | undefined;
113
+ readonly detail?: string | undefined;
114
114
  readonly file_url?: string | undefined;
115
115
  } | {
116
116
  readonly type: "input_text";
@@ -291,8 +291,8 @@ export declare const protocol: Protocol<{
291
291
  } | {
292
292
  readonly type: "input_file";
293
293
  readonly filename: string;
294
- readonly detail?: string | undefined;
295
294
  readonly file_data?: string | undefined;
295
+ readonly detail?: string | undefined;
296
296
  readonly file_url?: string | undefined;
297
297
  } | {
298
298
  readonly type: "input_text";
@@ -328,8 +328,8 @@ export declare const protocol: Protocol<{
328
328
  } | {
329
329
  readonly type: "input_file";
330
330
  readonly filename: string;
331
- readonly detail?: string | undefined;
332
331
  readonly file_data?: string | undefined;
332
+ readonly detail?: string | undefined;
333
333
  readonly file_url?: string | undefined;
334
334
  } | {
335
335
  readonly type: "input_text";
@@ -574,8 +574,8 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
574
574
  } | {
575
575
  readonly type: "input_file";
576
576
  readonly filename: string;
577
- readonly detail?: string | undefined;
578
577
  readonly file_data?: string | undefined;
578
+ readonly detail?: string | undefined;
579
579
  readonly file_url?: string | undefined;
580
580
  } | {
581
581
  readonly type: "input_text";
@@ -611,8 +611,8 @@ export declare const httpTransport: HttpTransport.HttpJsonTransport<{
611
611
  } | {
612
612
  readonly type: "input_file";
613
613
  readonly filename: string;
614
- readonly detail?: string | undefined;
615
614
  readonly file_data?: string | undefined;
615
+ readonly detail?: string | undefined;
616
616
  readonly file_url?: string | undefined;
617
617
  } | {
618
618
  readonly type: "input_text";
@@ -802,8 +802,8 @@ export declare const channelTransport: (options: import("./open-responses-channe
802
802
  } | {
803
803
  readonly type: "input_file";
804
804
  readonly filename: string;
805
- readonly detail?: string | undefined;
806
805
  readonly file_data?: string | undefined;
806
+ readonly detail?: string | undefined;
807
807
  readonly file_url?: string | undefined;
808
808
  } | {
809
809
  readonly type: "input_text";
@@ -839,8 +839,8 @@ export declare const channelTransport: (options: import("./open-responses-channe
839
839
  } | {
840
840
  readonly type: "input_file";
841
841
  readonly filename: string;
842
- readonly detail?: string | undefined;
843
842
  readonly file_data?: string | undefined;
843
+ readonly detail?: string | undefined;
844
844
  readonly file_url?: string | undefined;
845
845
  } | {
846
846
  readonly type: "input_text";
@@ -1030,8 +1030,8 @@ export declare const transport: import("../route/transport/index.js").Transport<
1030
1030
  } | {
1031
1031
  readonly type: "input_file";
1032
1032
  readonly filename: string;
1033
- readonly detail?: string | undefined;
1034
1033
  readonly file_data?: string | undefined;
1034
+ readonly detail?: string | undefined;
1035
1035
  readonly file_url?: string | undefined;
1036
1036
  } | {
1037
1037
  readonly type: "input_text";
@@ -1067,8 +1067,8 @@ export declare const transport: import("../route/transport/index.js").Transport<
1067
1067
  } | {
1068
1068
  readonly type: "input_file";
1069
1069
  readonly filename: string;
1070
- readonly detail?: string | undefined;
1071
1070
  readonly file_data?: string | undefined;
1071
+ readonly detail?: string | undefined;
1072
1072
  readonly file_url?: string | undefined;
1073
1073
  } | {
1074
1074
  readonly type: "input_text";
@@ -1258,8 +1258,8 @@ export declare const route: Route<{
1258
1258
  } | {
1259
1259
  readonly type: "input_file";
1260
1260
  readonly filename: string;
1261
- readonly detail?: string | undefined;
1262
1261
  readonly file_data?: string | undefined;
1262
+ readonly detail?: string | undefined;
1263
1263
  readonly file_url?: string | undefined;
1264
1264
  } | {
1265
1265
  readonly type: "input_text";
@@ -1295,8 +1295,8 @@ export declare const route: Route<{
1295
1295
  } | {
1296
1296
  readonly type: "input_file";
1297
1297
  readonly filename: string;
1298
- readonly detail?: string | undefined;
1299
1298
  readonly file_data?: string | undefined;
1299
+ readonly detail?: string | undefined;
1300
1300
  readonly file_url?: string | undefined;
1301
1301
  } | {
1302
1302
  readonly type: "input_text";
@@ -67,8 +67,8 @@ export declare const protocol: Protocol<{
67
67
  } | {
68
68
  readonly type: "input_file";
69
69
  readonly filename: string;
70
- readonly detail?: string | undefined;
71
70
  readonly file_data?: string | undefined;
71
+ readonly detail?: string | undefined;
72
72
  readonly file_url?: string | undefined;
73
73
  } | {
74
74
  readonly type: "input_text";
@@ -104,8 +104,8 @@ export declare const protocol: Protocol<{
104
104
  } | {
105
105
  readonly type: "input_file";
106
106
  readonly filename: string;
107
- readonly detail?: string | undefined;
108
107
  readonly file_data?: string | undefined;
108
+ readonly detail?: string | undefined;
109
109
  readonly file_url?: string | undefined;
110
110
  } | {
111
111
  readonly type: "input_text";
@@ -39,6 +39,12 @@ export declare const protocol: Protocol<{
39
39
  readonly image_url: {
40
40
  readonly url: string;
41
41
  };
42
+ } | {
43
+ readonly type: "file";
44
+ readonly file: {
45
+ readonly filename: string;
46
+ readonly file_data: string;
47
+ };
42
48
  })[];
43
49
  } | {
44
50
  readonly role: "user";
@@ -54,6 +60,12 @@ export declare const protocol: Protocol<{
54
60
  readonly image_url: {
55
61
  readonly url: string;
56
62
  };
63
+ } | {
64
+ readonly type: "file";
65
+ readonly file: {
66
+ readonly filename: string;
67
+ readonly file_data: string;
68
+ };
57
69
  })[];
58
70
  } | {
59
71
  readonly [x: string]: unknown;
@@ -39,6 +39,12 @@ export declare const routes: (Route<{
39
39
  readonly image_url: {
40
40
  readonly url: string;
41
41
  };
42
+ } | {
43
+ readonly type: "file";
44
+ readonly file: {
45
+ readonly filename: string;
46
+ readonly file_data: string;
47
+ };
42
48
  })[];
43
49
  } | {
44
50
  readonly role: "user";
@@ -54,6 +60,12 @@ export declare const routes: (Route<{
54
60
  readonly image_url: {
55
61
  readonly url: string;
56
62
  };
63
+ } | {
64
+ readonly type: "file";
65
+ readonly file: {
66
+ readonly filename: string;
67
+ readonly file_data: string;
68
+ };
57
69
  })[];
58
70
  } | {
59
71
  readonly [x: string]: unknown;
@@ -470,8 +482,8 @@ export declare const routes: (Route<{
470
482
  } | {
471
483
  readonly type: "input_file";
472
484
  readonly filename: string;
473
- readonly detail?: string | undefined;
474
485
  readonly file_data?: string | undefined;
486
+ readonly detail?: string | undefined;
475
487
  readonly file_url?: string | undefined;
476
488
  } | {
477
489
  readonly type: "input_text";
@@ -507,8 +519,8 @@ export declare const routes: (Route<{
507
519
  } | {
508
520
  readonly type: "input_file";
509
521
  readonly filename: string;
510
- readonly detail?: string | undefined;
511
522
  readonly file_data?: string | undefined;
523
+ readonly detail?: string | undefined;
512
524
  readonly file_url?: string | undefined;
513
525
  } | {
514
526
  readonly type: "input_text";