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

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 (82) 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 -40
  9. package/dist/protocols/bedrock-converse.d.ts +30 -30
  10. package/dist/protocols/cartesia-speech.d.ts +32 -32
  11. package/dist/protocols/cohere-chat.d.ts +7 -8
  12. package/dist/protocols/deepgram-speech.d.ts +32 -32
  13. package/dist/protocols/elevenlabs-speech.d.ts +32 -32
  14. package/dist/protocols/gemini.d.ts +34 -34
  15. package/dist/protocols/google-interactions.d.ts +14 -14
  16. package/dist/protocols/google-speech.d.ts +32 -32
  17. package/dist/protocols/google-transcription.d.ts +32 -32
  18. package/dist/protocols/meta-messages.d.ts +23 -23
  19. package/dist/protocols/meta-responses.d.ts +78 -78
  20. package/dist/protocols/mistral-chat.d.ts +81 -78
  21. package/dist/protocols/mistral-chat.js +2 -1
  22. package/dist/protocols/open-responses-channel.js +47 -46
  23. package/dist/protocols/open-responses-continuation.d.ts +8 -2
  24. package/dist/protocols/open-responses-continuation.js +3 -1
  25. package/dist/protocols/open-responses.d.ts +396 -396
  26. package/dist/protocols/openai-chat.d.ts +60 -60
  27. package/dist/protocols/openai-compatible-chat.d.ts +12 -12
  28. package/dist/protocols/openai-compatible-responses.d.ts +35 -35
  29. package/dist/protocols/openai-images.d.ts +32 -32
  30. package/dist/protocols/openai-responses.d.ts +235 -235
  31. package/dist/protocols/openai-speech.d.ts +32 -32
  32. package/dist/protocols/openai-transcription.d.ts +32 -32
  33. package/dist/protocols/utils/tool-stream.d.ts +1 -1
  34. package/dist/protocols/venice-chat.d.ts +52 -53
  35. package/dist/protocols/venice-chat.js +6 -5
  36. package/dist/protocols/xai-responses.d.ts +78 -78
  37. package/dist/protocols/zai-chat.d.ts +33 -30
  38. package/dist/protocols/zai-chat.js +8 -3
  39. package/dist/protocols/zai-messages.d.ts +21 -19
  40. package/dist/protocols/zai-messages.js +3 -2
  41. package/dist/providers/alibaba.d.ts +69 -69
  42. package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
  43. package/dist/providers/amazon-bedrock.d.ts +15 -15
  44. package/dist/providers/anthropic-compatible.d.ts +13 -13
  45. package/dist/providers/anthropic.d.ts +13 -13
  46. package/dist/providers/azure.d.ts +106 -106
  47. package/dist/providers/baseten.d.ts +24 -24
  48. package/dist/providers/cerebras.d.ts +24 -24
  49. package/dist/providers/cloudflare-ai-gateway.d.ts +230 -227
  50. package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
  51. package/dist/providers/cohere.d.ts +75 -75
  52. package/dist/providers/deepinfra.d.ts +24 -24
  53. package/dist/providers/deepseek.d.ts +24 -24
  54. package/dist/providers/digitalocean.d.ts +36 -36
  55. package/dist/providers/fireworks.d.ts +24 -24
  56. package/dist/providers/google-vertex-chat.d.ts +12 -12
  57. package/dist/providers/google-vertex-messages.d.ts +13 -13
  58. package/dist/providers/google-vertex-mistral.d.ts +17 -17
  59. package/dist/providers/google-vertex-responses.d.ts +35 -35
  60. package/dist/providers/google-vertex.d.ts +17 -17
  61. package/dist/providers/google.d.ts +17 -17
  62. package/dist/providers/groq.d.ts +24 -24
  63. package/dist/providers/meta.d.ts +179 -179
  64. package/dist/providers/minimax.d.ts +71 -71
  65. package/dist/providers/mistral.d.ts +28 -28
  66. package/dist/providers/moonshot.d.ts +202 -202
  67. package/dist/providers/openai-compatible-responses.d.ts +35 -35
  68. package/dist/providers/openai-compatible.d.ts +12 -12
  69. package/dist/providers/openai.d.ts +100 -100
  70. package/dist/providers/openrouter.d.ts +36 -36
  71. package/dist/providers/togetherai.d.ts +24 -24
  72. package/dist/providers/venice.d.ts +195 -20
  73. package/dist/providers/xai.d.ts +12 -12
  74. package/dist/providers/zai-coding-plan.d.ts +149 -69
  75. package/dist/providers/zai.d.ts +84 -19
  76. package/dist/speech-client.d.ts +8 -8
  77. package/dist/speech.d.ts +148 -148
  78. package/dist/transcription-client.d.ts +8 -8
  79. package/dist/transcription.d.ts +148 -148
  80. package/dist/video-client.d.ts +8 -8
  81. package/dist/video.d.ts +114 -114
  82. package/package.json +6 -5
@@ -549,12 +549,30 @@ export declare const protocol: Protocol<{
549
549
  } | {
550
550
  readonly role: "assistant";
551
551
  readonly content: readonly ({
552
+ readonly type: "compaction";
553
+ readonly content: string | null;
554
+ } | {
552
555
  readonly type: "text";
553
556
  readonly text: string;
554
557
  readonly cache_control?: {
555
558
  readonly type: "ephemeral";
556
559
  readonly ttl?: "1h" | "5m" | undefined;
557
560
  } | undefined;
561
+ } | {
562
+ readonly type: "thinking";
563
+ readonly thinking: string;
564
+ readonly signature: string;
565
+ readonly cache_control?: {
566
+ readonly type: "ephemeral";
567
+ readonly ttl?: "1h" | "5m" | undefined;
568
+ } | undefined;
569
+ } | {
570
+ readonly type: "redacted_thinking";
571
+ readonly data: string;
572
+ readonly cache_control?: {
573
+ readonly type: "ephemeral";
574
+ readonly ttl?: "1h" | "5m" | undefined;
575
+ } | undefined;
558
576
  } | {
559
577
  readonly type: "tool_use";
560
578
  readonly id: string;
@@ -581,24 +599,6 @@ export declare const protocol: Protocol<{
581
599
  readonly type: "ephemeral";
582
600
  readonly ttl?: "1h" | "5m" | undefined;
583
601
  } | undefined;
584
- } | {
585
- readonly type: "compaction";
586
- readonly content: string | null;
587
- } | {
588
- readonly type: "thinking";
589
- readonly thinking: string;
590
- readonly signature: string;
591
- readonly cache_control?: {
592
- readonly type: "ephemeral";
593
- readonly ttl?: "1h" | "5m" | undefined;
594
- } | undefined;
595
- } | {
596
- readonly type: "redacted_thinking";
597
- readonly data: string;
598
- readonly cache_control?: {
599
- readonly type: "ephemeral";
600
- readonly ttl?: "1h" | "5m" | undefined;
601
- } | undefined;
602
602
  })[];
603
603
  } | {
604
604
  readonly role: "system";
@@ -640,6 +640,8 @@ export declare const protocol: Protocol<{
640
640
  readonly top_k?: number | undefined;
641
641
  readonly stop_sequences?: readonly string[] | undefined;
642
642
  readonly thinking?: {
643
+ readonly type: "between_tools" | "disabled";
644
+ } | {
643
645
  readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
644
646
  readonly block_binding?: {
645
647
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
@@ -652,8 +654,6 @@ export declare const protocol: Protocol<{
652
654
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
653
655
  } | undefined;
654
656
  readonly type: "adaptive";
655
- } | {
656
- readonly type: "between_tools" | "disabled";
657
657
  } | undefined;
658
658
  readonly output_config?: {
659
659
  readonly effort?: string | undefined;
@@ -909,12 +909,30 @@ export declare const route: Route<{
909
909
  } | {
910
910
  readonly role: "assistant";
911
911
  readonly content: readonly ({
912
+ readonly type: "compaction";
913
+ readonly content: string | null;
914
+ } | {
912
915
  readonly type: "text";
913
916
  readonly text: string;
914
917
  readonly cache_control?: {
915
918
  readonly type: "ephemeral";
916
919
  readonly ttl?: "1h" | "5m" | undefined;
917
920
  } | undefined;
921
+ } | {
922
+ readonly type: "thinking";
923
+ readonly thinking: string;
924
+ readonly signature: string;
925
+ readonly cache_control?: {
926
+ readonly type: "ephemeral";
927
+ readonly ttl?: "1h" | "5m" | undefined;
928
+ } | undefined;
929
+ } | {
930
+ readonly type: "redacted_thinking";
931
+ readonly data: string;
932
+ readonly cache_control?: {
933
+ readonly type: "ephemeral";
934
+ readonly ttl?: "1h" | "5m" | undefined;
935
+ } | undefined;
918
936
  } | {
919
937
  readonly type: "tool_use";
920
938
  readonly id: string;
@@ -941,24 +959,6 @@ export declare const route: Route<{
941
959
  readonly type: "ephemeral";
942
960
  readonly ttl?: "1h" | "5m" | undefined;
943
961
  } | undefined;
944
- } | {
945
- readonly type: "compaction";
946
- readonly content: string | null;
947
- } | {
948
- readonly type: "thinking";
949
- readonly thinking: string;
950
- readonly signature: string;
951
- readonly cache_control?: {
952
- readonly type: "ephemeral";
953
- readonly ttl?: "1h" | "5m" | undefined;
954
- } | undefined;
955
- } | {
956
- readonly type: "redacted_thinking";
957
- readonly data: string;
958
- readonly cache_control?: {
959
- readonly type: "ephemeral";
960
- readonly ttl?: "1h" | "5m" | undefined;
961
- } | undefined;
962
962
  })[];
963
963
  } | {
964
964
  readonly role: "system";
@@ -1000,6 +1000,8 @@ export declare const route: Route<{
1000
1000
  readonly top_k?: number | undefined;
1001
1001
  readonly stop_sequences?: readonly string[] | undefined;
1002
1002
  readonly thinking?: {
1003
+ readonly type: "between_tools" | "disabled";
1004
+ } | {
1003
1005
  readonly display?: import("../schema/options.js").OpenString<"omitted" | "summarized"> | undefined;
1004
1006
  readonly block_binding?: {
1005
1007
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
@@ -1012,8 +1014,6 @@ export declare const route: Route<{
1012
1014
  readonly prefix_mismatch_behavior?: import("../schema/options.js").OpenString<"drop_block" | "error"> | undefined;
1013
1015
  } | undefined;
1014
1016
  readonly type: "adaptive";
1015
- } | {
1016
- readonly type: "between_tools" | "disabled";
1017
1017
  } | undefined;
1018
1018
  readonly output_config?: {
1019
1019
  readonly effort?: string | undefined;
@@ -145,6 +145,21 @@ export declare const protocol: Protocol<{
145
145
  readonly type: "default";
146
146
  readonly ttl?: "1h" | "5m" | undefined;
147
147
  };
148
+ } | {
149
+ readonly image: {
150
+ readonly format: "gif" | "jpeg" | "png" | "webp";
151
+ readonly source: {
152
+ readonly bytes: string;
153
+ };
154
+ };
155
+ } | {
156
+ readonly document: {
157
+ readonly format: "csv" | "doc" | "docx" | "html" | "md" | "pdf" | "txt" | "xls" | "xlsx";
158
+ readonly name: string;
159
+ readonly source: {
160
+ readonly bytes: string;
161
+ };
162
+ };
148
163
  } | {
149
164
  readonly text: string;
150
165
  } | {
@@ -172,21 +187,6 @@ export declare const protocol: Protocol<{
172
187
  })[];
173
188
  readonly status?: "error" | "success" | undefined;
174
189
  };
175
- } | {
176
- readonly image: {
177
- readonly format: "gif" | "jpeg" | "png" | "webp";
178
- readonly source: {
179
- readonly bytes: string;
180
- };
181
- };
182
- } | {
183
- readonly document: {
184
- readonly format: "csv" | "doc" | "docx" | "html" | "md" | "pdf" | "txt" | "xls" | "xlsx";
185
- readonly name: string;
186
- readonly source: {
187
- readonly bytes: string;
188
- };
189
- };
190
190
  })[];
191
191
  } | {
192
192
  readonly role: "assistant";
@@ -333,6 +333,21 @@ export declare const route: Route<{
333
333
  readonly type: "default";
334
334
  readonly ttl?: "1h" | "5m" | undefined;
335
335
  };
336
+ } | {
337
+ readonly image: {
338
+ readonly format: "gif" | "jpeg" | "png" | "webp";
339
+ readonly source: {
340
+ readonly bytes: string;
341
+ };
342
+ };
343
+ } | {
344
+ readonly document: {
345
+ readonly format: "csv" | "doc" | "docx" | "html" | "md" | "pdf" | "txt" | "xls" | "xlsx";
346
+ readonly name: string;
347
+ readonly source: {
348
+ readonly bytes: string;
349
+ };
350
+ };
336
351
  } | {
337
352
  readonly text: string;
338
353
  } | {
@@ -360,21 +375,6 @@ export declare const route: Route<{
360
375
  })[];
361
376
  readonly status?: "error" | "success" | undefined;
362
377
  };
363
- } | {
364
- readonly image: {
365
- readonly format: "gif" | "jpeg" | "png" | "webp";
366
- readonly source: {
367
- readonly bytes: string;
368
- };
369
- };
370
- } | {
371
- readonly document: {
372
- readonly format: "csv" | "doc" | "docx" | "html" | "md" | "pdf" | "txt" | "xls" | "xlsx";
373
- readonly name: string;
374
- readonly source: {
375
- readonly bytes: string;
376
- };
377
- };
378
378
  })[];
379
379
  } | {
380
380
  readonly role: "assistant";
@@ -23,14 +23,6 @@ interface State extends SpeechStream.Audio {
23
23
  readonly done: boolean;
24
24
  }
25
25
  export declare const protocol: MediaProtocol.Streamed<Request, {
26
- readonly type: "generation-queued";
27
- readonly id: string;
28
- readonly position?: number | undefined;
29
- } | {
30
- readonly type: "generation-progress";
31
- readonly id: string;
32
- readonly progress?: number | undefined;
33
- } | {
34
26
  readonly type: "audio-delta";
35
27
  readonly chunk: Uint8Array<ArrayBufferLike>;
36
28
  } | {
@@ -40,18 +32,18 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
40
32
  readonly startSeconds: number;
41
33
  readonly endSeconds: number;
42
34
  }[];
35
+ } | {
36
+ readonly type: "generation-queued";
37
+ readonly id: string;
38
+ readonly position?: number | undefined;
39
+ } | {
40
+ readonly type: "generation-progress";
41
+ readonly id: string;
42
+ readonly progress?: number | undefined;
43
43
  } | {
44
44
  readonly type: "finish";
45
45
  readonly audio: import("../media.js").Asset;
46
46
  readonly usage?: {
47
- readonly type: "tokens";
48
- readonly input?: number | undefined;
49
- readonly output?: number | undefined;
50
- readonly total?: number | undefined;
51
- readonly details?: {
52
- readonly [x: string]: unknown;
53
- } | undefined;
54
- } | {
55
47
  readonly type: "seconds";
56
48
  readonly seconds: number;
57
49
  } | {
@@ -63,6 +55,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
63
55
  } | {
64
56
  readonly type: "compute";
65
57
  readonly seconds: number;
58
+ } | {
59
+ readonly type: "tokens";
60
+ readonly input?: number | undefined;
61
+ readonly output?: number | undefined;
62
+ readonly total?: number | undefined;
63
+ readonly details?: {
64
+ readonly [x: string]: unknown;
65
+ } | undefined;
66
66
  } | undefined;
67
67
  readonly notices?: readonly {
68
68
  readonly type: "filtered" | "moderated" | "other";
@@ -82,14 +82,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
82
82
  export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<CartesiaSpeechOptions>;
83
83
  export declare const CartesiaSpeech: {
84
84
  readonly protocol: MediaProtocol.Streamed<Request, {
85
- readonly type: "generation-queued";
86
- readonly id: string;
87
- readonly position?: number | undefined;
88
- } | {
89
- readonly type: "generation-progress";
90
- readonly id: string;
91
- readonly progress?: number | undefined;
92
- } | {
93
85
  readonly type: "audio-delta";
94
86
  readonly chunk: Uint8Array<ArrayBufferLike>;
95
87
  } | {
@@ -99,18 +91,18 @@ export declare const CartesiaSpeech: {
99
91
  readonly startSeconds: number;
100
92
  readonly endSeconds: number;
101
93
  }[];
94
+ } | {
95
+ readonly type: "generation-queued";
96
+ readonly id: string;
97
+ readonly position?: number | undefined;
98
+ } | {
99
+ readonly type: "generation-progress";
100
+ readonly id: string;
101
+ readonly progress?: number | undefined;
102
102
  } | {
103
103
  readonly type: "finish";
104
104
  readonly audio: import("../media.js").Asset;
105
105
  readonly usage?: {
106
- readonly type: "tokens";
107
- readonly input?: number | undefined;
108
- readonly output?: number | undefined;
109
- readonly total?: number | undefined;
110
- readonly details?: {
111
- readonly [x: string]: unknown;
112
- } | undefined;
113
- } | {
114
106
  readonly type: "seconds";
115
107
  readonly seconds: number;
116
108
  } | {
@@ -122,6 +114,14 @@ export declare const CartesiaSpeech: {
122
114
  } | {
123
115
  readonly type: "compute";
124
116
  readonly seconds: number;
117
+ } | {
118
+ readonly type: "tokens";
119
+ readonly input?: number | undefined;
120
+ readonly output?: number | undefined;
121
+ readonly total?: number | undefined;
122
+ readonly details?: {
123
+ readonly [x: string]: unknown;
124
+ } | undefined;
125
125
  } | undefined;
126
126
  readonly notices?: readonly {
127
127
  readonly type: "filtered" | "moderated" | "other";
@@ -11,11 +11,6 @@ declare const Options: Schema.Struct<{
11
11
  }>>;
12
12
  }>;
13
13
  export type ProviderOptionsInput = Schema.Schema.Type<typeof Options>;
14
- type State = {
15
- readonly lifecycle: Lifecycle.State;
16
- readonly tools: ToolStream.State<number>;
17
- readonly finished: boolean;
18
- };
19
14
  export declare const protocol: Protocol<{
20
15
  readonly model: string;
21
16
  readonly messages: readonly {
@@ -68,6 +63,8 @@ export declare const protocol: Protocol<{
68
63
  readonly frequency_penalty?: number | undefined;
69
64
  readonly presence_penalty?: number | undefined;
70
65
  }, string, {
66
+ readonly type: "unknown";
67
+ } | {
71
68
  readonly type: "message-start";
72
69
  } | {
73
70
  readonly type: "content-delta" | "content-start";
@@ -127,9 +124,11 @@ export declare const protocol: Protocol<{
127
124
  };
128
125
  } | {
129
126
  readonly type: "citation-end" | "citation-start";
130
- } | {
131
- readonly type: "unknown";
132
- }, State>;
127
+ }, {
128
+ readonly lifecycle: Lifecycle.State;
129
+ readonly finished: boolean;
130
+ readonly tools: Partial<Record<number, ToolStream.PendingTool>>;
131
+ }>;
133
132
  export declare const route: Route<{
134
133
  readonly model: string;
135
134
  readonly messages: readonly {
@@ -16,14 +16,6 @@ export type DeepgramSpeechOptions = {
16
16
  } & Record<string, unknown>;
17
17
  export type Request = SpeechRequestFor<DeepgramSpeechOptions>;
18
18
  export declare const protocol: MediaProtocol.Streamed<Request, {
19
- readonly type: "generation-queued";
20
- readonly id: string;
21
- readonly position?: number | undefined;
22
- } | {
23
- readonly type: "generation-progress";
24
- readonly id: string;
25
- readonly progress?: number | undefined;
26
- } | {
27
19
  readonly type: "audio-delta";
28
20
  readonly chunk: Uint8Array<ArrayBufferLike>;
29
21
  } | {
@@ -33,18 +25,18 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
33
25
  readonly startSeconds: number;
34
26
  readonly endSeconds: number;
35
27
  }[];
28
+ } | {
29
+ readonly type: "generation-queued";
30
+ readonly id: string;
31
+ readonly position?: number | undefined;
32
+ } | {
33
+ readonly type: "generation-progress";
34
+ readonly id: string;
35
+ readonly progress?: number | undefined;
36
36
  } | {
37
37
  readonly type: "finish";
38
38
  readonly audio: import("../media.js").Asset;
39
39
  readonly usage?: {
40
- readonly type: "tokens";
41
- readonly input?: number | undefined;
42
- readonly output?: number | undefined;
43
- readonly total?: number | undefined;
44
- readonly details?: {
45
- readonly [x: string]: unknown;
46
- } | undefined;
47
- } | {
48
40
  readonly type: "seconds";
49
41
  readonly seconds: number;
50
42
  } | {
@@ -56,6 +48,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
56
48
  } | {
57
49
  readonly type: "compute";
58
50
  readonly seconds: number;
51
+ } | {
52
+ readonly type: "tokens";
53
+ readonly input?: number | undefined;
54
+ readonly output?: number | undefined;
55
+ readonly total?: number | undefined;
56
+ readonly details?: {
57
+ readonly [x: string]: unknown;
58
+ } | undefined;
59
59
  } | undefined;
60
60
  readonly notices?: readonly {
61
61
  readonly type: "filtered" | "moderated" | "other";
@@ -75,14 +75,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
75
75
  export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<DeepgramSpeechOptions>;
76
76
  export declare const DeepgramSpeech: {
77
77
  readonly protocol: MediaProtocol.Streamed<Request, {
78
- readonly type: "generation-queued";
79
- readonly id: string;
80
- readonly position?: number | undefined;
81
- } | {
82
- readonly type: "generation-progress";
83
- readonly id: string;
84
- readonly progress?: number | undefined;
85
- } | {
86
78
  readonly type: "audio-delta";
87
79
  readonly chunk: Uint8Array<ArrayBufferLike>;
88
80
  } | {
@@ -92,18 +84,18 @@ export declare const DeepgramSpeech: {
92
84
  readonly startSeconds: number;
93
85
  readonly endSeconds: number;
94
86
  }[];
87
+ } | {
88
+ readonly type: "generation-queued";
89
+ readonly id: string;
90
+ readonly position?: number | undefined;
91
+ } | {
92
+ readonly type: "generation-progress";
93
+ readonly id: string;
94
+ readonly progress?: number | undefined;
95
95
  } | {
96
96
  readonly type: "finish";
97
97
  readonly audio: import("../media.js").Asset;
98
98
  readonly usage?: {
99
- readonly type: "tokens";
100
- readonly input?: number | undefined;
101
- readonly output?: number | undefined;
102
- readonly total?: number | undefined;
103
- readonly details?: {
104
- readonly [x: string]: unknown;
105
- } | undefined;
106
- } | {
107
99
  readonly type: "seconds";
108
100
  readonly seconds: number;
109
101
  } | {
@@ -115,6 +107,14 @@ export declare const DeepgramSpeech: {
115
107
  } | {
116
108
  readonly type: "compute";
117
109
  readonly seconds: number;
110
+ } | {
111
+ readonly type: "tokens";
112
+ readonly input?: number | undefined;
113
+ readonly output?: number | undefined;
114
+ readonly total?: number | undefined;
115
+ readonly details?: {
116
+ readonly [x: string]: unknown;
117
+ } | undefined;
118
118
  } | undefined;
119
119
  readonly notices?: readonly {
120
120
  readonly type: "filtered" | "moderated" | "other";
@@ -19,14 +19,6 @@ export type ElevenLabsSpeechOptions = {
19
19
  } & Record<string, unknown>;
20
20
  export type Request = SpeechRequestFor<ElevenLabsSpeechOptions>;
21
21
  export declare const protocol: MediaProtocol.Streamed<Request, {
22
- readonly type: "generation-queued";
23
- readonly id: string;
24
- readonly position?: number | undefined;
25
- } | {
26
- readonly type: "generation-progress";
27
- readonly id: string;
28
- readonly progress?: number | undefined;
29
- } | {
30
22
  readonly type: "audio-delta";
31
23
  readonly chunk: Uint8Array<ArrayBufferLike>;
32
24
  } | {
@@ -36,18 +28,18 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
36
28
  readonly startSeconds: number;
37
29
  readonly endSeconds: number;
38
30
  }[];
31
+ } | {
32
+ readonly type: "generation-queued";
33
+ readonly id: string;
34
+ readonly position?: number | undefined;
35
+ } | {
36
+ readonly type: "generation-progress";
37
+ readonly id: string;
38
+ readonly progress?: number | undefined;
39
39
  } | {
40
40
  readonly type: "finish";
41
41
  readonly audio: import("../media.js").Asset;
42
42
  readonly usage?: {
43
- readonly type: "tokens";
44
- readonly input?: number | undefined;
45
- readonly output?: number | undefined;
46
- readonly total?: number | undefined;
47
- readonly details?: {
48
- readonly [x: string]: unknown;
49
- } | undefined;
50
- } | {
51
43
  readonly type: "seconds";
52
44
  readonly seconds: number;
53
45
  } | {
@@ -59,6 +51,14 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
59
51
  } | {
60
52
  readonly type: "compute";
61
53
  readonly seconds: number;
54
+ } | {
55
+ readonly type: "tokens";
56
+ readonly input?: number | undefined;
57
+ readonly output?: number | undefined;
58
+ readonly total?: number | undefined;
59
+ readonly details?: {
60
+ readonly [x: string]: unknown;
61
+ } | undefined;
62
62
  } | undefined;
63
63
  readonly notices?: readonly {
64
64
  readonly type: "filtered" | "moderated" | "other";
@@ -78,14 +78,6 @@ export declare const protocol: MediaProtocol.Streamed<Request, {
78
78
  export declare const model: (input: MediaRoute.ModelInput) => SpeechModel<ElevenLabsSpeechOptions>;
79
79
  export declare const ElevenLabsSpeech: {
80
80
  readonly protocol: MediaProtocol.Streamed<Request, {
81
- readonly type: "generation-queued";
82
- readonly id: string;
83
- readonly position?: number | undefined;
84
- } | {
85
- readonly type: "generation-progress";
86
- readonly id: string;
87
- readonly progress?: number | undefined;
88
- } | {
89
81
  readonly type: "audio-delta";
90
82
  readonly chunk: Uint8Array<ArrayBufferLike>;
91
83
  } | {
@@ -95,18 +87,18 @@ export declare const ElevenLabsSpeech: {
95
87
  readonly startSeconds: number;
96
88
  readonly endSeconds: number;
97
89
  }[];
90
+ } | {
91
+ readonly type: "generation-queued";
92
+ readonly id: string;
93
+ readonly position?: number | undefined;
94
+ } | {
95
+ readonly type: "generation-progress";
96
+ readonly id: string;
97
+ readonly progress?: number | undefined;
98
98
  } | {
99
99
  readonly type: "finish";
100
100
  readonly audio: import("../media.js").Asset;
101
101
  readonly usage?: {
102
- readonly type: "tokens";
103
- readonly input?: number | undefined;
104
- readonly output?: number | undefined;
105
- readonly total?: number | undefined;
106
- readonly details?: {
107
- readonly [x: string]: unknown;
108
- } | undefined;
109
- } | {
110
102
  readonly type: "seconds";
111
103
  readonly seconds: number;
112
104
  } | {
@@ -118,6 +110,14 @@ export declare const ElevenLabsSpeech: {
118
110
  } | {
119
111
  readonly type: "compute";
120
112
  readonly seconds: number;
113
+ } | {
114
+ readonly type: "tokens";
115
+ readonly input?: number | undefined;
116
+ readonly output?: number | undefined;
117
+ readonly total?: number | undefined;
118
+ readonly details?: {
119
+ readonly [x: string]: unknown;
120
+ } | undefined;
121
121
  } | undefined;
122
122
  readonly notices?: readonly {
123
123
  readonly type: "filtered" | "moderated" | "other";