@opencode/ai 0.0.0-dev-21627 → 0.0.0-dev-21631

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 (74) hide show
  1. package/dist/image-client.d.ts +8 -8
  2. package/dist/image.d.ts +148 -148
  3. package/dist/promise.d.ts +120 -120
  4. package/dist/protocols/alibaba-chat.d.ts +12 -12
  5. package/dist/protocols/alibaba-messages.d.ts +11 -11
  6. package/dist/protocols/alibaba-responses.d.ts +35 -35
  7. package/dist/protocols/anthropic-messages.d.ts +40 -40
  8. package/dist/protocols/bedrock-converse.d.ts +30 -30
  9. package/dist/protocols/cartesia-speech.d.ts +32 -32
  10. package/dist/protocols/cohere-chat.d.ts +7 -8
  11. package/dist/protocols/deepgram-speech.d.ts +32 -32
  12. package/dist/protocols/elevenlabs-speech.d.ts +32 -32
  13. package/dist/protocols/gemini.d.ts +34 -34
  14. package/dist/protocols/google-interactions.d.ts +14 -14
  15. package/dist/protocols/google-speech.d.ts +32 -32
  16. package/dist/protocols/google-transcription.d.ts +32 -32
  17. package/dist/protocols/meta-messages.d.ts +23 -23
  18. package/dist/protocols/meta-responses.d.ts +78 -78
  19. package/dist/protocols/mistral-chat.d.ts +68 -68
  20. package/dist/protocols/open-responses.d.ts +396 -396
  21. package/dist/protocols/openai-chat.d.ts +60 -60
  22. package/dist/protocols/openai-compatible-chat.d.ts +12 -12
  23. package/dist/protocols/openai-compatible-responses.d.ts +35 -35
  24. package/dist/protocols/openai-images.d.ts +32 -32
  25. package/dist/protocols/openai-responses.d.ts +235 -235
  26. package/dist/protocols/openai-speech.d.ts +32 -32
  27. package/dist/protocols/openai-transcription.d.ts +32 -32
  28. package/dist/protocols/utils/tool-stream.d.ts +1 -1
  29. package/dist/protocols/venice-chat.d.ts +12 -12
  30. package/dist/protocols/xai-responses.d.ts +78 -78
  31. package/dist/protocols/zai-chat.d.ts +12 -12
  32. package/dist/protocols/zai-messages.d.ts +11 -11
  33. package/dist/providers/alibaba.d.ts +69 -69
  34. package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
  35. package/dist/providers/amazon-bedrock.d.ts +15 -15
  36. package/dist/providers/anthropic-compatible.d.ts +13 -13
  37. package/dist/providers/anthropic.d.ts +13 -13
  38. package/dist/providers/azure.d.ts +106 -106
  39. package/dist/providers/baseten.d.ts +24 -24
  40. package/dist/providers/cerebras.d.ts +24 -24
  41. package/dist/providers/cloudflare-ai-gateway.d.ts +230 -227
  42. package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
  43. package/dist/providers/cohere.d.ts +75 -75
  44. package/dist/providers/deepinfra.d.ts +24 -24
  45. package/dist/providers/deepseek.d.ts +24 -24
  46. package/dist/providers/digitalocean.d.ts +36 -36
  47. package/dist/providers/fireworks.d.ts +24 -24
  48. package/dist/providers/google-vertex-chat.d.ts +12 -12
  49. package/dist/providers/google-vertex-messages.d.ts +13 -13
  50. package/dist/providers/google-vertex-mistral.d.ts +17 -17
  51. package/dist/providers/google-vertex-responses.d.ts +35 -35
  52. package/dist/providers/google-vertex.d.ts +17 -17
  53. package/dist/providers/google.d.ts +17 -17
  54. package/dist/providers/groq.d.ts +24 -24
  55. package/dist/providers/meta.d.ts +179 -179
  56. package/dist/providers/minimax.d.ts +71 -71
  57. package/dist/providers/mistral.d.ts +28 -28
  58. package/dist/providers/moonshot.d.ts +202 -202
  59. package/dist/providers/openai-compatible-responses.d.ts +35 -35
  60. package/dist/providers/openai-compatible.d.ts +12 -12
  61. package/dist/providers/openai.d.ts +100 -100
  62. package/dist/providers/openrouter.d.ts +36 -36
  63. package/dist/providers/togetherai.d.ts +24 -24
  64. package/dist/providers/venice.d.ts +12 -12
  65. package/dist/providers/xai.d.ts +12 -12
  66. package/dist/providers/zai-coding-plan.d.ts +58 -58
  67. package/dist/providers/zai.d.ts +12 -12
  68. package/dist/speech-client.d.ts +8 -8
  69. package/dist/speech.d.ts +148 -148
  70. package/dist/transcription-client.d.ts +8 -8
  71. package/dist/transcription.d.ts +148 -148
  72. package/dist/video-client.d.ts +8 -8
  73. package/dist/video.d.ts +114 -114
  74. package/package.json +6 -5
@@ -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";
@@ -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";
@@ -19,13 +19,6 @@ export declare const routes: Route<{
19
19
  readonly messages: readonly ({
20
20
  readonly role: "system";
21
21
  readonly content: string | readonly ({
22
- readonly type: "text";
23
- readonly text: string;
24
- readonly cache_control?: {
25
- readonly type: "ephemeral";
26
- readonly ttl?: string | undefined;
27
- } | undefined;
28
- } | {
29
22
  readonly type: "image_url";
30
23
  readonly image_url: {
31
24
  readonly url: string;
@@ -36,17 +29,17 @@ export declare const routes: Route<{
36
29
  readonly filename: string;
37
30
  readonly file_data: string;
38
31
  };
39
- })[];
40
- } | {
41
- readonly role: "user";
42
- readonly content: string | readonly ({
32
+ } | {
43
33
  readonly type: "text";
44
34
  readonly text: string;
45
35
  readonly cache_control?: {
46
36
  readonly type: "ephemeral";
47
37
  readonly ttl?: string | undefined;
48
38
  } | undefined;
49
- } | {
39
+ })[];
40
+ } | {
41
+ readonly role: "user";
42
+ readonly content: string | readonly ({
50
43
  readonly type: "image_url";
51
44
  readonly image_url: {
52
45
  readonly url: string;
@@ -57,6 +50,13 @@ export declare const routes: Route<{
57
50
  readonly filename: string;
58
51
  readonly file_data: string;
59
52
  };
53
+ } | {
54
+ readonly type: "text";
55
+ readonly text: string;
56
+ readonly cache_control?: {
57
+ readonly type: "ephemeral";
58
+ readonly ttl?: string | undefined;
59
+ } | undefined;
60
60
  })[];
61
61
  } | {
62
62
  readonly role: "tool";
@@ -24,14 +24,6 @@ export declare const SpeechClient: {
24
24
  readonly type: "finish";
25
25
  readonly audio: import("./media.js").Asset;
26
26
  readonly usage?: {
27
- readonly type: "tokens";
28
- readonly input?: number | undefined;
29
- readonly output?: number | undefined;
30
- readonly total?: number | undefined;
31
- readonly details?: {
32
- readonly [x: string]: unknown;
33
- } | undefined;
34
- } | {
35
27
  readonly type: "seconds";
36
28
  readonly seconds: number;
37
29
  } | {
@@ -43,6 +35,14 @@ export declare const SpeechClient: {
43
35
  } | {
44
36
  readonly type: "compute";
45
37
  readonly seconds: number;
38
+ } | {
39
+ readonly type: "tokens";
40
+ readonly input?: number | undefined;
41
+ readonly output?: number | undefined;
42
+ readonly total?: number | undefined;
43
+ readonly details?: {
44
+ readonly [x: string]: unknown;
45
+ } | undefined;
46
46
  } | undefined;
47
47
  readonly notices?: readonly {
48
48
  readonly type: "filtered" | "moderated" | "other";