@opencode/ai 2.0.31 → 2.1.0

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 (152) hide show
  1. package/dist/ai-client.d.ts +2 -2
  2. package/dist/experimental/evaluation-client.d.ts +1 -1
  3. package/dist/experimental/evaluation.d.ts +20 -20
  4. package/dist/experimental/realtime.d.ts +47 -0
  5. package/dist/experimental/realtime.js +99 -0
  6. package/dist/experimental/system-one.d.ts +1 -1
  7. package/dist/experimental.d.ts +2 -0
  8. package/dist/experimental.js +1 -0
  9. package/dist/image-client.d.ts +8 -8
  10. package/dist/image.d.ts +593 -437
  11. package/dist/llm.d.ts +51 -51
  12. package/dist/media-client.d.ts +1 -1
  13. package/dist/media.d.ts +4 -4
  14. package/dist/promise.d.ts +199 -198
  15. package/dist/protocols/alibaba-chat.d.ts +81 -82
  16. package/dist/protocols/alibaba-chat.js +0 -1
  17. package/dist/protocols/alibaba-messages.d.ts +99 -99
  18. package/dist/protocols/alibaba-responses.d.ts +120 -120
  19. package/dist/protocols/anthropic-messages.d.ts +187 -187
  20. package/dist/protocols/anthropic-messages.js +3 -2
  21. package/dist/protocols/assemblyai-transcription.d.ts +1 -1
  22. package/dist/protocols/bedrock-converse.d.ts +75 -79
  23. package/dist/protocols/bfl-images.d.ts +1 -1
  24. package/dist/protocols/cartesia-speech.d.ts +17 -17
  25. package/dist/protocols/cohere-chat.d.ts +26 -23
  26. package/dist/protocols/cohere-chat.js +22 -1
  27. package/dist/protocols/deepgram-speech.d.ts +17 -17
  28. package/dist/protocols/deepgram-transcription.d.ts +1 -1
  29. package/dist/protocols/elevenlabs-speech.d.ts +17 -17
  30. package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
  31. package/dist/protocols/fal-images.d.ts +1 -1
  32. package/dist/protocols/fal-video.d.ts +1 -1
  33. package/dist/protocols/gemini.d.ts +55 -55
  34. package/dist/protocols/gemini.js +11 -1
  35. package/dist/protocols/google-images.d.ts +1 -1
  36. package/dist/protocols/google-interactions.d.ts +64 -62
  37. package/dist/protocols/google-interactions.js +19 -1
  38. package/dist/protocols/google-speech.d.ts +17 -17
  39. package/dist/protocols/google-transcription.d.ts +47 -47
  40. package/dist/protocols/google-video.d.ts +1 -1
  41. package/dist/protocols/meta-messages.d.ts +121 -121
  42. package/dist/protocols/meta-responses.d.ts +201 -201
  43. package/dist/protocols/mistral-chat.d.ts +45 -45
  44. package/dist/protocols/open-responses-channel.d.ts +1 -1
  45. package/dist/protocols/open-responses.d.ts +584 -450
  46. package/dist/protocols/open-responses.js +27 -35
  47. package/dist/protocols/openai-chat.d.ts +248 -248
  48. package/dist/protocols/openai-chat.js +11 -42
  49. package/dist/protocols/openai-compatible-chat.d.ts +32 -32
  50. package/dist/protocols/openai-compatible-responses.d.ts +88 -88
  51. package/dist/protocols/openai-images.d.ts +17 -17
  52. package/dist/protocols/openai-responses.d.ts +567 -567
  53. package/dist/protocols/openai-responses.js +1 -1
  54. package/dist/protocols/openai-speech.d.ts +17 -17
  55. package/dist/protocols/openai-transcription.d.ts +47 -47
  56. package/dist/protocols/replicate-images.d.ts +1 -1
  57. package/dist/protocols/runway-video.d.ts +1 -1
  58. package/dist/protocols/shared.d.ts +12 -1
  59. package/dist/protocols/shared.js +17 -1
  60. package/dist/protocols/stability-images.d.ts +2 -2
  61. package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
  62. package/dist/protocols/utils/bedrock-media.d.ts +4 -4
  63. package/dist/protocols/utils/openai-options.d.ts +1 -1
  64. package/dist/protocols/utils/speech-stream.d.ts +1 -1
  65. package/dist/protocols/utils/tool-schema.d.ts +10 -5
  66. package/dist/protocols/utils/tool-stream.d.ts +152 -152
  67. package/dist/protocols/venice-chat.d.ts +109 -110
  68. package/dist/protocols/venice-chat.js +0 -1
  69. package/dist/protocols/xai-images.d.ts +1 -1
  70. package/dist/protocols/xai-responses.d.ts +79 -79
  71. package/dist/protocols/xai-video.d.ts +1 -1
  72. package/dist/protocols/zai-chat.d.ts +77 -78
  73. package/dist/protocols/zai-chat.js +0 -1
  74. package/dist/protocols/zai-images.d.ts +1 -1
  75. package/dist/protocols/zai-messages.d.ts +97 -97
  76. package/dist/providers/alibaba.d.ts +222 -283
  77. package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
  78. package/dist/providers/amazon-bedrock.d.ts +22 -28
  79. package/dist/providers/anthropic-compatible.d.ts +86 -90
  80. package/dist/providers/anthropic.d.ts +86 -90
  81. package/dist/providers/assemblyai.d.ts +2 -6
  82. package/dist/providers/azure.d.ts +228 -238
  83. package/dist/providers/baseten.d.ts +66 -70
  84. package/dist/providers/black-forest-labs.d.ts +2 -6
  85. package/dist/providers/cartesia.d.ts +2 -6
  86. package/dist/providers/cerebras.d.ts +66 -70
  87. package/dist/providers/cerebras.js +0 -1
  88. package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
  89. package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
  90. package/dist/providers/cohere.d.ts +122 -132
  91. package/dist/providers/cohere.js +0 -2
  92. package/dist/providers/deepgram.d.ts +2 -7
  93. package/dist/providers/deepinfra.d.ts +66 -70
  94. package/dist/providers/deepinfra.js +0 -1
  95. package/dist/providers/deepseek.d.ts +66 -70
  96. package/dist/providers/deepseek.js +1 -1
  97. package/dist/providers/digitalocean.d.ts +137 -141
  98. package/dist/providers/elevenlabs.d.ts +2 -7
  99. package/dist/providers/fal.d.ts +2 -7
  100. package/dist/providers/fireworks.d.ts +66 -70
  101. package/dist/providers/google-vertex-chat.d.ts +34 -38
  102. package/dist/providers/google-vertex-interactions.d.ts +31 -41
  103. package/dist/providers/google-vertex-messages.d.ts +81 -85
  104. package/dist/providers/google-vertex-mistral.d.ts +23 -27
  105. package/dist/providers/google-vertex-responses.d.ts +90 -94
  106. package/dist/providers/google-vertex.d.ts +26 -30
  107. package/dist/providers/google.d.ts +94 -109
  108. package/dist/providers/groq.d.ts +111 -115
  109. package/dist/providers/groq.js +0 -1
  110. package/dist/providers/meta.d.ts +309 -317
  111. package/dist/providers/meta.js +1 -1
  112. package/dist/providers/minimax.d.ts +296 -303
  113. package/dist/providers/minimax.js +1 -1
  114. package/dist/providers/mistral.d.ts +22 -26
  115. package/dist/providers/moonshot.d.ts +296 -303
  116. package/dist/providers/moonshot.js +0 -1
  117. package/dist/providers/openai-compatible-responses.d.ts +90 -94
  118. package/dist/providers/openai-compatible.d.ts +34 -38
  119. package/dist/providers/openai.d.ts +93 -108
  120. package/dist/providers/opencode.d.ts +2 -8
  121. package/dist/providers/openrouter.d.ts +137 -144
  122. package/dist/providers/replicate.d.ts +2 -6
  123. package/dist/providers/runway.d.ts +2 -6
  124. package/dist/providers/stability.d.ts +2 -7
  125. package/dist/providers/togetherai.d.ts +66 -70
  126. package/dist/providers/togetherai.js +1 -1
  127. package/dist/providers/typesafe-ai.d.ts +2 -8
  128. package/dist/providers/venice.d.ts +58 -63
  129. package/dist/providers/vercel-ai-gateway.d.ts +2 -12
  130. package/dist/providers/xai.d.ts +38 -50
  131. package/dist/providers/zai-coding-plan.d.ts +206 -213
  132. package/dist/providers/zai.d.ts +40 -46
  133. package/dist/route/client.d.ts +51 -51
  134. package/dist/route/media-protocol.d.ts +1 -1
  135. package/dist/route/transport/http.d.ts +1 -1
  136. package/dist/route/transport/websocket.d.ts +8 -8
  137. package/dist/schema/errors.d.ts +19 -19
  138. package/dist/schema/events.d.ts +3090 -3288
  139. package/dist/schema/messages.d.ts +8 -7
  140. package/dist/schema/options.d.ts +2 -1
  141. package/dist/schema/options.js +2 -1
  142. package/dist/speech-client.d.ts +8 -8
  143. package/dist/speech.d.ts +434 -398
  144. package/dist/testing.d.ts +338 -338
  145. package/dist/tool-runtime.d.ts +1 -1
  146. package/dist/transcription-client.d.ts +23 -23
  147. package/dist/transcription.d.ts +562 -646
  148. package/dist/utils/sanitize.d.ts +4 -0
  149. package/dist/utils/sanitize.js +23 -6
  150. package/dist/video-client.d.ts +8 -8
  151. package/dist/video.d.ts +416 -372
  152. package/package.json +6 -6
package/dist/promise.d.ts CHANGED
@@ -2,6 +2,7 @@ import { Effect, Layer } from "effect";
2
2
  import { AIClient } from "./ai-client.js";
3
3
  import type { AwaitOptions, Event, Snapshot } from "./generation.js";
4
4
  import { type ImageModel, type ImageRequest, type ImageRequestInput } from "./image.js";
5
+ import { LLM } from "./index.js";
5
6
  import { Media } from "./media.js";
6
7
  import { RequestExecutor } from "./route/executor.js";
7
8
  import { LanguageModel, LLMRequest } from "./schema/index.js";
@@ -49,34 +50,22 @@ export declare const make: (options?: Options) => {
49
50
  /** Write an asset's bytes like `Media.write`, downloading `url` sources through the executor. */
50
51
  write: (asset: Media.Asset, path: string, options?: RunOptions) => Promise<void>;
51
52
  llm: {
52
- request: <const SelectedLanguageModel extends LanguageModel>(input: RequestInput<SelectedLanguageModel>) => LLMRequest<SelectedLanguageModel>;
53
+ request: typeof LLM.request;
53
54
  generate: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: RunOptions) => Promise<import("./index.js").LLMResponse>;
54
- stream: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: RunOptions) => AsyncIterable<({
55
- readonly type: "compaction";
56
- readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
57
- readonly id?: string | undefined;
58
- readonly text?: string | null | undefined;
59
- readonly encrypted?: string | undefined;
60
- } & ({
61
- readonly encrypted: string;
62
- readonly text?: never;
63
- } | {
64
- readonly text: string | null;
65
- readonly encrypted?: never;
66
- })) | {
55
+ stream: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: RunOptions) => AsyncIterable<{
67
56
  readonly type: "step-start";
68
57
  readonly index: number;
69
58
  } | {
70
- readonly id: string;
71
59
  readonly type: "text-start";
60
+ readonly id: string;
72
61
  readonly providerMetadata?: {
73
62
  readonly [x: string]: {
74
63
  readonly [x: string]: unknown;
75
64
  };
76
65
  } | undefined;
77
66
  } | {
78
- readonly id: string;
79
67
  readonly type: "text-delta";
68
+ readonly id: string;
80
69
  readonly text: string;
81
70
  readonly providerMetadata?: {
82
71
  readonly [x: string]: {
@@ -84,8 +73,8 @@ export declare const make: (options?: Options) => {
84
73
  };
85
74
  } | undefined;
86
75
  } | {
87
- readonly id: string;
88
76
  readonly type: "text-end";
77
+ readonly id: string;
89
78
  readonly text?: string | undefined;
90
79
  readonly providerMetadata?: {
91
80
  readonly [x: string]: {
@@ -93,16 +82,16 @@ export declare const make: (options?: Options) => {
93
82
  };
94
83
  } | undefined;
95
84
  } | {
96
- readonly id: string;
97
85
  readonly type: "reasoning-start";
86
+ readonly id: string;
98
87
  readonly providerMetadata?: {
99
88
  readonly [x: string]: {
100
89
  readonly [x: string]: unknown;
101
90
  };
102
91
  } | undefined;
103
92
  } | {
104
- readonly id: string;
105
93
  readonly type: "reasoning-delta";
94
+ readonly id: string;
106
95
  readonly text: string;
107
96
  readonly providerMetadata?: {
108
97
  readonly [x: string]: {
@@ -110,8 +99,8 @@ export declare const make: (options?: Options) => {
110
99
  };
111
100
  } | undefined;
112
101
  } | {
113
- readonly id: string;
114
102
  readonly type: "reasoning-end";
103
+ readonly id: string;
115
104
  readonly text?: string | undefined;
116
105
  readonly providerMetadata?: {
117
106
  readonly [x: string]: {
@@ -119,55 +108,56 @@ export declare const make: (options?: Options) => {
119
108
  };
120
109
  } | undefined;
121
110
  } | {
122
- readonly id: string;
123
111
  readonly type: "tool-input-start";
112
+ readonly id: string;
124
113
  readonly name: string;
114
+ readonly namespace?: string | undefined;
115
+ readonly providerExecuted?: boolean | undefined;
125
116
  readonly providerMetadata?: {
126
117
  readonly [x: string]: {
127
118
  readonly [x: string]: unknown;
128
119
  };
129
120
  } | undefined;
130
- readonly namespace?: string | undefined;
131
- readonly providerExecuted?: boolean | undefined;
132
121
  } | {
133
- readonly id: string;
134
122
  readonly type: "tool-input-delta";
123
+ readonly id: string;
135
124
  readonly name: string;
125
+ readonly namespace?: string | undefined;
136
126
  readonly text: string;
137
127
  readonly input?: unknown;
138
- readonly namespace?: string | undefined;
139
128
  } | {
140
- readonly id: string;
141
129
  readonly type: "tool-input-end";
130
+ readonly id: string;
142
131
  readonly name: string;
132
+ readonly namespace?: string | undefined;
143
133
  readonly providerMetadata?: {
144
134
  readonly [x: string]: {
145
135
  readonly [x: string]: unknown;
146
136
  };
147
137
  } | undefined;
148
- readonly namespace?: string | undefined;
149
138
  } | {
150
- readonly id: string;
151
139
  readonly type: "tool-input-error";
140
+ readonly id: string;
152
141
  readonly name: string;
153
- readonly raw: string;
154
142
  readonly namespace?: string | undefined;
143
+ readonly raw: string;
155
144
  } | {
156
- readonly id: string;
157
145
  readonly type: "tool-call";
146
+ readonly id: string;
158
147
  readonly name: string;
148
+ readonly namespace?: string | undefined;
159
149
  readonly input: unknown;
150
+ readonly providerExecuted?: boolean | undefined;
160
151
  readonly providerMetadata?: {
161
152
  readonly [x: string]: {
162
153
  readonly [x: string]: unknown;
163
154
  };
164
155
  } | undefined;
165
- readonly namespace?: string | undefined;
166
- readonly providerExecuted?: boolean | undefined;
167
156
  } | {
168
- readonly id: string;
169
157
  readonly type: "tool-result";
158
+ readonly id: string;
170
159
  readonly name: string;
160
+ readonly namespace?: string | undefined;
171
161
  readonly result: {
172
162
  readonly type: "json";
173
163
  readonly value: unknown;
@@ -201,28 +191,19 @@ export declare const make: (options?: Options) => {
201
191
  readonly name?: string | undefined;
202
192
  })[];
203
193
  } | undefined;
194
+ readonly providerExecuted?: boolean | undefined;
204
195
  readonly providerMetadata?: {
205
196
  readonly [x: string]: {
206
197
  readonly [x: string]: unknown;
207
198
  };
208
199
  } | undefined;
209
- readonly namespace?: string | undefined;
210
- readonly providerExecuted?: boolean | undefined;
211
200
  } | {
212
- readonly id: string;
213
201
  readonly type: "tool-error";
214
- readonly message: string;
202
+ readonly id: string;
215
203
  readonly name: string;
216
- readonly error?: unknown;
217
- readonly providerMetadata?: {
218
- readonly [x: string]: {
219
- readonly [x: string]: unknown;
220
- };
221
- } | undefined;
222
204
  readonly namespace?: string | undefined;
223
- } | {
224
- readonly type: "media";
225
- readonly media: Media.Asset;
205
+ readonly message: string;
206
+ readonly error?: unknown;
226
207
  readonly providerMetadata?: {
227
208
  readonly [x: string]: {
228
209
  readonly [x: string]: unknown;
@@ -230,33 +211,41 @@ export declare const make: (options?: Options) => {
230
211
  } | undefined;
231
212
  } | {
232
213
  readonly type: "step-finish";
214
+ readonly index: number;
233
215
  readonly reason: {
234
- readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
216
+ readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
235
217
  readonly raw?: string | undefined;
236
218
  readonly category?: string | undefined;
237
219
  readonly explanation?: string | undefined;
238
220
  };
239
- readonly index: number;
221
+ readonly usage?: import("./index.js").Usage | undefined;
240
222
  readonly providerMetadata?: {
241
223
  readonly [x: string]: {
242
224
  readonly [x: string]: unknown;
243
225
  };
244
226
  } | undefined;
245
- readonly usage?: import("./index.js").Usage | undefined;
246
227
  } | {
247
228
  readonly type: "finish";
248
229
  readonly reason: {
249
- readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
230
+ readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
250
231
  readonly raw?: string | undefined;
251
232
  readonly category?: string | undefined;
252
233
  readonly explanation?: string | undefined;
253
234
  };
235
+ readonly usage?: import("./index.js").Usage | undefined;
236
+ readonly providerMetadata?: {
237
+ readonly [x: string]: {
238
+ readonly [x: string]: unknown;
239
+ };
240
+ } | undefined;
241
+ } | {
242
+ readonly type: "media";
243
+ readonly media: Media.Asset;
254
244
  readonly providerMetadata?: {
255
245
  readonly [x: string]: {
256
246
  readonly [x: string]: unknown;
257
247
  };
258
248
  } | undefined;
259
- readonly usage?: import("./index.js").Usage | undefined;
260
249
  } | {
261
250
  readonly type: "provider-error";
262
251
  readonly message: string;
@@ -266,18 +255,30 @@ export declare const make: (options?: Options) => {
266
255
  readonly [x: string]: unknown;
267
256
  };
268
257
  } | undefined;
269
- }>;
258
+ } | ({
259
+ readonly type: "compaction";
260
+ readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
261
+ readonly id?: string | undefined;
262
+ readonly encrypted?: string | undefined;
263
+ readonly text?: string | null | undefined;
264
+ } & ({
265
+ readonly encrypted: string;
266
+ readonly text?: never;
267
+ } | {
268
+ readonly text: string | null;
269
+ readonly encrypted?: never;
270
+ }))>;
270
271
  };
271
272
  image: {
272
273
  request: typeof import("./image.js").request;
273
274
  generate: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => Promise<import("./image.js").ImageResponse>;
274
275
  stream: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
275
- readonly id: string;
276
276
  readonly type: "generation-queued";
277
+ readonly id: string;
277
278
  readonly position?: number | undefined;
278
279
  } | {
279
- readonly id: string;
280
280
  readonly type: "generation-progress";
281
+ readonly id: string;
281
282
  readonly progress?: number | undefined;
282
283
  } | {
283
284
  readonly type: "image-partial";
@@ -289,11 +290,6 @@ export declare const make: (options?: Options) => {
289
290
  readonly image: Media.Asset;
290
291
  } | {
291
292
  readonly type: "finish";
292
- readonly providerMetadata?: {
293
- readonly [x: string]: {
294
- readonly [x: string]: unknown;
295
- };
296
- } | undefined;
297
293
  readonly usage?: {
298
294
  readonly type: "tokens";
299
295
  readonly input?: number | undefined;
@@ -316,7 +312,7 @@ export declare const make: (options?: Options) => {
316
312
  readonly seconds: number;
317
313
  } | undefined;
318
314
  readonly notices?: readonly {
319
- readonly type: "other" | "moderated" | "filtered";
315
+ readonly type: "filtered" | "moderated" | "other";
320
316
  readonly message: string;
321
317
  readonly providerMetadata?: {
322
318
  readonly [x: string]: {
@@ -324,6 +320,11 @@ export declare const make: (options?: Options) => {
324
320
  };
325
321
  } | undefined;
326
322
  }[] | undefined;
323
+ readonly providerMetadata?: {
324
+ readonly [x: string]: {
325
+ readonly [x: string]: unknown;
326
+ };
327
+ } | undefined;
327
328
  }>;
328
329
  start: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: RunOptions) => Promise<GenerationHandle<import("./image.js").ImageResponse>>;
329
330
  resume: (model: ImageModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./image.js").ImageResponse>>;
@@ -334,12 +335,12 @@ export declare const make: (options?: Options) => {
334
335
  generate: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => Promise<import("./video.js").VideoResponse>;
335
336
  resume: (model: VideoModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./video.js").VideoResponse>>;
336
337
  stream: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
337
- readonly id: string;
338
338
  readonly type: "generation-queued";
339
+ readonly id: string;
339
340
  readonly position?: number | undefined;
340
341
  } | {
341
- readonly id: string;
342
342
  readonly type: "generation-progress";
343
+ readonly id: string;
343
344
  readonly progress?: number | undefined;
344
345
  } | {
345
346
  readonly type: "video";
@@ -347,11 +348,6 @@ export declare const make: (options?: Options) => {
347
348
  readonly video: Media.Asset;
348
349
  } | {
349
350
  readonly type: "finish";
350
- readonly providerMetadata?: {
351
- readonly [x: string]: {
352
- readonly [x: string]: unknown;
353
- };
354
- } | undefined;
355
351
  readonly usage?: {
356
352
  readonly type: "tokens";
357
353
  readonly input?: number | undefined;
@@ -374,7 +370,7 @@ export declare const make: (options?: Options) => {
374
370
  readonly seconds: number;
375
371
  } | undefined;
376
372
  readonly notices?: readonly {
377
- readonly type: "other" | "moderated" | "filtered";
373
+ readonly type: "filtered" | "moderated" | "other";
378
374
  readonly message: string;
379
375
  readonly providerMetadata?: {
380
376
  readonly [x: string]: {
@@ -382,18 +378,23 @@ export declare const make: (options?: Options) => {
382
378
  };
383
379
  } | undefined;
384
380
  }[] | undefined;
381
+ readonly providerMetadata?: {
382
+ readonly [x: string]: {
383
+ readonly [x: string]: unknown;
384
+ };
385
+ } | undefined;
385
386
  }>;
386
387
  };
387
388
  speech: {
388
389
  request: typeof import("./speech.js").request;
389
390
  generate: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => Promise<import("./speech.js").SpeechResponse>;
390
391
  stream: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => AsyncIterable<{
391
- readonly id: string;
392
392
  readonly type: "generation-queued";
393
+ readonly id: string;
393
394
  readonly position?: number | undefined;
394
395
  } | {
395
- readonly id: string;
396
396
  readonly type: "generation-progress";
397
+ readonly id: string;
397
398
  readonly progress?: number | undefined;
398
399
  } | {
399
400
  readonly type: "audio-delta";
@@ -408,11 +409,6 @@ export declare const make: (options?: Options) => {
408
409
  } | {
409
410
  readonly type: "finish";
410
411
  readonly audio: Media.Asset;
411
- readonly providerMetadata?: {
412
- readonly [x: string]: {
413
- readonly [x: string]: unknown;
414
- };
415
- } | undefined;
416
412
  readonly usage?: {
417
413
  readonly type: "tokens";
418
414
  readonly input?: number | undefined;
@@ -435,7 +431,7 @@ export declare const make: (options?: Options) => {
435
431
  readonly seconds: number;
436
432
  } | undefined;
437
433
  readonly notices?: readonly {
438
- readonly type: "other" | "moderated" | "filtered";
434
+ readonly type: "filtered" | "moderated" | "other";
439
435
  readonly message: string;
440
436
  readonly providerMetadata?: {
441
437
  readonly [x: string]: {
@@ -443,18 +439,23 @@ export declare const make: (options?: Options) => {
443
439
  };
444
440
  } | undefined;
445
441
  }[] | undefined;
442
+ readonly providerMetadata?: {
443
+ readonly [x: string]: {
444
+ readonly [x: string]: unknown;
445
+ };
446
+ } | undefined;
446
447
  }>;
447
448
  };
448
449
  transcription: {
449
450
  request: typeof import("./transcription.js").request;
450
451
  generate: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => Promise<import("./transcription.js").TranscriptionResponse>;
451
452
  stream: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
452
- readonly id: string;
453
453
  readonly type: "generation-queued";
454
+ readonly id: string;
454
455
  readonly position?: number | undefined;
455
456
  } | {
456
- readonly id: string;
457
457
  readonly type: "generation-progress";
458
+ readonly id: string;
458
459
  readonly progress?: number | undefined;
459
460
  } | {
460
461
  readonly type: "text-delta";
@@ -468,14 +469,22 @@ export declare const make: (options?: Options) => {
468
469
  readonly speaker?: string | undefined;
469
470
  };
470
471
  } | {
471
- readonly type: "finish";
472
472
  readonly text: string;
473
+ readonly segments?: readonly {
474
+ readonly text: string;
475
+ readonly startSeconds: number;
476
+ readonly endSeconds: number;
477
+ readonly speaker?: string | undefined;
478
+ }[] | undefined;
479
+ readonly words?: readonly {
480
+ readonly text: string;
481
+ readonly startSeconds: number;
482
+ readonly endSeconds: number;
483
+ readonly speaker?: string | undefined;
484
+ readonly confidence?: number | undefined;
485
+ }[] | undefined;
486
+ readonly language?: string | undefined;
473
487
  readonly durationSeconds?: number | undefined;
474
- readonly providerMetadata?: {
475
- readonly [x: string]: {
476
- readonly [x: string]: unknown;
477
- };
478
- } | undefined;
479
488
  readonly usage?: {
480
489
  readonly type: "tokens";
481
490
  readonly input?: number | undefined;
@@ -498,7 +507,7 @@ export declare const make: (options?: Options) => {
498
507
  readonly seconds: number;
499
508
  } | undefined;
500
509
  readonly notices?: readonly {
501
- readonly type: "other" | "moderated" | "filtered";
510
+ readonly type: "filtered" | "moderated" | "other";
502
511
  readonly message: string;
503
512
  readonly providerMetadata?: {
504
513
  readonly [x: string]: {
@@ -506,20 +515,12 @@ export declare const make: (options?: Options) => {
506
515
  };
507
516
  } | undefined;
508
517
  }[] | undefined;
509
- readonly language?: string | undefined;
510
- readonly segments?: readonly {
511
- readonly text: string;
512
- readonly startSeconds: number;
513
- readonly endSeconds: number;
514
- readonly speaker?: string | undefined;
515
- }[] | undefined;
516
- readonly words?: readonly {
517
- readonly text: string;
518
- readonly startSeconds: number;
519
- readonly endSeconds: number;
520
- readonly speaker?: string | undefined;
521
- readonly confidence?: number | undefined;
522
- }[] | undefined;
518
+ readonly providerMetadata?: {
519
+ readonly [x: string]: {
520
+ readonly [x: string]: unknown;
521
+ };
522
+ } | undefined;
523
+ readonly type: "finish";
523
524
  }>;
524
525
  start: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: RunOptions) => Promise<GenerationHandle<import("./transcription.js").TranscriptionResponse>>;
525
526
  resume: (model: TranscriptionModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./transcription.js").TranscriptionResponse>>;
@@ -540,34 +541,22 @@ export declare const ai: {
540
541
  /** Write an asset's bytes like `Media.write`, downloading `url` sources through the executor. */
541
542
  write: (asset: Media.Asset, path: string, options?: RunOptions) => Promise<void>;
542
543
  llm: {
543
- request: <const SelectedLanguageModel extends LanguageModel>(input: RequestInput<SelectedLanguageModel>) => LLMRequest<SelectedLanguageModel>;
544
+ request: typeof LLM.request;
544
545
  generate: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: RunOptions) => Promise<import("./index.js").LLMResponse>;
545
- stream: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: RunOptions) => AsyncIterable<({
546
- readonly type: "compaction";
547
- readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
548
- readonly id?: string | undefined;
549
- readonly text?: string | null | undefined;
550
- readonly encrypted?: string | undefined;
551
- } & ({
552
- readonly encrypted: string;
553
- readonly text?: never;
554
- } | {
555
- readonly text: string | null;
556
- readonly encrypted?: never;
557
- })) | {
546
+ stream: <const Model extends LanguageModel>(input: RequestInput<Model> | LLMRequest, options?: RunOptions) => AsyncIterable<{
558
547
  readonly type: "step-start";
559
548
  readonly index: number;
560
549
  } | {
561
- readonly id: string;
562
550
  readonly type: "text-start";
551
+ readonly id: string;
563
552
  readonly providerMetadata?: {
564
553
  readonly [x: string]: {
565
554
  readonly [x: string]: unknown;
566
555
  };
567
556
  } | undefined;
568
557
  } | {
569
- readonly id: string;
570
558
  readonly type: "text-delta";
559
+ readonly id: string;
571
560
  readonly text: string;
572
561
  readonly providerMetadata?: {
573
562
  readonly [x: string]: {
@@ -575,8 +564,8 @@ export declare const ai: {
575
564
  };
576
565
  } | undefined;
577
566
  } | {
578
- readonly id: string;
579
567
  readonly type: "text-end";
568
+ readonly id: string;
580
569
  readonly text?: string | undefined;
581
570
  readonly providerMetadata?: {
582
571
  readonly [x: string]: {
@@ -584,16 +573,16 @@ export declare const ai: {
584
573
  };
585
574
  } | undefined;
586
575
  } | {
587
- readonly id: string;
588
576
  readonly type: "reasoning-start";
577
+ readonly id: string;
589
578
  readonly providerMetadata?: {
590
579
  readonly [x: string]: {
591
580
  readonly [x: string]: unknown;
592
581
  };
593
582
  } | undefined;
594
583
  } | {
595
- readonly id: string;
596
584
  readonly type: "reasoning-delta";
585
+ readonly id: string;
597
586
  readonly text: string;
598
587
  readonly providerMetadata?: {
599
588
  readonly [x: string]: {
@@ -601,8 +590,8 @@ export declare const ai: {
601
590
  };
602
591
  } | undefined;
603
592
  } | {
604
- readonly id: string;
605
593
  readonly type: "reasoning-end";
594
+ readonly id: string;
606
595
  readonly text?: string | undefined;
607
596
  readonly providerMetadata?: {
608
597
  readonly [x: string]: {
@@ -610,55 +599,56 @@ export declare const ai: {
610
599
  };
611
600
  } | undefined;
612
601
  } | {
613
- readonly id: string;
614
602
  readonly type: "tool-input-start";
603
+ readonly id: string;
615
604
  readonly name: string;
605
+ readonly namespace?: string | undefined;
606
+ readonly providerExecuted?: boolean | undefined;
616
607
  readonly providerMetadata?: {
617
608
  readonly [x: string]: {
618
609
  readonly [x: string]: unknown;
619
610
  };
620
611
  } | undefined;
621
- readonly namespace?: string | undefined;
622
- readonly providerExecuted?: boolean | undefined;
623
612
  } | {
624
- readonly id: string;
625
613
  readonly type: "tool-input-delta";
614
+ readonly id: string;
626
615
  readonly name: string;
616
+ readonly namespace?: string | undefined;
627
617
  readonly text: string;
628
618
  readonly input?: unknown;
629
- readonly namespace?: string | undefined;
630
619
  } | {
631
- readonly id: string;
632
620
  readonly type: "tool-input-end";
621
+ readonly id: string;
633
622
  readonly name: string;
623
+ readonly namespace?: string | undefined;
634
624
  readonly providerMetadata?: {
635
625
  readonly [x: string]: {
636
626
  readonly [x: string]: unknown;
637
627
  };
638
628
  } | undefined;
639
- readonly namespace?: string | undefined;
640
629
  } | {
641
- readonly id: string;
642
630
  readonly type: "tool-input-error";
631
+ readonly id: string;
643
632
  readonly name: string;
644
- readonly raw: string;
645
633
  readonly namespace?: string | undefined;
634
+ readonly raw: string;
646
635
  } | {
647
- readonly id: string;
648
636
  readonly type: "tool-call";
637
+ readonly id: string;
649
638
  readonly name: string;
639
+ readonly namespace?: string | undefined;
650
640
  readonly input: unknown;
641
+ readonly providerExecuted?: boolean | undefined;
651
642
  readonly providerMetadata?: {
652
643
  readonly [x: string]: {
653
644
  readonly [x: string]: unknown;
654
645
  };
655
646
  } | undefined;
656
- readonly namespace?: string | undefined;
657
- readonly providerExecuted?: boolean | undefined;
658
647
  } | {
659
- readonly id: string;
660
648
  readonly type: "tool-result";
649
+ readonly id: string;
661
650
  readonly name: string;
651
+ readonly namespace?: string | undefined;
662
652
  readonly result: {
663
653
  readonly type: "json";
664
654
  readonly value: unknown;
@@ -692,28 +682,19 @@ export declare const ai: {
692
682
  readonly name?: string | undefined;
693
683
  })[];
694
684
  } | undefined;
685
+ readonly providerExecuted?: boolean | undefined;
695
686
  readonly providerMetadata?: {
696
687
  readonly [x: string]: {
697
688
  readonly [x: string]: unknown;
698
689
  };
699
690
  } | undefined;
700
- readonly namespace?: string | undefined;
701
- readonly providerExecuted?: boolean | undefined;
702
691
  } | {
703
- readonly id: string;
704
692
  readonly type: "tool-error";
705
- readonly message: string;
693
+ readonly id: string;
706
694
  readonly name: string;
707
- readonly error?: unknown;
708
- readonly providerMetadata?: {
709
- readonly [x: string]: {
710
- readonly [x: string]: unknown;
711
- };
712
- } | undefined;
713
695
  readonly namespace?: string | undefined;
714
- } | {
715
- readonly type: "media";
716
- readonly media: Media.Asset;
696
+ readonly message: string;
697
+ readonly error?: unknown;
717
698
  readonly providerMetadata?: {
718
699
  readonly [x: string]: {
719
700
  readonly [x: string]: unknown;
@@ -721,33 +702,41 @@ export declare const ai: {
721
702
  } | undefined;
722
703
  } | {
723
704
  readonly type: "step-finish";
705
+ readonly index: number;
724
706
  readonly reason: {
725
- readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
707
+ readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
726
708
  readonly raw?: string | undefined;
727
709
  readonly category?: string | undefined;
728
710
  readonly explanation?: string | undefined;
729
711
  };
730
- readonly index: number;
712
+ readonly usage?: import("./index.js").Usage | undefined;
731
713
  readonly providerMetadata?: {
732
714
  readonly [x: string]: {
733
715
  readonly [x: string]: unknown;
734
716
  };
735
717
  } | undefined;
736
- readonly usage?: import("./index.js").Usage | undefined;
737
718
  } | {
738
719
  readonly type: "finish";
739
720
  readonly reason: {
740
- readonly normalized: "length" | "stop" | "tool-calls" | "content-filter" | "error" | "unknown";
721
+ readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
741
722
  readonly raw?: string | undefined;
742
723
  readonly category?: string | undefined;
743
724
  readonly explanation?: string | undefined;
744
725
  };
726
+ readonly usage?: import("./index.js").Usage | undefined;
727
+ readonly providerMetadata?: {
728
+ readonly [x: string]: {
729
+ readonly [x: string]: unknown;
730
+ };
731
+ } | undefined;
732
+ } | {
733
+ readonly type: "media";
734
+ readonly media: Media.Asset;
745
735
  readonly providerMetadata?: {
746
736
  readonly [x: string]: {
747
737
  readonly [x: string]: unknown;
748
738
  };
749
739
  } | undefined;
750
- readonly usage?: import("./index.js").Usage | undefined;
751
740
  } | {
752
741
  readonly type: "provider-error";
753
742
  readonly message: string;
@@ -757,18 +746,30 @@ export declare const ai: {
757
746
  readonly [x: string]: unknown;
758
747
  };
759
748
  } | undefined;
760
- }>;
749
+ } | ({
750
+ readonly type: "compaction";
751
+ readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
752
+ readonly id?: string | undefined;
753
+ readonly encrypted?: string | undefined;
754
+ readonly text?: string | null | undefined;
755
+ } & ({
756
+ readonly encrypted: string;
757
+ readonly text?: never;
758
+ } | {
759
+ readonly text: string | null;
760
+ readonly encrypted?: never;
761
+ }))>;
761
762
  };
762
763
  image: {
763
764
  request: typeof import("./image.js").request;
764
765
  generate: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => Promise<import("./image.js").ImageResponse>;
765
766
  stream: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
766
- readonly id: string;
767
767
  readonly type: "generation-queued";
768
+ readonly id: string;
768
769
  readonly position?: number | undefined;
769
770
  } | {
770
- readonly id: string;
771
771
  readonly type: "generation-progress";
772
+ readonly id: string;
772
773
  readonly progress?: number | undefined;
773
774
  } | {
774
775
  readonly type: "image-partial";
@@ -780,11 +781,6 @@ export declare const ai: {
780
781
  readonly image: Media.Asset;
781
782
  } | {
782
783
  readonly type: "finish";
783
- readonly providerMetadata?: {
784
- readonly [x: string]: {
785
- readonly [x: string]: unknown;
786
- };
787
- } | undefined;
788
784
  readonly usage?: {
789
785
  readonly type: "tokens";
790
786
  readonly input?: number | undefined;
@@ -807,7 +803,7 @@ export declare const ai: {
807
803
  readonly seconds: number;
808
804
  } | undefined;
809
805
  readonly notices?: readonly {
810
- readonly type: "other" | "moderated" | "filtered";
806
+ readonly type: "filtered" | "moderated" | "other";
811
807
  readonly message: string;
812
808
  readonly providerMetadata?: {
813
809
  readonly [x: string]: {
@@ -815,6 +811,11 @@ export declare const ai: {
815
811
  };
816
812
  } | undefined;
817
813
  }[] | undefined;
814
+ readonly providerMetadata?: {
815
+ readonly [x: string]: {
816
+ readonly [x: string]: unknown;
817
+ };
818
+ } | undefined;
818
819
  }>;
819
820
  start: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: RunOptions) => Promise<GenerationHandle<import("./image.js").ImageResponse>>;
820
821
  resume: (model: ImageModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./image.js").ImageResponse>>;
@@ -825,12 +826,12 @@ export declare const ai: {
825
826
  generate: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => Promise<import("./video.js").VideoResponse>;
826
827
  resume: (model: VideoModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./video.js").VideoResponse>>;
827
828
  stream: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
828
- readonly id: string;
829
829
  readonly type: "generation-queued";
830
+ readonly id: string;
830
831
  readonly position?: number | undefined;
831
832
  } | {
832
- readonly id: string;
833
833
  readonly type: "generation-progress";
834
+ readonly id: string;
834
835
  readonly progress?: number | undefined;
835
836
  } | {
836
837
  readonly type: "video";
@@ -838,11 +839,6 @@ export declare const ai: {
838
839
  readonly video: Media.Asset;
839
840
  } | {
840
841
  readonly type: "finish";
841
- readonly providerMetadata?: {
842
- readonly [x: string]: {
843
- readonly [x: string]: unknown;
844
- };
845
- } | undefined;
846
842
  readonly usage?: {
847
843
  readonly type: "tokens";
848
844
  readonly input?: number | undefined;
@@ -865,7 +861,7 @@ export declare const ai: {
865
861
  readonly seconds: number;
866
862
  } | undefined;
867
863
  readonly notices?: readonly {
868
- readonly type: "other" | "moderated" | "filtered";
864
+ readonly type: "filtered" | "moderated" | "other";
869
865
  readonly message: string;
870
866
  readonly providerMetadata?: {
871
867
  readonly [x: string]: {
@@ -873,18 +869,23 @@ export declare const ai: {
873
869
  };
874
870
  } | undefined;
875
871
  }[] | undefined;
872
+ readonly providerMetadata?: {
873
+ readonly [x: string]: {
874
+ readonly [x: string]: unknown;
875
+ };
876
+ } | undefined;
876
877
  }>;
877
878
  };
878
879
  speech: {
879
880
  request: typeof import("./speech.js").request;
880
881
  generate: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => Promise<import("./speech.js").SpeechResponse>;
881
882
  stream: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => AsyncIterable<{
882
- readonly id: string;
883
883
  readonly type: "generation-queued";
884
+ readonly id: string;
884
885
  readonly position?: number | undefined;
885
886
  } | {
886
- readonly id: string;
887
887
  readonly type: "generation-progress";
888
+ readonly id: string;
888
889
  readonly progress?: number | undefined;
889
890
  } | {
890
891
  readonly type: "audio-delta";
@@ -899,11 +900,6 @@ export declare const ai: {
899
900
  } | {
900
901
  readonly type: "finish";
901
902
  readonly audio: Media.Asset;
902
- readonly providerMetadata?: {
903
- readonly [x: string]: {
904
- readonly [x: string]: unknown;
905
- };
906
- } | undefined;
907
903
  readonly usage?: {
908
904
  readonly type: "tokens";
909
905
  readonly input?: number | undefined;
@@ -926,7 +922,7 @@ export declare const ai: {
926
922
  readonly seconds: number;
927
923
  } | undefined;
928
924
  readonly notices?: readonly {
929
- readonly type: "other" | "moderated" | "filtered";
925
+ readonly type: "filtered" | "moderated" | "other";
930
926
  readonly message: string;
931
927
  readonly providerMetadata?: {
932
928
  readonly [x: string]: {
@@ -934,18 +930,23 @@ export declare const ai: {
934
930
  };
935
931
  } | undefined;
936
932
  }[] | undefined;
933
+ readonly providerMetadata?: {
934
+ readonly [x: string]: {
935
+ readonly [x: string]: unknown;
936
+ };
937
+ } | undefined;
937
938
  }>;
938
939
  };
939
940
  transcription: {
940
941
  request: typeof import("./transcription.js").request;
941
942
  generate: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => Promise<import("./transcription.js").TranscriptionResponse>;
942
943
  stream: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
943
- readonly id: string;
944
944
  readonly type: "generation-queued";
945
+ readonly id: string;
945
946
  readonly position?: number | undefined;
946
947
  } | {
947
- readonly id: string;
948
948
  readonly type: "generation-progress";
949
+ readonly id: string;
949
950
  readonly progress?: number | undefined;
950
951
  } | {
951
952
  readonly type: "text-delta";
@@ -959,14 +960,22 @@ export declare const ai: {
959
960
  readonly speaker?: string | undefined;
960
961
  };
961
962
  } | {
962
- readonly type: "finish";
963
963
  readonly text: string;
964
+ readonly segments?: readonly {
965
+ readonly text: string;
966
+ readonly startSeconds: number;
967
+ readonly endSeconds: number;
968
+ readonly speaker?: string | undefined;
969
+ }[] | undefined;
970
+ readonly words?: readonly {
971
+ readonly text: string;
972
+ readonly startSeconds: number;
973
+ readonly endSeconds: number;
974
+ readonly speaker?: string | undefined;
975
+ readonly confidence?: number | undefined;
976
+ }[] | undefined;
977
+ readonly language?: string | undefined;
964
978
  readonly durationSeconds?: number | undefined;
965
- readonly providerMetadata?: {
966
- readonly [x: string]: {
967
- readonly [x: string]: unknown;
968
- };
969
- } | undefined;
970
979
  readonly usage?: {
971
980
  readonly type: "tokens";
972
981
  readonly input?: number | undefined;
@@ -989,7 +998,7 @@ export declare const ai: {
989
998
  readonly seconds: number;
990
999
  } | undefined;
991
1000
  readonly notices?: readonly {
992
- readonly type: "other" | "moderated" | "filtered";
1001
+ readonly type: "filtered" | "moderated" | "other";
993
1002
  readonly message: string;
994
1003
  readonly providerMetadata?: {
995
1004
  readonly [x: string]: {
@@ -997,20 +1006,12 @@ export declare const ai: {
997
1006
  };
998
1007
  } | undefined;
999
1008
  }[] | undefined;
1000
- readonly language?: string | undefined;
1001
- readonly segments?: readonly {
1002
- readonly text: string;
1003
- readonly startSeconds: number;
1004
- readonly endSeconds: number;
1005
- readonly speaker?: string | undefined;
1006
- }[] | undefined;
1007
- readonly words?: readonly {
1008
- readonly text: string;
1009
- readonly startSeconds: number;
1010
- readonly endSeconds: number;
1011
- readonly speaker?: string | undefined;
1012
- readonly confidence?: number | undefined;
1013
- }[] | undefined;
1009
+ readonly providerMetadata?: {
1010
+ readonly [x: string]: {
1011
+ readonly [x: string]: unknown;
1012
+ };
1013
+ } | undefined;
1014
+ readonly type: "finish";
1014
1015
  }>;
1015
1016
  start: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: RunOptions) => Promise<GenerationHandle<import("./transcription.js").TranscriptionResponse>>;
1016
1017
  resume: (model: TranscriptionModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./transcription.js").TranscriptionResponse>>;