@ai-sdk/google-vertex 4.0.219 → 4.0.221

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.
@@ -17,13 +17,15 @@ import {
17
17
  } from "@ai-sdk/provider-utils";
18
18
 
19
19
  // src/version.ts
20
- var VERSION = true ? "4.0.219" : "0.0.0-test";
20
+ var VERSION = true ? "4.0.221" : "0.0.0-test";
21
21
 
22
22
  // src/google-vertex-embedding-model.ts
23
23
  import {
24
24
  TooManyEmbeddingValuesForCallError
25
25
  } from "@ai-sdk/provider";
26
26
  import {
27
+ lazySchema as lazySchema3,
28
+ zodSchema as zodSchema3,
27
29
  combineHeaders,
28
30
  createJsonResponseHandler,
29
31
  postJsonToApi,
@@ -33,15 +35,23 @@ import {
33
35
  import { z as z3 } from "zod/v4";
34
36
 
35
37
  // src/google-vertex-error.ts
36
- import { createJsonErrorResponseHandler } from "@ai-sdk/provider-utils";
38
+ import {
39
+ lazySchema,
40
+ zodSchema,
41
+ createJsonErrorResponseHandler
42
+ } from "@ai-sdk/provider-utils";
37
43
  import { z } from "zod/v4";
38
- var googleVertexErrorDataSchema = z.object({
39
- error: z.object({
40
- code: z.number().nullable(),
41
- message: z.string(),
42
- status: z.string()
43
- })
44
- });
44
+ var googleVertexErrorDataSchema = lazySchema(
45
+ () => zodSchema(
46
+ z.object({
47
+ error: z.object({
48
+ code: z.number().nullable(),
49
+ message: z.string(),
50
+ status: z.string()
51
+ })
52
+ })
53
+ )
54
+ );
45
55
  var googleVertexFailedResponseHandler = createJsonErrorResponseHandler(
46
56
  {
47
57
  errorSchema: googleVertexErrorDataSchema,
@@ -50,47 +60,55 @@ var googleVertexFailedResponseHandler = createJsonErrorResponseHandler(
50
60
  );
51
61
 
52
62
  // src/google-vertex-embedding-options.ts
63
+ import {
64
+ lazySchema as lazySchema2,
65
+ zodSchema as zodSchema2
66
+ } from "@ai-sdk/provider-utils";
53
67
  import { z as z2 } from "zod/v4";
54
- var googleVertexEmbeddingModelOptions = z2.object({
55
- /**
56
- * Optional. Optional reduced dimension for the output embedding.
57
- * If set, excessive values in the output embedding are truncated from the end.
58
- */
59
- outputDimensionality: z2.number().optional(),
60
- /**
61
- * Optional. Specifies the task type for generating embeddings.
62
- * Supported task types:
63
- * - SEMANTIC_SIMILARITY: Optimized for text similarity.
64
- * - CLASSIFICATION: Optimized for text classification.
65
- * - CLUSTERING: Optimized for clustering texts based on similarity.
66
- * - RETRIEVAL_DOCUMENT: Optimized for document retrieval.
67
- * - RETRIEVAL_QUERY: Optimized for query-based retrieval.
68
- * - QUESTION_ANSWERING: Optimized for answering questions.
69
- * - FACT_VERIFICATION: Optimized for verifying factual information.
70
- * - CODE_RETRIEVAL_QUERY: Optimized for retrieving code blocks based on natural language queries.
71
- */
72
- taskType: z2.enum([
73
- "SEMANTIC_SIMILARITY",
74
- "CLASSIFICATION",
75
- "CLUSTERING",
76
- "RETRIEVAL_DOCUMENT",
77
- "RETRIEVAL_QUERY",
78
- "QUESTION_ANSWERING",
79
- "FACT_VERIFICATION",
80
- "CODE_RETRIEVAL_QUERY"
81
- ]).optional(),
82
- /**
83
- * Optional. The title of the document being embedded.
84
- * Only valid when task_type is set to 'RETRIEVAL_DOCUMENT'.
85
- * Helps the model produce better embeddings by providing additional context.
86
- */
87
- title: z2.string().optional(),
88
- /**
89
- * Optional. When set to true, input text will be truncated. When set to false,
90
- * an error is returned if the input text is longer than the maximum length supported by the model. Defaults to true.
91
- */
92
- autoTruncate: z2.boolean().optional()
93
- });
68
+ var googleVertexEmbeddingModelOptions = lazySchema2(
69
+ () => zodSchema2(
70
+ z2.object({
71
+ /**
72
+ * Optional. Optional reduced dimension for the output embedding.
73
+ * If set, excessive values in the output embedding are truncated from the end.
74
+ */
75
+ outputDimensionality: z2.number().optional(),
76
+ /**
77
+ * Optional. Specifies the task type for generating embeddings.
78
+ * Supported task types:
79
+ * - SEMANTIC_SIMILARITY: Optimized for text similarity.
80
+ * - CLASSIFICATION: Optimized for text classification.
81
+ * - CLUSTERING: Optimized for clustering texts based on similarity.
82
+ * - RETRIEVAL_DOCUMENT: Optimized for document retrieval.
83
+ * - RETRIEVAL_QUERY: Optimized for query-based retrieval.
84
+ * - QUESTION_ANSWERING: Optimized for answering questions.
85
+ * - FACT_VERIFICATION: Optimized for verifying factual information.
86
+ * - CODE_RETRIEVAL_QUERY: Optimized for retrieving code blocks based on natural language queries.
87
+ */
88
+ taskType: z2.enum([
89
+ "SEMANTIC_SIMILARITY",
90
+ "CLASSIFICATION",
91
+ "CLUSTERING",
92
+ "RETRIEVAL_DOCUMENT",
93
+ "RETRIEVAL_QUERY",
94
+ "QUESTION_ANSWERING",
95
+ "FACT_VERIFICATION",
96
+ "CODE_RETRIEVAL_QUERY"
97
+ ]).optional(),
98
+ /**
99
+ * Optional. The title of the document being embedded.
100
+ * Only valid when task_type is set to 'RETRIEVAL_DOCUMENT'.
101
+ * Helps the model produce better embeddings by providing additional context.
102
+ */
103
+ title: z2.string().optional(),
104
+ /**
105
+ * Optional. When set to true, input text will be truncated. When set to false,
106
+ * an error is returned if the input text is longer than the maximum length supported by the model. Defaults to true.
107
+ */
108
+ autoTruncate: z2.boolean().optional()
109
+ })
110
+ )
111
+ );
94
112
 
95
113
  // src/google-vertex-embedding-model.ts
96
114
  var GoogleVertexEmbeddingModel = class {
@@ -212,26 +230,34 @@ var GoogleVertexEmbeddingModel = class {
212
230
  };
213
231
  }
214
232
  };
215
- var googleVertexTextEmbeddingResponseSchema = z3.object({
216
- predictions: z3.array(
233
+ var googleVertexTextEmbeddingResponseSchema = lazySchema3(
234
+ () => zodSchema3(
217
235
  z3.object({
218
- embeddings: z3.object({
219
- values: z3.array(z3.number()),
220
- statistics: z3.object({
221
- token_count: z3.number()
236
+ predictions: z3.array(
237
+ z3.object({
238
+ embeddings: z3.object({
239
+ values: z3.array(z3.number()),
240
+ statistics: z3.object({
241
+ token_count: z3.number()
242
+ })
243
+ })
222
244
  })
223
- })
245
+ )
224
246
  })
225
247
  )
226
- });
227
- var googleVertexEmbedContentResponseSchema = z3.object({
228
- embedding: z3.object({
229
- values: z3.array(z3.number())
230
- }),
231
- usageMetadata: z3.object({
232
- promptTokenCount: z3.number().nullish()
233
- }).nullish()
234
- });
248
+ );
249
+ var googleVertexEmbedContentResponseSchema = lazySchema3(
250
+ () => zodSchema3(
251
+ z3.object({
252
+ embedding: z3.object({
253
+ values: z3.array(z3.number())
254
+ }),
255
+ usageMetadata: z3.object({
256
+ promptTokenCount: z3.number().nullish()
257
+ }).nullish()
258
+ })
259
+ )
260
+ );
235
261
  function usesEmbedContentEndpoint(modelId) {
236
262
  return modelId === "gemini-embedding-2" || modelId === "gemini-embedding-2-preview";
237
263
  }
@@ -239,6 +265,8 @@ function usesEmbedContentEndpoint(modelId) {
239
265
  // src/google-vertex-image-model.ts
240
266
  import { GoogleGenerativeAILanguageModel } from "@ai-sdk/google/internal";
241
267
  import {
268
+ lazySchema as lazySchema4,
269
+ zodSchema as zodSchema4,
242
270
  combineHeaders as combineHeaders2,
243
271
  convertToBase64,
244
272
  convertUint8ArrayToBase64,
@@ -505,74 +533,82 @@ var GoogleVertexImageModel = class {
505
533
  function isGeminiModel(modelId) {
506
534
  return modelId.startsWith("gemini-");
507
535
  }
508
- var vertexImageResponseSchema = z4.object({
509
- predictions: z4.array(
510
- z4.union([
511
- z4.object({
512
- bytesBase64Encoded: z4.string(),
513
- mimeType: z4.string(),
514
- prompt: z4.string().nullish()
515
- }),
516
- z4.object({ raiFilteredReason: z4.string() })
517
- ])
518
- ).nullish()
519
- });
520
- var googleVertexImageModelOptionsSchema = z4.object({
521
- negativePrompt: z4.string().nullish(),
522
- personGeneration: z4.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
523
- safetySetting: z4.enum([
524
- "block_low_and_above",
525
- "block_medium_and_above",
526
- "block_only_high",
527
- "block_none"
528
- ]).nullish(),
529
- addWatermark: z4.boolean().nullish(),
530
- storageUri: z4.string().nullish(),
531
- sampleImageSize: z4.enum(["1K", "2K"]).nullish(),
532
- /**
533
- * Configuration for image editing operations
534
- */
535
- edit: z4.object({
536
- /**
537
- * An integer that represents the number of sampling steps.
538
- * A higher value offers better image quality, a lower value offers better latency.
539
- * Try 35 steps to start. If the quality doesn't meet your requirements,
540
- * increase the value towards an upper limit of 75.
541
- */
542
- baseSteps: z4.number().nullish(),
543
- // Edit mode options
544
- // https://cloud.google.com/vertex-ai/generative-ai/docs/image/edit-insert-objects
545
- mode: z4.enum([
546
- "EDIT_MODE_INPAINT_INSERTION",
547
- "EDIT_MODE_INPAINT_REMOVAL",
548
- "EDIT_MODE_OUTPAINT",
549
- "EDIT_MODE_CONTROLLED_EDITING",
550
- "EDIT_MODE_PRODUCT_IMAGE",
551
- "EDIT_MODE_BGSWAP"
552
- ]).nullish(),
553
- /**
554
- * The mask mode to use.
555
- * - `MASK_MODE_DEFAULT` - Default value for mask mode.
556
- * - `MASK_MODE_USER_PROVIDED` - User provided mask. No segmentation needed.
557
- * - `MASK_MODE_DETECTION_BOX` - Mask from detected bounding boxes.
558
- * - `MASK_MODE_CLOTHING_AREA` - Masks from segmenting the clothing area with open-vocab segmentation.
559
- * - `MASK_MODE_PARSED_PERSON` - Masks from segmenting the person body and clothing using the person-parsing model.
560
- */
561
- maskMode: z4.enum([
562
- "MASK_MODE_DEFAULT",
563
- "MASK_MODE_USER_PROVIDED",
564
- "MASK_MODE_DETECTION_BOX",
565
- "MASK_MODE_CLOTHING_AREA",
566
- "MASK_MODE_PARSED_PERSON"
567
- ]).nullish(),
568
- /**
569
- * Optional. A float value between 0 and 1, inclusive, that represents the
570
- * percentage of the image width to grow the mask by. Using dilation helps
571
- * compensate for imprecise masks. We recommend a value of 0.01.
572
- */
573
- maskDilation: z4.number().nullish()
574
- }).nullish()
575
- });
536
+ var vertexImageResponseSchema = lazySchema4(
537
+ () => zodSchema4(
538
+ z4.object({
539
+ predictions: z4.array(
540
+ z4.union([
541
+ z4.object({
542
+ bytesBase64Encoded: z4.string(),
543
+ mimeType: z4.string(),
544
+ prompt: z4.string().nullish()
545
+ }),
546
+ z4.object({ raiFilteredReason: z4.string() })
547
+ ])
548
+ ).nullish()
549
+ })
550
+ )
551
+ );
552
+ var googleVertexImageModelOptionsSchema = lazySchema4(
553
+ () => zodSchema4(
554
+ z4.object({
555
+ negativePrompt: z4.string().nullish(),
556
+ personGeneration: z4.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
557
+ safetySetting: z4.enum([
558
+ "block_low_and_above",
559
+ "block_medium_and_above",
560
+ "block_only_high",
561
+ "block_none"
562
+ ]).nullish(),
563
+ addWatermark: z4.boolean().nullish(),
564
+ storageUri: z4.string().nullish(),
565
+ sampleImageSize: z4.enum(["1K", "2K"]).nullish(),
566
+ /**
567
+ * Configuration for image editing operations
568
+ */
569
+ edit: z4.object({
570
+ /**
571
+ * An integer that represents the number of sampling steps.
572
+ * A higher value offers better image quality, a lower value offers better latency.
573
+ * Try 35 steps to start. If the quality doesn't meet your requirements,
574
+ * increase the value towards an upper limit of 75.
575
+ */
576
+ baseSteps: z4.number().nullish(),
577
+ // Edit mode options
578
+ // https://cloud.google.com/vertex-ai/generative-ai/docs/image/edit-insert-objects
579
+ mode: z4.enum([
580
+ "EDIT_MODE_INPAINT_INSERTION",
581
+ "EDIT_MODE_INPAINT_REMOVAL",
582
+ "EDIT_MODE_OUTPAINT",
583
+ "EDIT_MODE_CONTROLLED_EDITING",
584
+ "EDIT_MODE_PRODUCT_IMAGE",
585
+ "EDIT_MODE_BGSWAP"
586
+ ]).nullish(),
587
+ /**
588
+ * The mask mode to use.
589
+ * - `MASK_MODE_DEFAULT` - Default value for mask mode.
590
+ * - `MASK_MODE_USER_PROVIDED` - User provided mask. No segmentation needed.
591
+ * - `MASK_MODE_DETECTION_BOX` - Mask from detected bounding boxes.
592
+ * - `MASK_MODE_CLOTHING_AREA` - Masks from segmenting the clothing area with open-vocab segmentation.
593
+ * - `MASK_MODE_PARSED_PERSON` - Masks from segmenting the person body and clothing using the person-parsing model.
594
+ */
595
+ maskMode: z4.enum([
596
+ "MASK_MODE_DEFAULT",
597
+ "MASK_MODE_USER_PROVIDED",
598
+ "MASK_MODE_DETECTION_BOX",
599
+ "MASK_MODE_CLOTHING_AREA",
600
+ "MASK_MODE_PARSED_PERSON"
601
+ ]).nullish(),
602
+ /**
603
+ * Optional. A float value between 0 and 1, inclusive, that represents the
604
+ * percentage of the image width to grow the mask by. Using dilation helps
605
+ * compensate for imprecise masks. We recommend a value of 0.01.
606
+ */
607
+ maskDilation: z4.number().nullish()
608
+ }).nullish()
609
+ })
610
+ )
611
+ );
576
612
  function getBase64Data(file) {
577
613
  if (file.type === "url") {
578
614
  throw new Error(
@@ -599,6 +635,8 @@ var googleVertexTools = {
599
635
 
600
636
  // src/google-vertex-transcription-model.ts
601
637
  import {
638
+ lazySchema as lazySchema6,
639
+ zodSchema as zodSchema6,
602
640
  combineHeaders as combineHeaders3,
603
641
  convertUint8ArrayToBase64 as convertUint8ArrayToBase642,
604
642
  createJsonResponseHandler as createJsonResponseHandler3,
@@ -609,36 +647,44 @@ import {
609
647
  import { z as z6 } from "zod/v4";
610
648
 
611
649
  // src/google-vertex-transcription-model-options.ts
650
+ import {
651
+ lazySchema as lazySchema5,
652
+ zodSchema as zodSchema5
653
+ } from "@ai-sdk/provider-utils";
612
654
  import { z as z5 } from "zod/v4";
613
- var googleVertexTranscriptionProviderOptionsSchema = z5.object({
614
- /**
615
- * BCP-47 language codes to recognize (e.g. `['en-US']`), or `['auto']` to let
616
- * Chirp auto-detect the spoken language. Defaults to `['auto']`. For
617
- * `telephony`, pass a supported explicit language code.
618
- */
619
- languageCodes: z5.array(z5.string()).optional(),
620
- /**
621
- * Whether to add punctuation to the transcript. Defaults to `true`.
622
- */
623
- enableAutomaticPunctuation: z5.boolean().optional(),
624
- /**
625
- * Whether to include word-level timestamps. Defaults to `true` so the
626
- * transcription result can include segments.
627
- *
628
- * Enabling word-level timestamps can reduce transcription quality and speed
629
- * for Chirp models.
630
- */
631
- enableWordTimeOffsets: z5.boolean().optional(),
632
- /**
633
- * The Cloud Speech-to-Text region for the request (e.g. `'us'`, `'eu'`,
634
- * `'us-central1'`). Defaults to the provider `location`.
635
- *
636
- * Note: Speech-to-Text regions differ from Vertex AI regions. Chirp is only
637
- * available in specific Speech-to-Text regions and is not available in the
638
- * `global` location.
639
- */
640
- region: z5.string().optional()
641
- });
655
+ var googleVertexTranscriptionProviderOptionsSchema = lazySchema5(
656
+ () => zodSchema5(
657
+ z5.object({
658
+ /**
659
+ * BCP-47 language codes to recognize (e.g. `['en-US']`), or `['auto']` to let
660
+ * Chirp auto-detect the spoken language. Defaults to `['auto']`. For
661
+ * `telephony`, pass a supported explicit language code.
662
+ */
663
+ languageCodes: z5.array(z5.string()).optional(),
664
+ /**
665
+ * Whether to add punctuation to the transcript. Defaults to `true`.
666
+ */
667
+ enableAutomaticPunctuation: z5.boolean().optional(),
668
+ /**
669
+ * Whether to include word-level timestamps. Defaults to `true` so the
670
+ * transcription result can include segments.
671
+ *
672
+ * Enabling word-level timestamps can reduce transcription quality and speed
673
+ * for Chirp models.
674
+ */
675
+ enableWordTimeOffsets: z5.boolean().optional(),
676
+ /**
677
+ * The Cloud Speech-to-Text region for the request (e.g. `'us'`, `'eu'`,
678
+ * `'us-central1'`). Defaults to the provider `location`.
679
+ *
680
+ * Note: Speech-to-Text regions differ from Vertex AI regions. Chirp is only
681
+ * available in specific Speech-to-Text regions and is not available in the
682
+ * `global` location.
683
+ */
684
+ region: z5.string().optional()
685
+ })
686
+ )
687
+ );
642
688
 
643
689
  // src/google-vertex-transcription-model.ts
644
690
  function parseDurationSeconds(value) {
@@ -753,34 +799,40 @@ var GoogleVertexTranscriptionModel = class {
753
799
  };
754
800
  }
755
801
  };
756
- var googleVertexTranscriptionResponseSchema = z6.object({
757
- results: z6.array(
802
+ var googleVertexTranscriptionResponseSchema = lazySchema6(
803
+ () => zodSchema6(
758
804
  z6.object({
759
- alternatives: z6.array(
805
+ results: z6.array(
760
806
  z6.object({
761
- transcript: z6.string().nullish(),
762
- words: z6.array(
807
+ alternatives: z6.array(
763
808
  z6.object({
764
- word: z6.string().nullish(),
765
- startOffset: z6.string().nullish(),
766
- endOffset: z6.string().nullish()
809
+ transcript: z6.string().nullish(),
810
+ words: z6.array(
811
+ z6.object({
812
+ word: z6.string().nullish(),
813
+ startOffset: z6.string().nullish(),
814
+ endOffset: z6.string().nullish()
815
+ })
816
+ ).nullish()
767
817
  })
768
- ).nullish()
818
+ ).nullish(),
819
+ languageCode: z6.string().nullish()
769
820
  })
770
821
  ).nullish(),
771
- languageCode: z6.string().nullish()
822
+ metadata: z6.object({
823
+ totalBilledDuration: z6.string().nullish()
824
+ }).nullish()
772
825
  })
773
- ).nullish(),
774
- metadata: z6.object({
775
- totalBilledDuration: z6.string().nullish()
776
- }).nullish()
777
- });
826
+ )
827
+ );
778
828
 
779
829
  // src/gemini-transcription/google-vertex-gemini-transcription-model.ts
780
830
  import {
781
831
  InvalidArgumentError
782
832
  } from "@ai-sdk/provider";
783
833
  import {
834
+ lazySchema as lazySchema8,
835
+ zodSchema as zodSchema8,
784
836
  combineHeaders as combineHeaders4,
785
837
  convertToBase64 as convertToBase642,
786
838
  createJsonResponseHandler as createJsonResponseHandler4,
@@ -791,37 +843,45 @@ import {
791
843
  import { z as z8 } from "zod/v4";
792
844
 
793
845
  // src/gemini-transcription/google-vertex-gemini-transcription-model-options.ts
846
+ import {
847
+ lazySchema as lazySchema7,
848
+ zodSchema as zodSchema7
849
+ } from "@ai-sdk/provider-utils";
794
850
  import { z as z7 } from "zod/v4";
795
- var googleVertexGeminiTranscriptionModelOptions = z7.object({
796
- /**
797
- * BCP-47 language codes providing hints about the languages present in the
798
- * audio. If omitted or empty, defaults to automatic language detection.
799
- */
800
- languageCodes: z7.array(z7.string()).optional(),
801
- /**
802
- * Custom vocabulary phrases, which bias the speech recognition model
803
- * toward recognizing specific terms.
804
- */
805
- customVocabulary: z7.array(z7.string()).optional(),
806
- /**
807
- * Enables word-level timestamp generation.
808
- */
809
- wordTimestamp: z7.boolean().optional(),
810
- /**
811
- * Enables speaker diarization.
812
- */
813
- diarization: z7.boolean().optional(),
814
- /**
815
- * Transcription output formatting mode.
816
- *
817
- * - `VERBATIM` (default): exact literal transcript preserving filler
818
- * words, repetitions, and false starts.
819
- * - `SMART`: cleans up and structures the transcript in real time —
820
- * disfluency removal, inline self-corrections, structured formatting
821
- * (lists, numbers, dates, paragraph breaks), and grammar/casing polish.
822
- */
823
- mode: z7.enum(["SMART", "VERBATIM"]).optional()
824
- });
851
+ var googleVertexGeminiTranscriptionModelOptions = lazySchema7(
852
+ () => zodSchema7(
853
+ z7.object({
854
+ /**
855
+ * BCP-47 language codes providing hints about the languages present in the
856
+ * audio. If omitted or empty, defaults to automatic language detection.
857
+ */
858
+ languageCodes: z7.array(z7.string()).optional(),
859
+ /**
860
+ * Custom vocabulary phrases, which bias the speech recognition model
861
+ * toward recognizing specific terms.
862
+ */
863
+ customVocabulary: z7.array(z7.string()).optional(),
864
+ /**
865
+ * Enables word-level timestamp generation.
866
+ */
867
+ wordTimestamp: z7.boolean().optional(),
868
+ /**
869
+ * Enables speaker diarization.
870
+ */
871
+ diarization: z7.boolean().optional(),
872
+ /**
873
+ * Transcription output formatting mode.
874
+ *
875
+ * - `VERBATIM` (default): exact literal transcript preserving filler
876
+ * words, repetitions, and false starts.
877
+ * - `SMART`: cleans up and structures the transcript in real time —
878
+ * disfluency removal, inline self-corrections, structured formatting
879
+ * (lists, numbers, dates, paragraph breaks), and grammar/casing polish.
880
+ */
881
+ mode: z7.enum(["SMART", "VERBATIM"]).optional()
882
+ })
883
+ )
884
+ );
825
885
 
826
886
  // src/gemini-transcription/google-vertex-gemini-transcription-model.ts
827
887
  function isLiveTranscriptionModelId(modelId) {
@@ -963,31 +1023,35 @@ function parseOffsetSeconds(offset) {
963
1023
  const parsed = Number.parseFloat(offset);
964
1024
  return Number.isFinite(parsed) ? parsed : void 0;
965
1025
  }
966
- var googleVertexGeminiTranscriptionWordSchema = z8.object({
1026
+ var googleVertexGeminiTranscriptionWordSchema = () => z8.object({
967
1027
  word: z8.string().nullish(),
968
1028
  startOffset: z8.string().nullish(),
969
1029
  endOffset: z8.string().nullish()
970
1030
  });
971
- var googleVertexGeminiTranscriptionResponseSchema = z8.object({
972
- candidates: z8.array(
1031
+ var googleVertexGeminiTranscriptionResponseSchema = lazySchema8(
1032
+ () => zodSchema8(
973
1033
  z8.object({
974
- content: z8.object({
975
- parts: z8.array(
976
- z8.object({
977
- text: z8.string().nullish(),
978
- audioTranscription: z8.object({
979
- text: z8.string().nullish(),
980
- languageCode: z8.string().nullish(),
981
- speakerLabel: z8.string().nullish(),
982
- words: z8.array(googleVertexGeminiTranscriptionWordSchema).nullish()
983
- }).nullish()
984
- })
985
- ).nullish()
986
- }).nullish()
1034
+ candidates: z8.array(
1035
+ z8.object({
1036
+ content: z8.object({
1037
+ parts: z8.array(
1038
+ z8.object({
1039
+ text: z8.string().nullish(),
1040
+ audioTranscription: z8.object({
1041
+ text: z8.string().nullish(),
1042
+ languageCode: z8.string().nullish(),
1043
+ speakerLabel: z8.string().nullish(),
1044
+ words: z8.array(googleVertexGeminiTranscriptionWordSchema()).nullish()
1045
+ }).nullish()
1046
+ })
1047
+ ).nullish()
1048
+ }).nullish()
1049
+ })
1050
+ ).nullish(),
1051
+ usageMetadata: z8.record(z8.string(), z8.unknown()).nullish()
987
1052
  })
988
- ).nullish(),
989
- usageMetadata: z8.record(z8.string(), z8.unknown()).nullish()
990
- });
1053
+ )
1054
+ );
991
1055
 
992
1056
  // src/google-vertex-video-model.ts
993
1057
  import {
@@ -998,11 +1062,11 @@ import {
998
1062
  convertUint8ArrayToBase64 as convertUint8ArrayToBase643,
999
1063
  createJsonResponseHandler as createJsonResponseHandler5,
1000
1064
  delay,
1001
- lazySchema,
1065
+ lazySchema as lazySchema9,
1002
1066
  parseProviderOptions as parseProviderOptions5,
1003
1067
  postJsonToApi as postJsonToApi5,
1004
1068
  resolve as resolve5,
1005
- zodSchema
1069
+ zodSchema as zodSchema9
1006
1070
  } from "@ai-sdk/provider-utils";
1007
1071
  import { z as z9 } from "zod/v4";
1008
1072
  function getFirstFrameImage(options) {
@@ -1267,27 +1331,31 @@ var GoogleVertexVideoModel = class {
1267
1331
  };
1268
1332
  }
1269
1333
  };
1270
- var vertexOperationSchema = z9.object({
1271
- name: z9.string().nullish(),
1272
- done: z9.boolean().nullish(),
1273
- error: z9.object({
1274
- code: z9.number().nullish(),
1275
- message: z9.string(),
1276
- status: z9.string().nullish()
1277
- }).nullish(),
1278
- response: z9.object({
1279
- videos: z9.array(
1280
- z9.object({
1281
- bytesBase64Encoded: z9.string().nullish(),
1282
- gcsUri: z9.string().nullish(),
1283
- mimeType: z9.string().nullish()
1284
- })
1285
- ).nullish(),
1286
- raiMediaFilteredCount: z9.number().nullish()
1287
- }).nullish()
1288
- });
1289
- var googleVertexVideoModelOptionsSchema = lazySchema(
1290
- () => zodSchema(
1334
+ var vertexOperationSchema = lazySchema9(
1335
+ () => zodSchema9(
1336
+ z9.object({
1337
+ name: z9.string().nullish(),
1338
+ done: z9.boolean().nullish(),
1339
+ error: z9.object({
1340
+ code: z9.number().nullish(),
1341
+ message: z9.string(),
1342
+ status: z9.string().nullish()
1343
+ }).nullish(),
1344
+ response: z9.object({
1345
+ videos: z9.array(
1346
+ z9.object({
1347
+ bytesBase64Encoded: z9.string().nullish(),
1348
+ gcsUri: z9.string().nullish(),
1349
+ mimeType: z9.string().nullish()
1350
+ })
1351
+ ).nullish(),
1352
+ raiMediaFilteredCount: z9.number().nullish()
1353
+ }).nullish()
1354
+ })
1355
+ )
1356
+ );
1357
+ var googleVertexVideoModelOptionsSchema = lazySchema9(
1358
+ () => zodSchema9(
1291
1359
  z9.object({
1292
1360
  pollIntervalMs: z9.number().positive().nullish(),
1293
1361
  pollTimeoutMs: z9.number().positive().nullish(),