@opencode/ai 2.1.3 → 2.1.4
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.
- package/dist/experimental/evaluation.js +3 -10
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +148 -148
- package/dist/promise.d.ts +120 -120
- package/dist/protocols/alibaba-chat.d.ts +12 -12
- package/dist/protocols/alibaba-messages.d.ts +11 -11
- package/dist/protocols/alibaba-responses.d.ts +35 -35
- package/dist/protocols/anthropic-messages.d.ts +40 -44
- package/dist/protocols/anthropic-messages.js +3 -3
- package/dist/protocols/bedrock-converse.d.ts +30 -32
- package/dist/protocols/bedrock-converse.js +2 -3
- package/dist/protocols/cartesia-speech.d.ts +32 -32
- package/dist/protocols/cohere-chat.d.ts +7 -8
- package/dist/protocols/deepgram-speech.d.ts +32 -32
- package/dist/protocols/elevenlabs-speech.d.ts +32 -32
- package/dist/protocols/gemini.d.ts +34 -34
- package/dist/protocols/gemini.js +2 -2
- package/dist/protocols/google-interactions.d.ts +14 -14
- package/dist/protocols/google-interactions.js +2 -2
- package/dist/protocols/google-speech.d.ts +32 -32
- package/dist/protocols/google-transcription.d.ts +32 -32
- package/dist/protocols/meta-messages.d.ts +23 -23
- package/dist/protocols/meta-responses.d.ts +78 -78
- package/dist/protocols/mistral-chat.d.ts +81 -78
- package/dist/protocols/mistral-chat.js +2 -1
- package/dist/protocols/open-responses-channel.js +47 -46
- package/dist/protocols/open-responses-continuation.d.ts +8 -2
- package/dist/protocols/open-responses-continuation.js +3 -1
- package/dist/protocols/open-responses.d.ts +398 -398
- package/dist/protocols/open-responses.js +8 -7
- package/dist/protocols/openai-chat.d.ts +60 -60
- package/dist/protocols/openai-chat.js +3 -3
- package/dist/protocols/openai-compatible-chat.d.ts +13 -14
- package/dist/protocols/openai-compatible-responses.d.ts +36 -37
- package/dist/protocols/openai-images.d.ts +32 -32
- package/dist/protocols/openai-responses.d.ts +235 -235
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +32 -32
- package/dist/protocols/openai-transcription.d.ts +32 -32
- package/dist/protocols/openai-transcription.js +12 -7
- package/dist/protocols/utils/partial-json-options.d.ts +0 -1
- package/dist/protocols/utils/partial-json-options.js +0 -1
- package/dist/protocols/utils/tool-stream.d.ts +1 -1
- package/dist/protocols/venice-chat.d.ts +52 -53
- package/dist/protocols/venice-chat.js +6 -5
- package/dist/protocols/xai-responses.d.ts +78 -78
- package/dist/protocols/zai-chat.d.ts +33 -30
- package/dist/protocols/zai-chat.js +8 -3
- package/dist/protocols/zai-messages.d.ts +21 -19
- package/dist/protocols/zai-messages.js +3 -2
- package/dist/provider-error.js +5 -3
- package/dist/providers/alibaba.d.ts +69 -69
- package/dist/providers/amazon-bedrock-mantle.d.ts +202 -202
- package/dist/providers/amazon-bedrock.d.ts +15 -15
- package/dist/providers/anthropic-compatible.d.ts +13 -13
- package/dist/providers/anthropic.d.ts +13 -13
- package/dist/providers/azure.d.ts +106 -106
- package/dist/providers/baseten.d.ts +24 -24
- package/dist/providers/cerebras.d.ts +24 -24
- package/dist/providers/cloudflare-ai-gateway.d.ts +230 -227
- package/dist/providers/cloudflare-ai-gateway.js +1 -2
- package/dist/providers/cloudflare-workers-ai.d.ts +24 -24
- package/dist/providers/cohere.d.ts +75 -75
- package/dist/providers/deepinfra.d.ts +24 -24
- package/dist/providers/deepseek.d.ts +24 -24
- package/dist/providers/digitalocean.d.ts +36 -36
- package/dist/providers/fireworks.d.ts +24 -24
- package/dist/providers/google-vertex-chat.d.ts +12 -12
- package/dist/providers/google-vertex-messages.d.ts +13 -13
- package/dist/providers/google-vertex-mistral.d.ts +17 -17
- package/dist/providers/google-vertex-responses.d.ts +35 -35
- package/dist/providers/google-vertex.d.ts +17 -17
- package/dist/providers/google-vertex.js +2 -2
- package/dist/providers/google.d.ts +17 -17
- package/dist/providers/groq.d.ts +24 -24
- package/dist/providers/meta.d.ts +179 -179
- package/dist/providers/minimax.d.ts +71 -71
- package/dist/providers/mistral.d.ts +28 -28
- package/dist/providers/moonshot.d.ts +202 -202
- package/dist/providers/open-responses-options.d.ts +0 -1
- package/dist/providers/open-responses-options.js +1 -1
- package/dist/providers/openai-compatible-responses.d.ts +35 -35
- package/dist/providers/openai-compatible.d.ts +12 -12
- package/dist/providers/openai-compatible.js +1 -1
- package/dist/providers/openai-options.d.ts +0 -1
- package/dist/providers/openai-options.js +0 -1
- package/dist/providers/openai.d.ts +100 -100
- package/dist/providers/openrouter.d.ts +36 -36
- package/dist/providers/togetherai.d.ts +24 -24
- package/dist/providers/venice.d.ts +195 -20
- package/dist/providers/xai.d.ts +12 -12
- package/dist/providers/zai-coding-plan.d.ts +149 -69
- package/dist/providers/zai.d.ts +84 -19
- package/dist/route/auth-options.d.ts +0 -3
- package/dist/route/auth.d.ts +0 -2
- package/dist/route/auth.js +0 -2
- package/dist/route/client.d.ts +0 -2
- package/dist/route/client.js +3 -4
- package/dist/route/executor-service.js +1 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +148 -148
- package/dist/transcription-client.d.ts +8 -8
- package/dist/transcription.d.ts +148 -148
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +114 -114
- package/package.json +6 -5
package/dist/promise.d.ts
CHANGED
|
@@ -273,14 +273,6 @@ export declare const make: (options?: Options) => {
|
|
|
273
273
|
request: typeof import("./image.js").request;
|
|
274
274
|
generate: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => Promise<import("./image.js").ImageResponse>;
|
|
275
275
|
stream: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
|
|
276
|
-
readonly type: "generation-queued";
|
|
277
|
-
readonly id: string;
|
|
278
|
-
readonly position?: number | undefined;
|
|
279
|
-
} | {
|
|
280
|
-
readonly type: "generation-progress";
|
|
281
|
-
readonly id: string;
|
|
282
|
-
readonly progress?: number | undefined;
|
|
283
|
-
} | {
|
|
284
276
|
readonly type: "image-partial";
|
|
285
277
|
readonly index: number;
|
|
286
278
|
readonly image: Media.Asset;
|
|
@@ -288,17 +280,17 @@ export declare const make: (options?: Options) => {
|
|
|
288
280
|
readonly type: "image";
|
|
289
281
|
readonly index: number;
|
|
290
282
|
readonly image: Media.Asset;
|
|
283
|
+
} | {
|
|
284
|
+
readonly type: "generation-queued";
|
|
285
|
+
readonly id: string;
|
|
286
|
+
readonly position?: number | undefined;
|
|
287
|
+
} | {
|
|
288
|
+
readonly type: "generation-progress";
|
|
289
|
+
readonly id: string;
|
|
290
|
+
readonly progress?: number | undefined;
|
|
291
291
|
} | {
|
|
292
292
|
readonly type: "finish";
|
|
293
293
|
readonly usage?: {
|
|
294
|
-
readonly type: "tokens";
|
|
295
|
-
readonly input?: number | undefined;
|
|
296
|
-
readonly output?: number | undefined;
|
|
297
|
-
readonly total?: number | undefined;
|
|
298
|
-
readonly details?: {
|
|
299
|
-
readonly [x: string]: unknown;
|
|
300
|
-
} | undefined;
|
|
301
|
-
} | {
|
|
302
294
|
readonly type: "seconds";
|
|
303
295
|
readonly seconds: number;
|
|
304
296
|
} | {
|
|
@@ -310,6 +302,14 @@ export declare const make: (options?: Options) => {
|
|
|
310
302
|
} | {
|
|
311
303
|
readonly type: "compute";
|
|
312
304
|
readonly seconds: number;
|
|
305
|
+
} | {
|
|
306
|
+
readonly type: "tokens";
|
|
307
|
+
readonly input?: number | undefined;
|
|
308
|
+
readonly output?: number | undefined;
|
|
309
|
+
readonly total?: number | undefined;
|
|
310
|
+
readonly details?: {
|
|
311
|
+
readonly [x: string]: unknown;
|
|
312
|
+
} | undefined;
|
|
313
313
|
} | undefined;
|
|
314
314
|
readonly notices?: readonly {
|
|
315
315
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -335,6 +335,10 @@ export declare const make: (options?: Options) => {
|
|
|
335
335
|
generate: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => Promise<import("./video.js").VideoResponse>;
|
|
336
336
|
resume: (model: VideoModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./video.js").VideoResponse>>;
|
|
337
337
|
stream: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
|
|
338
|
+
readonly type: "video";
|
|
339
|
+
readonly index: number;
|
|
340
|
+
readonly video: Media.Asset;
|
|
341
|
+
} | {
|
|
338
342
|
readonly type: "generation-queued";
|
|
339
343
|
readonly id: string;
|
|
340
344
|
readonly position?: number | undefined;
|
|
@@ -342,21 +346,9 @@ export declare const make: (options?: Options) => {
|
|
|
342
346
|
readonly type: "generation-progress";
|
|
343
347
|
readonly id: string;
|
|
344
348
|
readonly progress?: number | undefined;
|
|
345
|
-
} | {
|
|
346
|
-
readonly type: "video";
|
|
347
|
-
readonly index: number;
|
|
348
|
-
readonly video: Media.Asset;
|
|
349
349
|
} | {
|
|
350
350
|
readonly type: "finish";
|
|
351
351
|
readonly usage?: {
|
|
352
|
-
readonly type: "tokens";
|
|
353
|
-
readonly input?: number | undefined;
|
|
354
|
-
readonly output?: number | undefined;
|
|
355
|
-
readonly total?: number | undefined;
|
|
356
|
-
readonly details?: {
|
|
357
|
-
readonly [x: string]: unknown;
|
|
358
|
-
} | undefined;
|
|
359
|
-
} | {
|
|
360
352
|
readonly type: "seconds";
|
|
361
353
|
readonly seconds: number;
|
|
362
354
|
} | {
|
|
@@ -368,6 +360,14 @@ export declare const make: (options?: Options) => {
|
|
|
368
360
|
} | {
|
|
369
361
|
readonly type: "compute";
|
|
370
362
|
readonly seconds: number;
|
|
363
|
+
} | {
|
|
364
|
+
readonly type: "tokens";
|
|
365
|
+
readonly input?: number | undefined;
|
|
366
|
+
readonly output?: number | undefined;
|
|
367
|
+
readonly total?: number | undefined;
|
|
368
|
+
readonly details?: {
|
|
369
|
+
readonly [x: string]: unknown;
|
|
370
|
+
} | undefined;
|
|
371
371
|
} | undefined;
|
|
372
372
|
readonly notices?: readonly {
|
|
373
373
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -389,14 +389,6 @@ export declare const make: (options?: Options) => {
|
|
|
389
389
|
request: typeof import("./speech.js").request;
|
|
390
390
|
generate: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => Promise<import("./speech.js").SpeechResponse>;
|
|
391
391
|
stream: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => AsyncIterable<{
|
|
392
|
-
readonly type: "generation-queued";
|
|
393
|
-
readonly id: string;
|
|
394
|
-
readonly position?: number | undefined;
|
|
395
|
-
} | {
|
|
396
|
-
readonly type: "generation-progress";
|
|
397
|
-
readonly id: string;
|
|
398
|
-
readonly progress?: number | undefined;
|
|
399
|
-
} | {
|
|
400
392
|
readonly type: "audio-delta";
|
|
401
393
|
readonly chunk: Uint8Array<ArrayBufferLike>;
|
|
402
394
|
} | {
|
|
@@ -406,18 +398,18 @@ export declare const make: (options?: Options) => {
|
|
|
406
398
|
readonly startSeconds: number;
|
|
407
399
|
readonly endSeconds: number;
|
|
408
400
|
}[];
|
|
401
|
+
} | {
|
|
402
|
+
readonly type: "generation-queued";
|
|
403
|
+
readonly id: string;
|
|
404
|
+
readonly position?: number | undefined;
|
|
405
|
+
} | {
|
|
406
|
+
readonly type: "generation-progress";
|
|
407
|
+
readonly id: string;
|
|
408
|
+
readonly progress?: number | undefined;
|
|
409
409
|
} | {
|
|
410
410
|
readonly type: "finish";
|
|
411
411
|
readonly audio: Media.Asset;
|
|
412
412
|
readonly usage?: {
|
|
413
|
-
readonly type: "tokens";
|
|
414
|
-
readonly input?: number | undefined;
|
|
415
|
-
readonly output?: number | undefined;
|
|
416
|
-
readonly total?: number | undefined;
|
|
417
|
-
readonly details?: {
|
|
418
|
-
readonly [x: string]: unknown;
|
|
419
|
-
} | undefined;
|
|
420
|
-
} | {
|
|
421
413
|
readonly type: "seconds";
|
|
422
414
|
readonly seconds: number;
|
|
423
415
|
} | {
|
|
@@ -429,6 +421,14 @@ export declare const make: (options?: Options) => {
|
|
|
429
421
|
} | {
|
|
430
422
|
readonly type: "compute";
|
|
431
423
|
readonly seconds: number;
|
|
424
|
+
} | {
|
|
425
|
+
readonly type: "tokens";
|
|
426
|
+
readonly input?: number | undefined;
|
|
427
|
+
readonly output?: number | undefined;
|
|
428
|
+
readonly total?: number | undefined;
|
|
429
|
+
readonly details?: {
|
|
430
|
+
readonly [x: string]: unknown;
|
|
431
|
+
} | undefined;
|
|
432
432
|
} | undefined;
|
|
433
433
|
readonly notices?: readonly {
|
|
434
434
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -450,14 +450,6 @@ export declare const make: (options?: Options) => {
|
|
|
450
450
|
request: typeof import("./transcription.js").request;
|
|
451
451
|
generate: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => Promise<import("./transcription.js").TranscriptionResponse>;
|
|
452
452
|
stream: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
|
|
453
|
-
readonly type: "generation-queued";
|
|
454
|
-
readonly id: string;
|
|
455
|
-
readonly position?: number | undefined;
|
|
456
|
-
} | {
|
|
457
|
-
readonly type: "generation-progress";
|
|
458
|
-
readonly id: string;
|
|
459
|
-
readonly progress?: number | undefined;
|
|
460
|
-
} | {
|
|
461
453
|
readonly type: "text-delta";
|
|
462
454
|
readonly delta: string;
|
|
463
455
|
} | {
|
|
@@ -468,6 +460,14 @@ export declare const make: (options?: Options) => {
|
|
|
468
460
|
readonly endSeconds: number;
|
|
469
461
|
readonly speaker?: string | undefined;
|
|
470
462
|
};
|
|
463
|
+
} | {
|
|
464
|
+
readonly type: "generation-queued";
|
|
465
|
+
readonly id: string;
|
|
466
|
+
readonly position?: number | undefined;
|
|
467
|
+
} | {
|
|
468
|
+
readonly type: "generation-progress";
|
|
469
|
+
readonly id: string;
|
|
470
|
+
readonly progress?: number | undefined;
|
|
471
471
|
} | {
|
|
472
472
|
readonly text: string;
|
|
473
473
|
readonly segments?: readonly {
|
|
@@ -486,14 +486,6 @@ export declare const make: (options?: Options) => {
|
|
|
486
486
|
readonly language?: string | undefined;
|
|
487
487
|
readonly durationSeconds?: number | undefined;
|
|
488
488
|
readonly usage?: {
|
|
489
|
-
readonly type: "tokens";
|
|
490
|
-
readonly input?: number | undefined;
|
|
491
|
-
readonly output?: number | undefined;
|
|
492
|
-
readonly total?: number | undefined;
|
|
493
|
-
readonly details?: {
|
|
494
|
-
readonly [x: string]: unknown;
|
|
495
|
-
} | undefined;
|
|
496
|
-
} | {
|
|
497
489
|
readonly type: "seconds";
|
|
498
490
|
readonly seconds: number;
|
|
499
491
|
} | {
|
|
@@ -505,6 +497,14 @@ export declare const make: (options?: Options) => {
|
|
|
505
497
|
} | {
|
|
506
498
|
readonly type: "compute";
|
|
507
499
|
readonly seconds: number;
|
|
500
|
+
} | {
|
|
501
|
+
readonly type: "tokens";
|
|
502
|
+
readonly input?: number | undefined;
|
|
503
|
+
readonly output?: number | undefined;
|
|
504
|
+
readonly total?: number | undefined;
|
|
505
|
+
readonly details?: {
|
|
506
|
+
readonly [x: string]: unknown;
|
|
507
|
+
} | undefined;
|
|
508
508
|
} | undefined;
|
|
509
509
|
readonly notices?: readonly {
|
|
510
510
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -764,14 +764,6 @@ export declare const ai: {
|
|
|
764
764
|
request: typeof import("./image.js").request;
|
|
765
765
|
generate: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => Promise<import("./image.js").ImageResponse>;
|
|
766
766
|
stream: <const Model extends ImageModel>(input: ImageRequestInput<Model> | ImageRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
|
|
767
|
-
readonly type: "generation-queued";
|
|
768
|
-
readonly id: string;
|
|
769
|
-
readonly position?: number | undefined;
|
|
770
|
-
} | {
|
|
771
|
-
readonly type: "generation-progress";
|
|
772
|
-
readonly id: string;
|
|
773
|
-
readonly progress?: number | undefined;
|
|
774
|
-
} | {
|
|
775
767
|
readonly type: "image-partial";
|
|
776
768
|
readonly index: number;
|
|
777
769
|
readonly image: Media.Asset;
|
|
@@ -779,17 +771,17 @@ export declare const ai: {
|
|
|
779
771
|
readonly type: "image";
|
|
780
772
|
readonly index: number;
|
|
781
773
|
readonly image: Media.Asset;
|
|
774
|
+
} | {
|
|
775
|
+
readonly type: "generation-queued";
|
|
776
|
+
readonly id: string;
|
|
777
|
+
readonly position?: number | undefined;
|
|
778
|
+
} | {
|
|
779
|
+
readonly type: "generation-progress";
|
|
780
|
+
readonly id: string;
|
|
781
|
+
readonly progress?: number | undefined;
|
|
782
782
|
} | {
|
|
783
783
|
readonly type: "finish";
|
|
784
784
|
readonly usage?: {
|
|
785
|
-
readonly type: "tokens";
|
|
786
|
-
readonly input?: number | undefined;
|
|
787
|
-
readonly output?: number | undefined;
|
|
788
|
-
readonly total?: number | undefined;
|
|
789
|
-
readonly details?: {
|
|
790
|
-
readonly [x: string]: unknown;
|
|
791
|
-
} | undefined;
|
|
792
|
-
} | {
|
|
793
785
|
readonly type: "seconds";
|
|
794
786
|
readonly seconds: number;
|
|
795
787
|
} | {
|
|
@@ -801,6 +793,14 @@ export declare const ai: {
|
|
|
801
793
|
} | {
|
|
802
794
|
readonly type: "compute";
|
|
803
795
|
readonly seconds: number;
|
|
796
|
+
} | {
|
|
797
|
+
readonly type: "tokens";
|
|
798
|
+
readonly input?: number | undefined;
|
|
799
|
+
readonly output?: number | undefined;
|
|
800
|
+
readonly total?: number | undefined;
|
|
801
|
+
readonly details?: {
|
|
802
|
+
readonly [x: string]: unknown;
|
|
803
|
+
} | undefined;
|
|
804
804
|
} | undefined;
|
|
805
805
|
readonly notices?: readonly {
|
|
806
806
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -826,6 +826,10 @@ export declare const ai: {
|
|
|
826
826
|
generate: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => Promise<import("./video.js").VideoResponse>;
|
|
827
827
|
resume: (model: VideoModel, token: unknown, options?: RunOptions) => Promise<GenerationHandle<import("./video.js").VideoResponse>>;
|
|
828
828
|
stream: <const Model extends VideoModel>(input: VideoRequestInput<Model> | VideoRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
|
|
829
|
+
readonly type: "video";
|
|
830
|
+
readonly index: number;
|
|
831
|
+
readonly video: Media.Asset;
|
|
832
|
+
} | {
|
|
829
833
|
readonly type: "generation-queued";
|
|
830
834
|
readonly id: string;
|
|
831
835
|
readonly position?: number | undefined;
|
|
@@ -833,21 +837,9 @@ export declare const ai: {
|
|
|
833
837
|
readonly type: "generation-progress";
|
|
834
838
|
readonly id: string;
|
|
835
839
|
readonly progress?: number | undefined;
|
|
836
|
-
} | {
|
|
837
|
-
readonly type: "video";
|
|
838
|
-
readonly index: number;
|
|
839
|
-
readonly video: Media.Asset;
|
|
840
840
|
} | {
|
|
841
841
|
readonly type: "finish";
|
|
842
842
|
readonly usage?: {
|
|
843
|
-
readonly type: "tokens";
|
|
844
|
-
readonly input?: number | undefined;
|
|
845
|
-
readonly output?: number | undefined;
|
|
846
|
-
readonly total?: number | undefined;
|
|
847
|
-
readonly details?: {
|
|
848
|
-
readonly [x: string]: unknown;
|
|
849
|
-
} | undefined;
|
|
850
|
-
} | {
|
|
851
843
|
readonly type: "seconds";
|
|
852
844
|
readonly seconds: number;
|
|
853
845
|
} | {
|
|
@@ -859,6 +851,14 @@ export declare const ai: {
|
|
|
859
851
|
} | {
|
|
860
852
|
readonly type: "compute";
|
|
861
853
|
readonly seconds: number;
|
|
854
|
+
} | {
|
|
855
|
+
readonly type: "tokens";
|
|
856
|
+
readonly input?: number | undefined;
|
|
857
|
+
readonly output?: number | undefined;
|
|
858
|
+
readonly total?: number | undefined;
|
|
859
|
+
readonly details?: {
|
|
860
|
+
readonly [x: string]: unknown;
|
|
861
|
+
} | undefined;
|
|
862
862
|
} | undefined;
|
|
863
863
|
readonly notices?: readonly {
|
|
864
864
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -880,14 +880,6 @@ export declare const ai: {
|
|
|
880
880
|
request: typeof import("./speech.js").request;
|
|
881
881
|
generate: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => Promise<import("./speech.js").SpeechResponse>;
|
|
882
882
|
stream: <const Model extends SpeechModel>(input: SpeechRequestInput<Model> | SpeechRequest, options?: RunOptions) => AsyncIterable<{
|
|
883
|
-
readonly type: "generation-queued";
|
|
884
|
-
readonly id: string;
|
|
885
|
-
readonly position?: number | undefined;
|
|
886
|
-
} | {
|
|
887
|
-
readonly type: "generation-progress";
|
|
888
|
-
readonly id: string;
|
|
889
|
-
readonly progress?: number | undefined;
|
|
890
|
-
} | {
|
|
891
883
|
readonly type: "audio-delta";
|
|
892
884
|
readonly chunk: Uint8Array<ArrayBufferLike>;
|
|
893
885
|
} | {
|
|
@@ -897,18 +889,18 @@ export declare const ai: {
|
|
|
897
889
|
readonly startSeconds: number;
|
|
898
890
|
readonly endSeconds: number;
|
|
899
891
|
}[];
|
|
892
|
+
} | {
|
|
893
|
+
readonly type: "generation-queued";
|
|
894
|
+
readonly id: string;
|
|
895
|
+
readonly position?: number | undefined;
|
|
896
|
+
} | {
|
|
897
|
+
readonly type: "generation-progress";
|
|
898
|
+
readonly id: string;
|
|
899
|
+
readonly progress?: number | undefined;
|
|
900
900
|
} | {
|
|
901
901
|
readonly type: "finish";
|
|
902
902
|
readonly audio: Media.Asset;
|
|
903
903
|
readonly usage?: {
|
|
904
|
-
readonly type: "tokens";
|
|
905
|
-
readonly input?: number | undefined;
|
|
906
|
-
readonly output?: number | undefined;
|
|
907
|
-
readonly total?: number | undefined;
|
|
908
|
-
readonly details?: {
|
|
909
|
-
readonly [x: string]: unknown;
|
|
910
|
-
} | undefined;
|
|
911
|
-
} | {
|
|
912
904
|
readonly type: "seconds";
|
|
913
905
|
readonly seconds: number;
|
|
914
906
|
} | {
|
|
@@ -920,6 +912,14 @@ export declare const ai: {
|
|
|
920
912
|
} | {
|
|
921
913
|
readonly type: "compute";
|
|
922
914
|
readonly seconds: number;
|
|
915
|
+
} | {
|
|
916
|
+
readonly type: "tokens";
|
|
917
|
+
readonly input?: number | undefined;
|
|
918
|
+
readonly output?: number | undefined;
|
|
919
|
+
readonly total?: number | undefined;
|
|
920
|
+
readonly details?: {
|
|
921
|
+
readonly [x: string]: unknown;
|
|
922
|
+
} | undefined;
|
|
923
923
|
} | undefined;
|
|
924
924
|
readonly notices?: readonly {
|
|
925
925
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -941,14 +941,6 @@ export declare const ai: {
|
|
|
941
941
|
request: typeof import("./transcription.js").request;
|
|
942
942
|
generate: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => Promise<import("./transcription.js").TranscriptionResponse>;
|
|
943
943
|
stream: <const Model extends TranscriptionModel>(input: TranscriptionRequestInput<Model> | TranscriptionRequest, options?: AwaitOptions & RunOptions) => AsyncIterable<{
|
|
944
|
-
readonly type: "generation-queued";
|
|
945
|
-
readonly id: string;
|
|
946
|
-
readonly position?: number | undefined;
|
|
947
|
-
} | {
|
|
948
|
-
readonly type: "generation-progress";
|
|
949
|
-
readonly id: string;
|
|
950
|
-
readonly progress?: number | undefined;
|
|
951
|
-
} | {
|
|
952
944
|
readonly type: "text-delta";
|
|
953
945
|
readonly delta: string;
|
|
954
946
|
} | {
|
|
@@ -959,6 +951,14 @@ export declare const ai: {
|
|
|
959
951
|
readonly endSeconds: number;
|
|
960
952
|
readonly speaker?: string | undefined;
|
|
961
953
|
};
|
|
954
|
+
} | {
|
|
955
|
+
readonly type: "generation-queued";
|
|
956
|
+
readonly id: string;
|
|
957
|
+
readonly position?: number | undefined;
|
|
958
|
+
} | {
|
|
959
|
+
readonly type: "generation-progress";
|
|
960
|
+
readonly id: string;
|
|
961
|
+
readonly progress?: number | undefined;
|
|
962
962
|
} | {
|
|
963
963
|
readonly text: string;
|
|
964
964
|
readonly segments?: readonly {
|
|
@@ -977,14 +977,6 @@ export declare const ai: {
|
|
|
977
977
|
readonly language?: string | undefined;
|
|
978
978
|
readonly durationSeconds?: number | undefined;
|
|
979
979
|
readonly usage?: {
|
|
980
|
-
readonly type: "tokens";
|
|
981
|
-
readonly input?: number | undefined;
|
|
982
|
-
readonly output?: number | undefined;
|
|
983
|
-
readonly total?: number | undefined;
|
|
984
|
-
readonly details?: {
|
|
985
|
-
readonly [x: string]: unknown;
|
|
986
|
-
} | undefined;
|
|
987
|
-
} | {
|
|
988
980
|
readonly type: "seconds";
|
|
989
981
|
readonly seconds: number;
|
|
990
982
|
} | {
|
|
@@ -996,6 +988,14 @@ export declare const ai: {
|
|
|
996
988
|
} | {
|
|
997
989
|
readonly type: "compute";
|
|
998
990
|
readonly seconds: number;
|
|
991
|
+
} | {
|
|
992
|
+
readonly type: "tokens";
|
|
993
|
+
readonly input?: number | undefined;
|
|
994
|
+
readonly output?: number | undefined;
|
|
995
|
+
readonly total?: number | undefined;
|
|
996
|
+
readonly details?: {
|
|
997
|
+
readonly [x: string]: unknown;
|
|
998
|
+
} | undefined;
|
|
999
999
|
} | undefined;
|
|
1000
1000
|
readonly notices?: readonly {
|
|
1001
1001
|
readonly type: "filtered" | "moderated" | "other";
|
|
@@ -38,13 +38,6 @@ export declare const protocol: Protocol<{
|
|
|
38
38
|
readonly messages: readonly ({
|
|
39
39
|
readonly role: "system";
|
|
40
40
|
readonly content: string | readonly ({
|
|
41
|
-
readonly type: "text";
|
|
42
|
-
readonly text: string;
|
|
43
|
-
readonly cache_control?: {
|
|
44
|
-
readonly type: "ephemeral";
|
|
45
|
-
readonly ttl?: string | undefined;
|
|
46
|
-
} | undefined;
|
|
47
|
-
} | {
|
|
48
41
|
readonly type: "image_url";
|
|
49
42
|
readonly image_url: {
|
|
50
43
|
readonly url: string;
|
|
@@ -55,17 +48,17 @@ export declare const protocol: Protocol<{
|
|
|
55
48
|
readonly filename: string;
|
|
56
49
|
readonly file_data: string;
|
|
57
50
|
};
|
|
58
|
-
}
|
|
59
|
-
} | {
|
|
60
|
-
readonly role: "user";
|
|
61
|
-
readonly content: string | readonly ({
|
|
51
|
+
} | {
|
|
62
52
|
readonly type: "text";
|
|
63
53
|
readonly text: string;
|
|
64
54
|
readonly cache_control?: {
|
|
65
55
|
readonly type: "ephemeral";
|
|
66
56
|
readonly ttl?: string | undefined;
|
|
67
57
|
} | undefined;
|
|
68
|
-
}
|
|
58
|
+
})[];
|
|
59
|
+
} | {
|
|
60
|
+
readonly role: "user";
|
|
61
|
+
readonly content: string | readonly ({
|
|
69
62
|
readonly type: "image_url";
|
|
70
63
|
readonly image_url: {
|
|
71
64
|
readonly url: string;
|
|
@@ -76,6 +69,13 @@ export declare const protocol: Protocol<{
|
|
|
76
69
|
readonly filename: string;
|
|
77
70
|
readonly file_data: string;
|
|
78
71
|
};
|
|
72
|
+
} | {
|
|
73
|
+
readonly type: "text";
|
|
74
|
+
readonly text: string;
|
|
75
|
+
readonly cache_control?: {
|
|
76
|
+
readonly type: "ephemeral";
|
|
77
|
+
readonly ttl?: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
79
|
})[];
|
|
80
80
|
} | {
|
|
81
81
|
readonly role: "tool";
|
|
@@ -153,23 +153,15 @@ export declare const protocol: Protocol<{
|
|
|
153
153
|
} | {
|
|
154
154
|
readonly role: "assistant";
|
|
155
155
|
readonly content: readonly ({
|
|
156
|
+
readonly type: "compaction";
|
|
157
|
+
readonly content: string | null;
|
|
158
|
+
} | {
|
|
156
159
|
readonly type: "text";
|
|
157
160
|
readonly text: string;
|
|
158
161
|
readonly cache_control?: {
|
|
159
162
|
readonly type: "ephemeral";
|
|
160
163
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
161
164
|
} | undefined;
|
|
162
|
-
} | {
|
|
163
|
-
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
164
|
-
readonly tool_use_id: string;
|
|
165
|
-
readonly content: unknown;
|
|
166
|
-
readonly cache_control?: {
|
|
167
|
-
readonly type: "ephemeral";
|
|
168
|
-
readonly ttl?: "1h" | "5m" | undefined;
|
|
169
|
-
} | undefined;
|
|
170
|
-
} | {
|
|
171
|
-
readonly type: "compaction";
|
|
172
|
-
readonly content: string | null;
|
|
173
165
|
} | {
|
|
174
166
|
readonly type: "thinking";
|
|
175
167
|
readonly thinking: string;
|
|
@@ -203,6 +195,14 @@ export declare const protocol: Protocol<{
|
|
|
203
195
|
readonly type: "ephemeral";
|
|
204
196
|
readonly ttl?: "1h" | "5m" | undefined;
|
|
205
197
|
} | undefined;
|
|
198
|
+
} | {
|
|
199
|
+
readonly type: "code_execution_tool_result" | "web_fetch_tool_result" | "web_search_tool_result";
|
|
200
|
+
readonly tool_use_id: string;
|
|
201
|
+
readonly content: unknown;
|
|
202
|
+
readonly cache_control?: {
|
|
203
|
+
readonly type: "ephemeral";
|
|
204
|
+
readonly ttl?: "1h" | "5m" | undefined;
|
|
205
|
+
} | undefined;
|
|
206
206
|
})[];
|
|
207
207
|
} | {
|
|
208
208
|
readonly role: "system";
|
|
@@ -13,10 +13,6 @@ export type OptionsInput = typeof Options.Type;
|
|
|
13
13
|
export declare const protocol: Protocol<{
|
|
14
14
|
readonly model: string;
|
|
15
15
|
readonly input: readonly ({
|
|
16
|
-
readonly type: "compaction";
|
|
17
|
-
readonly id?: string | null | undefined;
|
|
18
|
-
readonly encrypted_content: string;
|
|
19
|
-
} | {
|
|
20
16
|
readonly type: "configuration_update";
|
|
21
17
|
readonly reasoning: {
|
|
22
18
|
readonly effort: OpenResponsesOptions.ReasoningEffort;
|
|
@@ -29,10 +25,45 @@ export declare const protocol: Protocol<{
|
|
|
29
25
|
readonly type: "message";
|
|
30
26
|
readonly role: "developer";
|
|
31
27
|
readonly content: string;
|
|
28
|
+
} | {
|
|
29
|
+
readonly type: "function_call_output";
|
|
30
|
+
readonly call_id: string;
|
|
31
|
+
readonly output: string | readonly ({
|
|
32
|
+
readonly type: "input_text";
|
|
33
|
+
readonly text: string;
|
|
34
|
+
} | {
|
|
35
|
+
readonly type: "input_video";
|
|
36
|
+
readonly video_url: string;
|
|
37
|
+
} | {
|
|
38
|
+
readonly type: "input_image";
|
|
39
|
+
readonly image_url: string;
|
|
40
|
+
readonly detail?: string | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
readonly type: "input_file";
|
|
43
|
+
readonly filename: string;
|
|
44
|
+
readonly detail?: string | undefined;
|
|
45
|
+
readonly file_data?: string | undefined;
|
|
46
|
+
readonly file_url?: string | undefined;
|
|
47
|
+
})[];
|
|
48
|
+
} | {
|
|
49
|
+
readonly type: "reasoning";
|
|
50
|
+
readonly id?: string | undefined;
|
|
51
|
+
readonly summary: readonly {
|
|
52
|
+
readonly type: "summary_text";
|
|
53
|
+
readonly text: string;
|
|
54
|
+
}[];
|
|
55
|
+
readonly encrypted_content?: string | null | undefined;
|
|
56
|
+
} | {
|
|
57
|
+
readonly type: "compaction";
|
|
58
|
+
readonly id?: string | null | undefined;
|
|
59
|
+
readonly encrypted_content: string;
|
|
32
60
|
} | {
|
|
33
61
|
readonly type: "message";
|
|
34
62
|
readonly role: "user";
|
|
35
63
|
readonly content: readonly ({
|
|
64
|
+
readonly type: "input_text";
|
|
65
|
+
readonly text: string;
|
|
66
|
+
} | {
|
|
36
67
|
readonly type: "input_image";
|
|
37
68
|
readonly image_url: string;
|
|
38
69
|
readonly detail?: string | undefined;
|
|
@@ -42,9 +73,6 @@ export declare const protocol: Protocol<{
|
|
|
42
73
|
readonly detail?: string | undefined;
|
|
43
74
|
readonly file_data?: string | undefined;
|
|
44
75
|
readonly file_url?: string | undefined;
|
|
45
|
-
} | {
|
|
46
|
-
readonly type: "input_text";
|
|
47
|
-
readonly text: string;
|
|
48
76
|
})[];
|
|
49
77
|
readonly id?: string | undefined;
|
|
50
78
|
readonly status?: string | undefined;
|
|
@@ -58,14 +86,6 @@ export declare const protocol: Protocol<{
|
|
|
58
86
|
}[];
|
|
59
87
|
readonly phase?: "commentary" | "final_answer" | null | undefined;
|
|
60
88
|
readonly status?: string | undefined;
|
|
61
|
-
} | {
|
|
62
|
-
readonly type: "reasoning";
|
|
63
|
-
readonly id?: string | undefined;
|
|
64
|
-
readonly summary: readonly {
|
|
65
|
-
readonly type: "summary_text";
|
|
66
|
-
readonly text: string;
|
|
67
|
-
}[];
|
|
68
|
-
readonly encrypted_content?: string | null | undefined;
|
|
69
89
|
} | {
|
|
70
90
|
readonly type: "function_call";
|
|
71
91
|
readonly id?: string | undefined;
|
|
@@ -73,26 +93,6 @@ export declare const protocol: Protocol<{
|
|
|
73
93
|
readonly name: string;
|
|
74
94
|
readonly namespace?: string | undefined;
|
|
75
95
|
readonly arguments: string;
|
|
76
|
-
} | {
|
|
77
|
-
readonly type: "function_call_output";
|
|
78
|
-
readonly call_id: string;
|
|
79
|
-
readonly output: string | readonly ({
|
|
80
|
-
readonly type: "input_image";
|
|
81
|
-
readonly image_url: string;
|
|
82
|
-
readonly detail?: string | undefined;
|
|
83
|
-
} | {
|
|
84
|
-
readonly type: "input_file";
|
|
85
|
-
readonly filename: string;
|
|
86
|
-
readonly detail?: string | undefined;
|
|
87
|
-
readonly file_data?: string | undefined;
|
|
88
|
-
readonly file_url?: string | undefined;
|
|
89
|
-
} | {
|
|
90
|
-
readonly type: "input_text";
|
|
91
|
-
readonly text: string;
|
|
92
|
-
} | {
|
|
93
|
-
readonly type: "input_video";
|
|
94
|
-
readonly video_url: string;
|
|
95
|
-
})[];
|
|
96
96
|
} | {
|
|
97
97
|
readonly [x: string]: unknown;
|
|
98
98
|
readonly type: "web_search_call";
|