@ai-sdk/google-vertex 4.0.218 → 4.0.220

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/index.d.mts CHANGED
@@ -1,79 +1,44 @@
1
- import { z } from 'zod/v4';
2
- import { TranscriptionModelV3, EmbeddingModelV3, ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3 } from '@ai-sdk/provider';
3
1
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
- import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
2
+ import { InferSchema, Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { TranscriptionModelV3, EmbeddingModelV3, ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3 } from '@ai-sdk/provider';
5
4
  import { GoogleAuthOptions } from 'google-auth-library';
6
5
  import { GoogleInteractionsModelId, GoogleInteractionsAgentName } from '@ai-sdk/google/internal';
7
6
 
8
7
  type GoogleVertexEmbeddingModelId = 'textembedding-gecko' | 'textembedding-gecko@001' | 'textembedding-gecko@003' | 'textembedding-gecko-multilingual' | 'textembedding-gecko-multilingual@001' | 'text-multilingual-embedding-002' | 'text-embedding-004' | 'text-embedding-005' | 'gemini-embedding-001' | 'gemini-embedding-2-preview' | (string & {});
9
- declare const googleVertexEmbeddingModelOptions: z.ZodObject<{
10
- outputDimensionality: z.ZodOptional<z.ZodNumber>;
11
- taskType: z.ZodOptional<z.ZodEnum<{
12
- SEMANTIC_SIMILARITY: "SEMANTIC_SIMILARITY";
13
- CLASSIFICATION: "CLASSIFICATION";
14
- CLUSTERING: "CLUSTERING";
15
- RETRIEVAL_DOCUMENT: "RETRIEVAL_DOCUMENT";
16
- RETRIEVAL_QUERY: "RETRIEVAL_QUERY";
17
- QUESTION_ANSWERING: "QUESTION_ANSWERING";
18
- FACT_VERIFICATION: "FACT_VERIFICATION";
19
- CODE_RETRIEVAL_QUERY: "CODE_RETRIEVAL_QUERY";
20
- }>>;
21
- title: z.ZodOptional<z.ZodString>;
22
- autoTruncate: z.ZodOptional<z.ZodBoolean>;
23
- }, z.core.$strip>;
24
- type GoogleVertexEmbeddingModelOptions = z.infer<typeof googleVertexEmbeddingModelOptions>;
8
+ declare const googleVertexEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{
9
+ outputDimensionality?: number | undefined;
10
+ taskType?: "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY" | undefined;
11
+ title?: string | undefined;
12
+ autoTruncate?: boolean | undefined;
13
+ }>;
14
+ type GoogleVertexEmbeddingModelOptions = InferSchema<typeof googleVertexEmbeddingModelOptions>;
25
15
 
26
16
  type GoogleVertexTranscriptionModelId = 'chirp_2' | 'chirp_3' | 'telephony' | (string & {});
27
- declare const googleVertexTranscriptionProviderOptionsSchema: z.ZodObject<{
28
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
- enableAutomaticPunctuation: z.ZodOptional<z.ZodBoolean>;
30
- enableWordTimeOffsets: z.ZodOptional<z.ZodBoolean>;
31
- region: z.ZodOptional<z.ZodString>;
32
- }, z.core.$strip>;
33
- type GoogleVertexTranscriptionModelOptions = z.infer<typeof googleVertexTranscriptionProviderOptionsSchema>;
17
+ declare const googleVertexTranscriptionProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
18
+ languageCodes?: string[] | undefined;
19
+ enableAutomaticPunctuation?: boolean | undefined;
20
+ enableWordTimeOffsets?: boolean | undefined;
21
+ region?: string | undefined;
22
+ }>;
23
+ type GoogleVertexTranscriptionModelOptions = InferSchema<typeof googleVertexTranscriptionProviderOptionsSchema>;
34
24
 
35
25
  type GoogleVertexImageModelId = 'imagen-3.0-generate-001' | 'imagen-3.0-generate-002' | 'imagen-3.0-fast-generate-001' | 'imagen-4.0-generate-001' | 'imagen-4.0-ultra-generate-001' | 'imagen-4.0-fast-generate-001' | 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-nano-banana-2.1' | (string & {});
36
26
 
37
- declare const googleVertexImageModelOptionsSchema: z.ZodObject<{
38
- negativePrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
- personGeneration: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
40
- dont_allow: "dont_allow";
41
- allow_adult: "allow_adult";
42
- allow_all: "allow_all";
43
- }>>>;
44
- safetySetting: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
45
- block_low_and_above: "block_low_and_above";
46
- block_medium_and_above: "block_medium_and_above";
47
- block_only_high: "block_only_high";
48
- block_none: "block_none";
49
- }>>>;
50
- addWatermark: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
51
- storageUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- sampleImageSize: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
53
- "1K": "1K";
54
- "2K": "2K";
55
- }>>>;
56
- edit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
57
- baseSteps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
58
- mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
59
- EDIT_MODE_INPAINT_INSERTION: "EDIT_MODE_INPAINT_INSERTION";
60
- EDIT_MODE_INPAINT_REMOVAL: "EDIT_MODE_INPAINT_REMOVAL";
61
- EDIT_MODE_OUTPAINT: "EDIT_MODE_OUTPAINT";
62
- EDIT_MODE_CONTROLLED_EDITING: "EDIT_MODE_CONTROLLED_EDITING";
63
- EDIT_MODE_PRODUCT_IMAGE: "EDIT_MODE_PRODUCT_IMAGE";
64
- EDIT_MODE_BGSWAP: "EDIT_MODE_BGSWAP";
65
- }>>>;
66
- maskMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
67
- MASK_MODE_DEFAULT: "MASK_MODE_DEFAULT";
68
- MASK_MODE_USER_PROVIDED: "MASK_MODE_USER_PROVIDED";
69
- MASK_MODE_DETECTION_BOX: "MASK_MODE_DETECTION_BOX";
70
- MASK_MODE_CLOTHING_AREA: "MASK_MODE_CLOTHING_AREA";
71
- MASK_MODE_PARSED_PERSON: "MASK_MODE_PARSED_PERSON";
72
- }>>>;
73
- maskDilation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
74
- }, z.core.$strip>>>;
75
- }, z.core.$strip>;
76
- type GoogleVertexImageModelOptions = z.infer<typeof googleVertexImageModelOptionsSchema>;
27
+ declare const googleVertexImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
28
+ negativePrompt?: string | null | undefined;
29
+ personGeneration?: "dont_allow" | "allow_adult" | "allow_all" | null | undefined;
30
+ safetySetting?: "block_low_and_above" | "block_medium_and_above" | "block_only_high" | "block_none" | null | undefined;
31
+ addWatermark?: boolean | null | undefined;
32
+ storageUri?: string | null | undefined;
33
+ sampleImageSize?: "1K" | "2K" | null | undefined;
34
+ edit?: {
35
+ baseSteps?: number | null | undefined;
36
+ mode?: "EDIT_MODE_INPAINT_INSERTION" | "EDIT_MODE_INPAINT_REMOVAL" | "EDIT_MODE_OUTPAINT" | "EDIT_MODE_CONTROLLED_EDITING" | "EDIT_MODE_PRODUCT_IMAGE" | "EDIT_MODE_BGSWAP" | null | undefined;
37
+ maskMode?: "MASK_MODE_DEFAULT" | "MASK_MODE_USER_PROVIDED" | "MASK_MODE_DETECTION_BOX" | "MASK_MODE_CLOTHING_AREA" | "MASK_MODE_PARSED_PERSON" | null | undefined;
38
+ maskDilation?: number | null | undefined;
39
+ } | null | undefined;
40
+ }>;
41
+ type GoogleVertexImageModelOptions = InferSchema<typeof googleVertexImageModelOptionsSchema>;
77
42
 
78
43
  type GoogleVertexVideoModelId = 'veo-2.0-generate-preview' | 'veo-2.0-generate-exp' | 'veo-2.0-generate-001' | 'veo-3.0-generate-001' | 'veo-3.0-fast-generate-001' | 'veo-3.0-generate-preview' | 'veo-3.0-fast-generate-preview' | 'veo-3.1-generate-001' | 'veo-3.1-fast-generate-001' | 'veo-3.1-generate-preview' | 'veo-3.1-fast-generate-preview' | (string & {});
79
44
 
@@ -98,17 +63,14 @@ type GoogleVertexGeminiTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-
98
63
  * The live variant (`gemini-3.5-transcribe-live`) requires streaming
99
64
  * transcription, which is only available in AI SDK v7.
100
65
  */
101
- declare const googleVertexGeminiTranscriptionModelOptions: z.ZodObject<{
102
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
- customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
- wordTimestamp: z.ZodOptional<z.ZodBoolean>;
105
- diarization: z.ZodOptional<z.ZodBoolean>;
106
- mode: z.ZodOptional<z.ZodEnum<{
107
- SMART: "SMART";
108
- VERBATIM: "VERBATIM";
109
- }>>;
110
- }, z.core.$strip>;
111
- type GoogleVertexTranscriptionModelGeminiOptions = z.infer<typeof googleVertexGeminiTranscriptionModelOptions>;
66
+ declare const googleVertexGeminiTranscriptionModelOptions: _ai_sdk_provider_utils.LazySchema<{
67
+ languageCodes?: string[] | undefined;
68
+ customVocabulary?: string[] | undefined;
69
+ wordTimestamp?: boolean | undefined;
70
+ diarization?: boolean | undefined;
71
+ mode?: "SMART" | "VERBATIM" | undefined;
72
+ }>;
73
+ type GoogleVertexTranscriptionModelGeminiOptions = InferSchema<typeof googleVertexGeminiTranscriptionModelOptions>;
112
74
 
113
75
  interface GoogleVertexGeminiTranscriptionModelConfig {
114
76
  provider: string;
package/dist/index.d.ts CHANGED
@@ -1,79 +1,44 @@
1
- import { z } from 'zod/v4';
2
- import { TranscriptionModelV3, EmbeddingModelV3, ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3 } from '@ai-sdk/provider';
3
1
  import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
4
- import { Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
2
+ import { InferSchema, Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
3
+ import { TranscriptionModelV3, EmbeddingModelV3, ProviderV3, LanguageModelV3, ImageModelV3, Experimental_VideoModelV3 } from '@ai-sdk/provider';
5
4
  import { GoogleAuthOptions } from 'google-auth-library';
6
5
  import { GoogleInteractionsModelId, GoogleInteractionsAgentName } from '@ai-sdk/google/internal';
7
6
 
8
7
  type GoogleVertexEmbeddingModelId = 'textembedding-gecko' | 'textembedding-gecko@001' | 'textembedding-gecko@003' | 'textembedding-gecko-multilingual' | 'textembedding-gecko-multilingual@001' | 'text-multilingual-embedding-002' | 'text-embedding-004' | 'text-embedding-005' | 'gemini-embedding-001' | 'gemini-embedding-2-preview' | (string & {});
9
- declare const googleVertexEmbeddingModelOptions: z.ZodObject<{
10
- outputDimensionality: z.ZodOptional<z.ZodNumber>;
11
- taskType: z.ZodOptional<z.ZodEnum<{
12
- SEMANTIC_SIMILARITY: "SEMANTIC_SIMILARITY";
13
- CLASSIFICATION: "CLASSIFICATION";
14
- CLUSTERING: "CLUSTERING";
15
- RETRIEVAL_DOCUMENT: "RETRIEVAL_DOCUMENT";
16
- RETRIEVAL_QUERY: "RETRIEVAL_QUERY";
17
- QUESTION_ANSWERING: "QUESTION_ANSWERING";
18
- FACT_VERIFICATION: "FACT_VERIFICATION";
19
- CODE_RETRIEVAL_QUERY: "CODE_RETRIEVAL_QUERY";
20
- }>>;
21
- title: z.ZodOptional<z.ZodString>;
22
- autoTruncate: z.ZodOptional<z.ZodBoolean>;
23
- }, z.core.$strip>;
24
- type GoogleVertexEmbeddingModelOptions = z.infer<typeof googleVertexEmbeddingModelOptions>;
8
+ declare const googleVertexEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{
9
+ outputDimensionality?: number | undefined;
10
+ taskType?: "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY" | undefined;
11
+ title?: string | undefined;
12
+ autoTruncate?: boolean | undefined;
13
+ }>;
14
+ type GoogleVertexEmbeddingModelOptions = InferSchema<typeof googleVertexEmbeddingModelOptions>;
25
15
 
26
16
  type GoogleVertexTranscriptionModelId = 'chirp_2' | 'chirp_3' | 'telephony' | (string & {});
27
- declare const googleVertexTranscriptionProviderOptionsSchema: z.ZodObject<{
28
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
- enableAutomaticPunctuation: z.ZodOptional<z.ZodBoolean>;
30
- enableWordTimeOffsets: z.ZodOptional<z.ZodBoolean>;
31
- region: z.ZodOptional<z.ZodString>;
32
- }, z.core.$strip>;
33
- type GoogleVertexTranscriptionModelOptions = z.infer<typeof googleVertexTranscriptionProviderOptionsSchema>;
17
+ declare const googleVertexTranscriptionProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
18
+ languageCodes?: string[] | undefined;
19
+ enableAutomaticPunctuation?: boolean | undefined;
20
+ enableWordTimeOffsets?: boolean | undefined;
21
+ region?: string | undefined;
22
+ }>;
23
+ type GoogleVertexTranscriptionModelOptions = InferSchema<typeof googleVertexTranscriptionProviderOptionsSchema>;
34
24
 
35
25
  type GoogleVertexImageModelId = 'imagen-3.0-generate-001' | 'imagen-3.0-generate-002' | 'imagen-3.0-fast-generate-001' | 'imagen-4.0-generate-001' | 'imagen-4.0-ultra-generate-001' | 'imagen-4.0-fast-generate-001' | 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-nano-banana-2.1' | (string & {});
36
26
 
37
- declare const googleVertexImageModelOptionsSchema: z.ZodObject<{
38
- negativePrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
- personGeneration: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
40
- dont_allow: "dont_allow";
41
- allow_adult: "allow_adult";
42
- allow_all: "allow_all";
43
- }>>>;
44
- safetySetting: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
45
- block_low_and_above: "block_low_and_above";
46
- block_medium_and_above: "block_medium_and_above";
47
- block_only_high: "block_only_high";
48
- block_none: "block_none";
49
- }>>>;
50
- addWatermark: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
51
- storageUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- sampleImageSize: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
53
- "1K": "1K";
54
- "2K": "2K";
55
- }>>>;
56
- edit: z.ZodOptional<z.ZodNullable<z.ZodObject<{
57
- baseSteps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
58
- mode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
59
- EDIT_MODE_INPAINT_INSERTION: "EDIT_MODE_INPAINT_INSERTION";
60
- EDIT_MODE_INPAINT_REMOVAL: "EDIT_MODE_INPAINT_REMOVAL";
61
- EDIT_MODE_OUTPAINT: "EDIT_MODE_OUTPAINT";
62
- EDIT_MODE_CONTROLLED_EDITING: "EDIT_MODE_CONTROLLED_EDITING";
63
- EDIT_MODE_PRODUCT_IMAGE: "EDIT_MODE_PRODUCT_IMAGE";
64
- EDIT_MODE_BGSWAP: "EDIT_MODE_BGSWAP";
65
- }>>>;
66
- maskMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
67
- MASK_MODE_DEFAULT: "MASK_MODE_DEFAULT";
68
- MASK_MODE_USER_PROVIDED: "MASK_MODE_USER_PROVIDED";
69
- MASK_MODE_DETECTION_BOX: "MASK_MODE_DETECTION_BOX";
70
- MASK_MODE_CLOTHING_AREA: "MASK_MODE_CLOTHING_AREA";
71
- MASK_MODE_PARSED_PERSON: "MASK_MODE_PARSED_PERSON";
72
- }>>>;
73
- maskDilation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
74
- }, z.core.$strip>>>;
75
- }, z.core.$strip>;
76
- type GoogleVertexImageModelOptions = z.infer<typeof googleVertexImageModelOptionsSchema>;
27
+ declare const googleVertexImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
28
+ negativePrompt?: string | null | undefined;
29
+ personGeneration?: "dont_allow" | "allow_adult" | "allow_all" | null | undefined;
30
+ safetySetting?: "block_low_and_above" | "block_medium_and_above" | "block_only_high" | "block_none" | null | undefined;
31
+ addWatermark?: boolean | null | undefined;
32
+ storageUri?: string | null | undefined;
33
+ sampleImageSize?: "1K" | "2K" | null | undefined;
34
+ edit?: {
35
+ baseSteps?: number | null | undefined;
36
+ mode?: "EDIT_MODE_INPAINT_INSERTION" | "EDIT_MODE_INPAINT_REMOVAL" | "EDIT_MODE_OUTPAINT" | "EDIT_MODE_CONTROLLED_EDITING" | "EDIT_MODE_PRODUCT_IMAGE" | "EDIT_MODE_BGSWAP" | null | undefined;
37
+ maskMode?: "MASK_MODE_DEFAULT" | "MASK_MODE_USER_PROVIDED" | "MASK_MODE_DETECTION_BOX" | "MASK_MODE_CLOTHING_AREA" | "MASK_MODE_PARSED_PERSON" | null | undefined;
38
+ maskDilation?: number | null | undefined;
39
+ } | null | undefined;
40
+ }>;
41
+ type GoogleVertexImageModelOptions = InferSchema<typeof googleVertexImageModelOptionsSchema>;
77
42
 
78
43
  type GoogleVertexVideoModelId = 'veo-2.0-generate-preview' | 'veo-2.0-generate-exp' | 'veo-2.0-generate-001' | 'veo-3.0-generate-001' | 'veo-3.0-fast-generate-001' | 'veo-3.0-generate-preview' | 'veo-3.0-fast-generate-preview' | 'veo-3.1-generate-001' | 'veo-3.1-fast-generate-001' | 'veo-3.1-generate-preview' | 'veo-3.1-fast-generate-preview' | (string & {});
79
44
 
@@ -98,17 +63,14 @@ type GoogleVertexGeminiTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-
98
63
  * The live variant (`gemini-3.5-transcribe-live`) requires streaming
99
64
  * transcription, which is only available in AI SDK v7.
100
65
  */
101
- declare const googleVertexGeminiTranscriptionModelOptions: z.ZodObject<{
102
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
- customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
- wordTimestamp: z.ZodOptional<z.ZodBoolean>;
105
- diarization: z.ZodOptional<z.ZodBoolean>;
106
- mode: z.ZodOptional<z.ZodEnum<{
107
- SMART: "SMART";
108
- VERBATIM: "VERBATIM";
109
- }>>;
110
- }, z.core.$strip>;
111
- type GoogleVertexTranscriptionModelGeminiOptions = z.infer<typeof googleVertexGeminiTranscriptionModelOptions>;
66
+ declare const googleVertexGeminiTranscriptionModelOptions: _ai_sdk_provider_utils.LazySchema<{
67
+ languageCodes?: string[] | undefined;
68
+ customVocabulary?: string[] | undefined;
69
+ wordTimestamp?: boolean | undefined;
70
+ diarization?: boolean | undefined;
71
+ mode?: "SMART" | "VERBATIM" | undefined;
72
+ }>;
73
+ type GoogleVertexTranscriptionModelGeminiOptions = InferSchema<typeof googleVertexGeminiTranscriptionModelOptions>;
112
74
 
113
75
  interface GoogleVertexGeminiTranscriptionModelConfig {
114
76
  provider: string;