@ai-sdk/google-vertex 5.0.98 → 5.0.100

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 (41) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/anthropic/edge/index.d.ts +84 -80
  3. package/dist/anthropic/edge/index.d.ts.map +1 -0
  4. package/dist/anthropic/edge/index.js +238 -272
  5. package/dist/anthropic/edge/index.js.map +1 -1
  6. package/dist/anthropic/index.d.ts +69 -66
  7. package/dist/anthropic/index.d.ts.map +1 -0
  8. package/dist/anthropic/index.js +172 -177
  9. package/dist/anthropic/index.js.map +1 -1
  10. package/dist/edge/index.d.ts +206 -194
  11. package/dist/edge/index.d.ts.map +1 -0
  12. package/dist/edge/index.js +1428 -1846
  13. package/dist/edge/index.js.map +1 -1
  14. package/dist/index.d.ts +265 -252
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +1369 -1761
  17. package/dist/index.js.map +1 -1
  18. package/dist/maas/edge/index.d.ts +62 -59
  19. package/dist/maas/edge/index.d.ts.map +1 -0
  20. package/dist/maas/edge/index.js +174 -196
  21. package/dist/maas/edge/index.js.map +1 -1
  22. package/dist/maas/index.d.ts +47 -45
  23. package/dist/maas/index.d.ts.map +1 -0
  24. package/dist/maas/index.js +109 -102
  25. package/dist/maas/index.js.map +1 -1
  26. package/dist/xai/edge/index.d.ts +77 -73
  27. package/dist/xai/edge/index.d.ts.map +1 -0
  28. package/dist/xai/edge/index.js +203 -235
  29. package/dist/xai/edge/index.js.map +1 -1
  30. package/dist/xai/index.d.ts +62 -59
  31. package/dist/xai/index.d.ts.map +1 -0
  32. package/dist/xai/index.js +138 -141
  33. package/dist/xai/index.js.map +1 -1
  34. package/docs/16-google-vertex.mdx +3 -3
  35. package/package.json +11 -11
  36. package/src/anthropic/google-vertex-anthropic-provider.ts +14 -4
  37. package/src/gemini-transcription/google-vertex-gemini-transcription-model.ts +5 -1
  38. package/src/google-vertex-provider-base.ts +28 -15
  39. package/src/google-vertex-transcription-model-options.ts +2 -1
  40. package/src/google-vertex-transcription-model.ts +13 -1
  41. package/src/maas/google-vertex-maas-provider.ts +18 -6
package/dist/index.d.ts CHANGED
@@ -1,246 +1,256 @@
1
- import { z } from 'zod/v4';
2
- import { GoogleLanguageModelOptions, GoogleSpeechModelOptions } from '@ai-sdk/google';
3
- import { GoogleAuthOptions } from 'google-auth-library';
4
- import { GoogleInteractionsModelId, GoogleInteractionsAgentName } from '@ai-sdk/google/internal';
5
- import * as _ai_sdk_provider from '@ai-sdk/provider';
6
- import { EmbeddingModelV4, ProviderV4, LanguageModelV4, ImageModelV4, Experimental_VideoModelV4, SpeechModelV4, TranscriptionModelV4, JSONObject, Experimental_TranscriptionModelV4StreamOptions } from '@ai-sdk/provider';
7
- import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
8
- import { Resolvable, FetchFunction, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE, WebSocketConstructor } from '@ai-sdk/provider-utils';
9
-
1
+ import { FetchFunction, Resolvable, WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE, WebSocketConstructor } from "@ai-sdk/provider-utils";
2
+ import { GoogleAuthOptions } from "google-auth-library";
3
+ import { GoogleInteractionsAgentName, GoogleInteractionsModelId } from "@ai-sdk/google/internal";
4
+ import { EmbeddingModelV4, Experimental_TranscriptionModelV4StreamOptions, Experimental_VideoModelV4, ImageModelV4, JSONObject, LanguageModelV4, ProviderV4, SpeechModelV4, TranscriptionModelV4 } from "@ai-sdk/provider";
5
+ import { z } from "zod/v4";
6
+ import { GoogleLanguageModelOptions, GoogleSpeechModelOptions } from "@ai-sdk/google";
7
+ //#region src/google-vertex-embedding-model-options.d.ts
10
8
  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' | 'gemini-embedding-2-preview' | (string & {});
11
9
  declare const googleVertexEmbeddingModelOptions: z.ZodObject<{
12
- outputDimensionality: z.ZodOptional<z.ZodNumber>;
13
- taskType: z.ZodOptional<z.ZodEnum<{
14
- SEMANTIC_SIMILARITY: "SEMANTIC_SIMILARITY";
15
- CLASSIFICATION: "CLASSIFICATION";
16
- CLUSTERING: "CLUSTERING";
17
- RETRIEVAL_DOCUMENT: "RETRIEVAL_DOCUMENT";
18
- RETRIEVAL_QUERY: "RETRIEVAL_QUERY";
19
- QUESTION_ANSWERING: "QUESTION_ANSWERING";
20
- FACT_VERIFICATION: "FACT_VERIFICATION";
21
- CODE_RETRIEVAL_QUERY: "CODE_RETRIEVAL_QUERY";
22
- }>>;
23
- title: z.ZodOptional<z.ZodString>;
24
- autoTruncate: z.ZodOptional<z.ZodBoolean>;
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>;
25
23
  }, z.core.$strip>;
26
24
  type GoogleVertexEmbeddingModelOptions = z.infer<typeof googleVertexEmbeddingModelOptions>;
27
-
25
+ //#endregion
26
+ //#region src/google-vertex-transcription-model-options.d.ts
28
27
  type GoogleVertexTranscriptionModelId = 'chirp_2' | 'chirp_3' | 'telephony' | (string & {});
29
28
  declare const googleVertexTranscriptionProviderOptionsSchema: z.ZodObject<{
30
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
- enableAutomaticPunctuation: z.ZodOptional<z.ZodBoolean>;
32
- enableWordTimeOffsets: z.ZodOptional<z.ZodBoolean>;
33
- region: z.ZodOptional<z.ZodString>;
29
+ languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ enableAutomaticPunctuation: z.ZodOptional<z.ZodBoolean>;
31
+ enableWordTimeOffsets: z.ZodOptional<z.ZodBoolean>;
32
+ region: z.ZodOptional<z.ZodString>;
34
33
  }, z.core.$strip>;
35
34
  type GoogleVertexTranscriptionModelOptions = z.infer<typeof googleVertexTranscriptionProviderOptionsSchema>;
36
-
35
+ //#endregion
36
+ //#region src/google-vertex-image-model-options.d.ts
37
37
  type GoogleVertexImageModelOptions = Omit<GoogleLanguageModelOptions, 'responseModalities'>;
38
-
38
+ //#endregion
39
+ //#region src/google-vertex-video-model-options.d.ts
39
40
  type GoogleVertexVideoModelOptions = {
40
- pollIntervalMs?: number | null;
41
- pollTimeoutMs?: number | null;
42
- personGeneration?: 'dont_allow' | 'allow_adult' | 'allow_all' | null;
43
- negativePrompt?: string | null;
44
- generateAudio?: boolean | null;
45
- gcsOutputDirectory?: string | null;
46
- referenceImages?: Array<{
47
- bytesBase64Encoded?: string;
48
- gcsUri?: string;
49
- }> | null;
50
- [key: string]: unknown;
41
+ pollIntervalMs?: number | null;
42
+ pollTimeoutMs?: number | null;
43
+ personGeneration?: 'dont_allow' | 'allow_adult' | 'allow_all' | null;
44
+ negativePrompt?: string | null;
45
+ generateAudio?: boolean | null;
46
+ gcsOutputDirectory?: string | null;
47
+ referenceImages?: Array<{
48
+ bytesBase64Encoded?: string;
49
+ gcsUri?: string;
50
+ }> | null;
51
+ [key: string]: unknown;
51
52
  };
52
-
53
+ //#endregion
54
+ //#region src/google-vertex-video-settings.d.ts
53
55
  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 & {});
54
-
56
+ //#endregion
57
+ //#region src/google-vertex-speech-model-options.d.ts
55
58
  type GoogleVertexSpeechModelId = 'gemini-2.5-flash-tts' | 'gemini-2.5-pro-tts' | 'gemini-2.5-flash-lite-preview-tts' | 'gemini-3.1-flash-tts-preview' | 'chirp-3-hd' | (string & {});
56
59
  type GoogleVertexSpeechModelOptions = GoogleSpeechModelOptions;
57
-
60
+ //#endregion
61
+ //#region src/google-vertex-config.d.ts
58
62
  interface GoogleVertexConfig {
59
- provider: string;
60
- baseURL: string;
61
- headers?: Resolvable<Record<string, string | undefined>>;
62
- fetch?: FetchFunction;
63
+ provider: string;
64
+ baseURL: string;
65
+ headers?: Resolvable<Record<string, string | undefined>>;
66
+ fetch?: FetchFunction;
63
67
  }
64
-
68
+ //#endregion
69
+ //#region src/google-vertex-embedding-model.d.ts
65
70
  declare class GoogleVertexEmbeddingModel implements EmbeddingModelV4 {
66
- readonly specificationVersion = "v4";
67
- readonly modelId: GoogleVertexEmbeddingModelId;
68
- readonly supportsParallelCalls = true;
69
- private readonly config;
70
- static [WORKFLOW_SERIALIZE](model: GoogleVertexEmbeddingModel): {
71
- modelId: string;
72
- config: _ai_sdk_provider.JSONObject;
73
- };
74
- static [WORKFLOW_DESERIALIZE](options: {
75
- modelId: string;
76
- config: GoogleVertexConfig;
77
- }): GoogleVertexEmbeddingModel;
78
- get provider(): string;
79
- get maxEmbeddingsPerCall(): number;
80
- constructor(modelId: GoogleVertexEmbeddingModelId, config: GoogleVertexConfig);
81
- doEmbed({ values, headers, abortSignal, providerOptions, }: Parameters<EmbeddingModelV4['doEmbed']>[0]): Promise<Awaited<ReturnType<EmbeddingModelV4['doEmbed']>>>;
71
+ readonly specificationVersion = "v4";
72
+ readonly modelId: GoogleVertexEmbeddingModelId;
73
+ readonly supportsParallelCalls = true;
74
+ private readonly config;
75
+ static [WORKFLOW_SERIALIZE](model: GoogleVertexEmbeddingModel): {
76
+ modelId: string;
77
+ config: import("@ai-sdk/provider").JSONObject;
78
+ };
79
+ static [WORKFLOW_DESERIALIZE](options: {
80
+ modelId: string;
81
+ config: GoogleVertexConfig;
82
+ }): GoogleVertexEmbeddingModel;
83
+ get provider(): string;
84
+ get maxEmbeddingsPerCall(): number;
85
+ constructor(modelId: GoogleVertexEmbeddingModelId, config: GoogleVertexConfig);
86
+ doEmbed({ values, headers, abortSignal, providerOptions }: Parameters<EmbeddingModelV4['doEmbed']>[0]): Promise<Awaited<ReturnType<EmbeddingModelV4['doEmbed']>>>;
82
87
  }
83
-
88
+ //#endregion
89
+ //#region src/google-vertex-image-settings.d.ts
84
90
  type GoogleVertexImageModelId = 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | 'gemini-3.1-flash-image-preview' | (string & {});
85
-
91
+ //#endregion
92
+ //#region src/google-vertex-options.d.ts
86
93
  type GoogleVertexModelId = 'gemini-3.8-flash' | 'gemini-3.7-flash' | 'gemini-3.6-flash' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-1.5-flash' | 'gemini-1.5-flash-001' | 'gemini-1.5-flash-002' | 'gemini-1.5-pro' | 'gemini-1.5-pro-001' | 'gemini-1.5-pro-002' | 'gemini-1.0-pro-001' | 'gemini-1.0-pro-vision-001' | 'gemini-1.0-pro' | 'gemini-1.0-pro-002' | 'gemini-2.0-flash-lite-preview-02-05' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-3-pro-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-flash-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash-exp' | (string & {});
87
-
94
+ //#endregion
95
+ //#region src/google-vertex-tools.d.ts
88
96
  declare const googleVertexTools: {
89
- googleSearch: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {
90
- [x: string]: unknown;
91
- searchTypes?: {
92
- webSearch?: Record<string, never> | undefined;
93
- imageSearch?: Record<string, never> | undefined;
94
- } | undefined;
95
- timeRangeFilter?: {
96
- startTime: string;
97
- endTime: string;
98
- } | undefined;
99
- }, {}>;
100
- enterpriseWebSearch: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {}, {}>;
101
- googleMaps: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {}, {}>;
102
- urlContext: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {}, {}>;
103
- fileSearch: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {
104
- [x: string]: unknown;
105
- fileSearchStoreNames: string[];
106
- topK?: number | undefined;
107
- metadataFilter?: string | undefined;
108
- }, {}>;
109
- codeExecution: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{
110
- language: string;
111
- code: string;
112
- }, {
113
- outcome: string;
114
- output: string;
115
- }, {}, {}>;
116
- vertexRagStore: _ai_sdk_provider_utils.ProviderExecutedToolFactory<{}, {}, {
117
- ragCorpus: string;
118
- topK?: number;
119
- }, {}>;
97
+ googleSearch: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {}, {
98
+ [x: string]: unknown;
99
+ searchTypes?: {
100
+ webSearch?: Record<string, never> | undefined;
101
+ imageSearch?: Record<string, never> | undefined;
102
+ } | undefined;
103
+ timeRangeFilter?: {
104
+ startTime: string;
105
+ endTime: string;
106
+ } | undefined;
107
+ }, {}>;
108
+ enterpriseWebSearch: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {}, {}, {}>;
109
+ googleMaps: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {}, {}, {}>;
110
+ urlContext: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {}, {}, {}>;
111
+ fileSearch: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {}, {
112
+ [x: string]: unknown;
113
+ fileSearchStoreNames: string[];
114
+ topK?: number | undefined;
115
+ metadataFilter?: string | undefined;
116
+ }, {}>;
117
+ codeExecution: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{
118
+ language: string;
119
+ code: string;
120
+ }, {
121
+ outcome: string;
122
+ output: string;
123
+ }, {}, {}>;
124
+ vertexRagStore: import("@ai-sdk/provider-utils").ProviderExecutedToolFactory<{}, {}, {
125
+ ragCorpus: string;
126
+ topK?: number;
127
+ }, {}>;
120
128
  };
121
-
129
+ //#endregion
130
+ //#region src/google-vertex-provider-base.d.ts
122
131
  interface GoogleVertexProvider extends ProviderV4 {
123
- /**
124
- * Creates a model for text generation.
125
- */
126
- (modelId: GoogleVertexModelId): LanguageModelV4;
127
- languageModel: (modelId: GoogleVertexModelId) => LanguageModelV4;
128
- /**
129
- * Creates a language model targeting the Gemini Interactions API
130
- * (`.../locations/{region}/interactions`) on Vertex, reusing the Vertex
131
- * OAuth credentials. Pass a model id (e.g. `gemini-omni-flash-preview`) or an
132
- * `{ agent }` / `{ managedAgent }` reference.
133
- */
134
- interactions(modelIdOrAgent: GoogleInteractionsModelId | {
135
- agent: GoogleInteractionsAgentName;
136
- } | {
137
- managedAgent: string;
138
- }): LanguageModelV4;
139
- /**
140
- * Creates a model for image generation.
141
- */
142
- image(modelId: GoogleVertexImageModelId): ImageModelV4;
143
- /**
144
- * Creates a model for image generation.
145
- */
146
- imageModel(modelId: GoogleVertexImageModelId): ImageModelV4;
147
- tools: typeof googleVertexTools;
148
- /**
149
- * @deprecated Use `embeddingModel` instead.
150
- */
151
- textEmbeddingModel(modelId: GoogleVertexEmbeddingModelId): GoogleVertexEmbeddingModel;
152
- /**
153
- * Creates a model for video generation.
154
- */
155
- video(modelId: GoogleVertexVideoModelId): Experimental_VideoModelV4;
156
- /**
157
- * Creates a model for video generation.
158
- */
159
- videoModel(modelId: GoogleVertexVideoModelId): Experimental_VideoModelV4;
160
- /**
161
- * Creates a model for speech generation (text-to-speech).
162
- */
163
- speech(modelId: GoogleVertexSpeechModelId): SpeechModelV4;
164
- /**
165
- * Creates a model for speech generation (text-to-speech).
166
- */
167
- speechModel(modelId: GoogleVertexSpeechModelId): SpeechModelV4;
168
- /**
169
- * Creates a model for transcription (speech-to-text).
170
- */
171
- transcription(modelId: GoogleVertexTranscriptionModelId): TranscriptionModelV4;
172
- /**
173
- * Creates a model for transcription (speech-to-text).
174
- */
175
- transcriptionModel(modelId: GoogleVertexTranscriptionModelId): TranscriptionModelV4;
132
+ /**
133
+ * Creates a model for text generation.
134
+ */
135
+ (modelId: GoogleVertexModelId): LanguageModelV4;
136
+ languageModel: (modelId: GoogleVertexModelId) => LanguageModelV4;
137
+ /**
138
+ * Creates a language model targeting the Gemini Interactions API
139
+ * (`.../locations/{region}/interactions`) on Vertex, reusing the Vertex
140
+ * OAuth credentials. Pass a model id (e.g. `gemini-omni-flash-preview`) or an
141
+ * `{ agent }` / `{ managedAgent }` reference.
142
+ */
143
+ interactions(modelIdOrAgent: GoogleInteractionsModelId | {
144
+ agent: GoogleInteractionsAgentName;
145
+ } | {
146
+ managedAgent: string;
147
+ }): LanguageModelV4;
148
+ /**
149
+ * Creates a model for image generation.
150
+ */
151
+ image(modelId: GoogleVertexImageModelId): ImageModelV4;
152
+ /**
153
+ * Creates a model for image generation.
154
+ */
155
+ imageModel(modelId: GoogleVertexImageModelId): ImageModelV4;
156
+ tools: typeof googleVertexTools;
157
+ /**
158
+ * @deprecated Use `embeddingModel` instead.
159
+ */
160
+ textEmbeddingModel(modelId: GoogleVertexEmbeddingModelId): GoogleVertexEmbeddingModel;
161
+ /**
162
+ * Creates a model for video generation.
163
+ */
164
+ video(modelId: GoogleVertexVideoModelId): Experimental_VideoModelV4;
165
+ /**
166
+ * Creates a model for video generation.
167
+ */
168
+ videoModel(modelId: GoogleVertexVideoModelId): Experimental_VideoModelV4;
169
+ /**
170
+ * Creates a model for speech generation (text-to-speech).
171
+ */
172
+ speech(modelId: GoogleVertexSpeechModelId): SpeechModelV4;
173
+ /**
174
+ * Creates a model for speech generation (text-to-speech).
175
+ */
176
+ speechModel(modelId: GoogleVertexSpeechModelId): SpeechModelV4;
177
+ /**
178
+ * Creates a model for transcription (speech-to-text).
179
+ */
180
+ transcription(modelId: GoogleVertexTranscriptionModelId): TranscriptionModelV4;
181
+ /**
182
+ * Creates a model for transcription (speech-to-text).
183
+ */
184
+ transcriptionModel(modelId: GoogleVertexTranscriptionModelId): TranscriptionModelV4;
176
185
  }
177
186
  interface GoogleVertexProviderSettings$1 {
187
+ /**
188
+ * Optional. The API key for the Google Cloud project. If provided, the
189
+ * provider will use express mode with API key authentication. Defaults to
190
+ * the value of the `GOOGLE_VERTEX_API_KEY` environment variable.
191
+ */
192
+ apiKey?: string;
193
+ /**
194
+ * Your Google Vertex location. Defaults to the environment variable `GOOGLE_VERTEX_LOCATION`.
195
+ */
196
+ location?: string;
197
+ /**
198
+ * Your Google Vertex project. Defaults to the environment variable `GOOGLE_VERTEX_PROJECT`.
199
+ */
200
+ project?: string;
201
+ /**
202
+ * Headers to use for requests. Can be:
203
+ * - A headers object
204
+ * - A Promise that resolves to a headers object
205
+ * - A function that returns a headers object
206
+ * - A function that returns a Promise of a headers object
207
+ */
208
+ headers?: Resolvable<Record<string, string | undefined>>;
209
+ /**
210
+ * Custom fetch implementation. You can use it as a middleware to intercept requests,
211
+ * or to provide a custom fetch implementation for e.g. testing.
212
+ */
213
+ fetch?: FetchFunction;
214
+ generateId?: () => string;
215
+ /**
216
+ * Base URL for the Google Vertex API calls.
217
+ */
218
+ baseURL?: string;
219
+ /**
220
+ * Custom WebSocket implementation for streaming transcription. Useful for
221
+ * runtimes that need a WebSocket constructor with header support (e.g. the
222
+ * `ws` package in Node.js, which Vertex's OAuth Bearer header requires).
223
+ */
224
+ webSocket?: WebSocketConstructor;
225
+ /**
226
+ * Settings for downloading remote files in tool results before sending them
227
+ * to Vertex as inline data.
228
+ */
229
+ toolResultDownloads?: {
178
230
  /**
179
- * Optional. The API key for the Google Cloud project. If provided, the
180
- * provider will use express mode with API key authentication. Defaults to
181
- * the value of the `GOOGLE_VERTEX_API_KEY` environment variable.
182
- */
183
- apiKey?: string;
184
- /**
185
- * Your Google Vertex location. Defaults to the environment variable `GOOGLE_VERTEX_LOCATION`.
231
+ * Maximum size in bytes for each downloaded file. Defaults to 7 MiB.
186
232
  */
187
- location?: string;
188
- /**
189
- * Your Google Vertex project. Defaults to the environment variable `GOOGLE_VERTEX_PROJECT`.
190
- */
191
- project?: string;
192
- /**
193
- * Headers to use for requests. Can be:
194
- * - A headers object
195
- * - A Promise that resolves to a headers object
196
- * - A function that returns a headers object
197
- * - A function that returns a Promise of a headers object
198
- */
199
- headers?: Resolvable<Record<string, string | undefined>>;
200
- /**
201
- * Custom fetch implementation. You can use it as a middleware to intercept requests,
202
- * or to provide a custom fetch implementation for e.g. testing.
203
- */
204
- fetch?: FetchFunction;
205
- generateId?: () => string;
206
- /**
207
- * Base URL for the Google Vertex API calls.
208
- */
209
- baseURL?: string;
210
- /**
211
- * Custom WebSocket implementation for streaming transcription. Useful for
212
- * runtimes that need a WebSocket constructor with header support (e.g. the
213
- * `ws` package in Node.js, which Vertex's OAuth Bearer header requires).
214
- */
215
- webSocket?: WebSocketConstructor;
216
- /**
217
- * Settings for downloading remote files in tool results before sending them
218
- * to Vertex as inline data.
219
- */
220
- toolResultDownloads?: {
221
- /**
222
- * Maximum size in bytes for each downloaded file. Defaults to 7 MiB.
223
- */
224
- maxBytes?: number;
225
- };
233
+ maxBytes?: number;
234
+ };
226
235
  }
227
-
236
+ //#endregion
237
+ //#region src/google-vertex-provider.d.ts
228
238
  interface GoogleVertexProviderSettings extends GoogleVertexProviderSettings$1 {
229
- /**
230
- * Optional. The Authentication options provided by google-auth-library.
231
- * Complete list of authentication options is documented in the
232
- * GoogleAuthOptions interface:
233
- * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts.
234
- */
235
- googleAuthOptions?: GoogleAuthOptions;
239
+ /**
240
+ * Optional. The Authentication options provided by google-auth-library.
241
+ * Complete list of authentication options is documented in the
242
+ * GoogleAuthOptions interface:
243
+ * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts.
244
+ */
245
+ googleAuthOptions?: GoogleAuthOptions;
236
246
  }
237
-
238
- declare function createGoogleVertex(options?: GoogleVertexProviderSettings): GoogleVertexProvider;
247
+ export declare function createGoogleVertex(options?: GoogleVertexProviderSettings): GoogleVertexProvider;
239
248
  /**
240
249
  * Default Google Vertex AI provider instance.
241
250
  */
242
- declare const googleVertex: GoogleVertexProvider;
243
-
251
+ export declare const googleVertex: GoogleVertexProvider;
252
+ //#endregion
253
+ //#region src/gemini-transcription/google-vertex-gemini-transcription-model-options.d.ts
244
254
  type GoogleVertexGeminiTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-3.5-transcribe-live' | (string & {});
245
255
  /**
246
256
  * Speech recognition options for Gemini transcription models on Vertex,
@@ -249,30 +259,31 @@ type GoogleVertexGeminiTranscriptionModelId = 'gemini-3.5-transcribe' | 'gemini-
249
259
  * `AudioTranscriptionConfig`.
250
260
  */
251
261
  declare const googleVertexGeminiTranscriptionModelOptions: z.ZodObject<{
252
- languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
253
- customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
254
- wordTimestamp: z.ZodOptional<z.ZodBoolean>;
255
- diarization: z.ZodOptional<z.ZodBoolean>;
256
- mode: z.ZodOptional<z.ZodEnum<{
257
- SMART: "SMART";
258
- VERBATIM: "VERBATIM";
259
- }>>;
262
+ languageCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
263
+ customVocabulary: z.ZodOptional<z.ZodArray<z.ZodString>>;
264
+ wordTimestamp: z.ZodOptional<z.ZodBoolean>;
265
+ diarization: z.ZodOptional<z.ZodBoolean>;
266
+ mode: z.ZodOptional<z.ZodEnum<{
267
+ SMART: "SMART";
268
+ VERBATIM: "VERBATIM";
269
+ }>>;
260
270
  }, z.core.$strip>;
261
271
  type GoogleVertexTranscriptionModelGeminiOptions = z.infer<typeof googleVertexGeminiTranscriptionModelOptions>;
262
-
272
+ //#endregion
273
+ //#region src/gemini-transcription/google-vertex-gemini-transcription-model.d.ts
263
274
  interface GoogleVertexGeminiTranscriptionModelConfig {
264
- provider: string;
265
- /** Regional base URL ending in `/publishers/google`. */
266
- baseURL: string;
267
- headers?: Resolvable<Record<string, string | undefined>>;
268
- fetch?: FetchFunction;
269
- webSocket?: WebSocketConstructor;
270
- project: string;
271
- location: string;
272
- _internal?: {
273
- currentDate?: () => Date;
274
- finishGraceMs?: number;
275
- };
275
+ provider: string;
276
+ /** Regional base URL ending in `/publishers/google`. */
277
+ baseURL: string;
278
+ headers?: Resolvable<Record<string, string | undefined>>;
279
+ fetch?: FetchFunction;
280
+ webSocket?: WebSocketConstructor;
281
+ project: string;
282
+ location: string;
283
+ _internal?: {
284
+ currentDate?: () => Date;
285
+ finishGraceMs?: number;
286
+ };
276
287
  }
277
288
  /**
278
289
  * Gemini transcription on Vertex AI. Unary variants transcribe via
@@ -280,25 +291,27 @@ interface GoogleVertexGeminiTranscriptionModelConfig {
280
291
  * (`LlmBidiService/BidiGenerateContent`) with OAuth Bearer authentication
281
292
  * from the provider's resolved headers.
282
293
  */
283
- declare class GoogleVertexGeminiTranscriptionModel implements TranscriptionModelV4 {
284
- readonly modelId: GoogleVertexGeminiTranscriptionModelId;
285
- private readonly config;
286
- readonly specificationVersion = "v4";
287
- static [WORKFLOW_SERIALIZE](model: GoogleVertexGeminiTranscriptionModel): {
288
- modelId: string;
289
- config: JSONObject;
290
- };
291
- static [WORKFLOW_DESERIALIZE](options: {
292
- modelId: GoogleVertexGeminiTranscriptionModelId;
293
- config: GoogleVertexGeminiTranscriptionModelConfig;
294
- }): GoogleVertexGeminiTranscriptionModel;
295
- get provider(): string;
296
- constructor(modelId: GoogleVertexGeminiTranscriptionModelId, config: GoogleVertexGeminiTranscriptionModelConfig);
297
- private parseOptions;
298
- doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
299
- doStream(options: Experimental_TranscriptionModelV4StreamOptions): Promise<Awaited<ReturnType<NonNullable<TranscriptionModelV4['doStream']>>>>;
294
+ export declare class GoogleVertexGeminiTranscriptionModel implements TranscriptionModelV4 {
295
+ readonly modelId: GoogleVertexGeminiTranscriptionModelId;
296
+ private readonly config;
297
+ readonly specificationVersion = "v4";
298
+ static [WORKFLOW_SERIALIZE](model: GoogleVertexGeminiTranscriptionModel): {
299
+ modelId: string;
300
+ config: JSONObject;
301
+ };
302
+ static [WORKFLOW_DESERIALIZE](options: {
303
+ modelId: GoogleVertexGeminiTranscriptionModelId;
304
+ config: GoogleVertexGeminiTranscriptionModelConfig;
305
+ }): GoogleVertexGeminiTranscriptionModel;
306
+ get provider(): string;
307
+ constructor(modelId: GoogleVertexGeminiTranscriptionModelId, config: GoogleVertexGeminiTranscriptionModelConfig);
308
+ private parseOptions;
309
+ doGenerate(options: Parameters<TranscriptionModelV4['doGenerate']>[0]): Promise<Awaited<ReturnType<TranscriptionModelV4['doGenerate']>>>;
310
+ doStream(options: Experimental_TranscriptionModelV4StreamOptions): Promise<Awaited<ReturnType<NonNullable<TranscriptionModelV4['doStream']>>>>;
300
311
  }
301
-
302
- declare const VERSION: string;
303
-
304
- export { type GoogleVertexEmbeddingModelOptions, GoogleVertexGeminiTranscriptionModel, type GoogleVertexGeminiTranscriptionModelId, type GoogleVertexImageModelOptions, type GoogleVertexImageModelOptions as GoogleVertexImageProviderOptions, type GoogleVertexProvider, type GoogleVertexProviderSettings, type GoogleVertexSpeechModelId, type GoogleVertexSpeechModelOptions, type GoogleVertexTranscriptionModelGeminiOptions, type GoogleVertexTranscriptionModelId, type GoogleVertexTranscriptionModelOptions, type GoogleVertexVideoModelId, type GoogleVertexVideoModelOptions, type GoogleVertexVideoModelOptions as GoogleVertexVideoProviderOptions, VERSION, createGoogleVertex, createGoogleVertex as createVertex, googleVertex, googleVertex as vertex };
312
+ //#endregion
313
+ //#region src/version.d.ts
314
+ export declare const VERSION: string;
315
+ //#endregion
316
+ export { type GoogleVertexEmbeddingModelOptions, type GoogleVertexGeminiTranscriptionModelId, type GoogleVertexImageModelOptions, type GoogleVertexImageModelOptions as GoogleVertexImageProviderOptions, type GoogleVertexProvider, type GoogleVertexProviderSettings, type GoogleVertexSpeechModelId, type GoogleVertexSpeechModelOptions, type GoogleVertexTranscriptionModelGeminiOptions, type GoogleVertexTranscriptionModelId, type GoogleVertexTranscriptionModelOptions, type GoogleVertexVideoModelId, type GoogleVertexVideoModelOptions, type GoogleVertexVideoModelOptions as GoogleVertexVideoProviderOptions, createGoogleVertex as createVertex, googleVertex as vertex };
317
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":["GoogleVertexProviderSettings","GoogleVertexProviderSettingsOriginal","TranscriptionModelV4StreamOptions"],"sources":["../src/google-vertex-embedding-model-options.ts","../src/google-vertex-transcription-model-options.ts","../src/google-vertex-image-model-options.ts","../src/google-vertex-video-model-options.ts","../src/google-vertex-video-settings.ts","../src/google-vertex-speech-model-options.ts","../src/google-vertex-config.ts","../src/google-vertex-embedding-model.ts","../src/google-vertex-image-settings.ts","../src/google-vertex-options.ts","../src/google-vertex-tools.ts","../src/google-vertex-provider-base.ts","../src/google-vertex-provider.ts","../src/gemini-transcription/google-vertex-gemini-transcription-model-options.ts","../src/gemini-transcription/google-vertex-gemini-transcription-model.ts","../src/version.ts"],"mappings":";;;;;;;KAGY;cAcC,mCAAiC,EAAA;;;;;;;;;;;;;;GA4C5C,EAAA,KAAA;KAEU,oCAAoC,EAAE,aACzC;;;KC5DG;cAMC,gDAA8C,EAAA;;;;;GAgCzD,EAAA,KAAA;KAEU,wCAAwC,EAAE,aAC7C;;;KC3CG,gCAAgC,KAC1C;;;KCAU;EAEV;EACA;EAGA;EACA;EACA;EAGA;EAGA,kBAAkB;IAChB;IACA;;GAGD;;;;KCtBS;;;KCMA;KAQA,iCAAiC;;;UCZ5B;EACf;EACA;EACA,UAAU,WAAW;EACrB,QAAQ;;;;cCgBG,sCAAsC;WACxC;WACA,SAAS;WACT;mBAEQ;UAET,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B;IACA,QAAQ;MACT;MAIG;MAMA;EAKF,YAAA,SAAS,8BACT,QAAQ;EAMJ,UACJ,QACA,SACA,aACA,mBACC,WAAW,kCAAkC,QAC9C,QAAQ,WAAW;;;;KCnEX;;;KCGA;;;cCDC;;;;MAS0qlB,YAAC;MAAsD,cAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UCgE9tlB,6BAA6B;;;;GAI3C,SAAS,sBAAsB;EAEhC,gBAAgB,SAAS,wBAAwB;;;;;;;EAQjD,aACE,gBACI;IACE,OAAO;;IACP;MACL;;;;EAKH,MAAM,SAAS,2BAA2B;;;;EAK1C,WAAW,SAAS,2BAA2B;EAE/C,cAAc;;;;EAKd,mBACE,SAAS,+BACR;;;;EAKH,MAAM,SAAS,2BAA2B;;;;EAK1C,WAAW,SAAS,2BAA2B;;;;EAK/C,OAAO,SAAS,4BAA4B;;;;EAK5C,YAAY,SAAS,4BAA4B;;;;EAKjD,cACE,SAAS,mCACR;;;;EAKH,mBACE,SAAS,mCACR;;UAGYA;;;;;;EAMf;;;;EAKA;;;;EAKA;;;;;;;;EASA,UAAU,WAAW;;;;;EAMrB,QAAQ;EAGR;;;;EAKA;;;;;;EAOA,YAAY;;;;;EAMZ;;;;IAIE;;;;;UCtMa,qCAAqCC;;;;;;;EAOpD,oBAAoB;;wBAKN,mBACd,UAAS,+BACR;;;;qBAgCU,cAAY;;;KCpDb;;;;;;;cAWC,6CAA2C,EAAA;;;;;;;;;GAiCtD,EAAA,KAAA;KAEU,8CAA8C,EAAE,aACnD;;;UCuCC;EACR;;EAEA;EACA,UAAU,WAAW;EACrB,QAAQ;EACR,YAAY;EACZ;EACA;EACA;IACE,oBAAoB;IACpB;;;;;;;;;qBAUS,gDAAgD;WAyBhD,SAAS;mBACD;WAzBV;UAED,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B,SAAS;IACT,QAAQ;MACT;MAOG;EAKO,YAAA,SAAS,wCACD,QAAQ;UAGb;EAeR,WACJ,SAAS,WAAW,yCACnB,QAAQ,QAAQ,WAAW;EAwGxB,SACJ,SAASC,iDACR,QACD,QAAQ,WAAW,YAAY;;;;qBCpQtB"}