@ai-sdk/google-vertex 5.0.132 → 5.0.134

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/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # @ai-sdk/google-vertex
2
2
 
3
+ ## 5.0.134
4
+
5
+ ### Patch Changes
6
+
7
+ - a210a29: Pass `providerOptions.google.labels` through to Google and Vertex AI Interactions requests, including streaming, so callers can attach request metadata such as `safety_identifier`.
8
+ - 977231e: only send google cloud credentials from the maas provider to its own api, not to image urls from a response or their redirects
9
+ - 32dc1d2: Omit Google provider-defined tools, including File Search and Vertex RAG Store, when `toolChoice` is `none` so disabled tools cannot retrieve data or execute server-side. Preserve function declarations needed by conversation history while disabling function calling. This also applies when structured output uses a synthetic JSON response tool.
10
+ - Updated dependencies [a161c0a]
11
+ - Updated dependencies [6400cf8]
12
+ - Updated dependencies [ba302a1]
13
+ - Updated dependencies [a210a29]
14
+ - Updated dependencies [f608c05]
15
+ - Updated dependencies [32dc1d2]
16
+ - Updated dependencies [26fc2a9]
17
+ - Updated dependencies [5ab7ff1]
18
+ - Updated dependencies [cab9c1f]
19
+ - Updated dependencies [b3088a7]
20
+ - Updated dependencies [c70adf6]
21
+ - @ai-sdk/anthropic@4.0.99
22
+ - @ai-sdk/provider-utils@5.0.76
23
+ - @ai-sdk/openai-compatible@3.0.87
24
+ - @ai-sdk/google@4.0.114
25
+ - @ai-sdk/provider@4.0.37
26
+
27
+ ## 5.0.133
28
+
29
+ ### Patch Changes
30
+
31
+ - 27a8a77: Refactor Google Vertex model ID logic into a model catalog that declares capabilities and provider options, and generate provider capability documentation from it. Export Google catalog metadata internally for Vertex to reuse. Request behavior is unchanged.
32
+ - Updated dependencies [067dd77]
33
+ - Updated dependencies [25240d9]
34
+ - Updated dependencies [457dc40]
35
+ - Updated dependencies [6b101ac]
36
+ - Updated dependencies [27a8a77]
37
+ - Updated dependencies [b63c06a]
38
+ - Updated dependencies [646a7e3]
39
+ - @ai-sdk/anthropic@4.0.98
40
+ - @ai-sdk/google@4.0.113
41
+ - @ai-sdk/openai-compatible@3.0.86
42
+
3
43
  ## 5.0.132
4
44
 
5
45
  ### Patch Changes
@@ -3,7 +3,7 @@ import { InvalidArgumentError, NoSuchModelError } from "@ai-sdk/provider";
3
3
  import { AnthropicLanguageModel, anthropicTools } from "@ai-sdk/anthropic/internal";
4
4
  import { z } from "zod/v4";
5
5
  //#region src/version.ts
6
- const VERSION = "5.0.132";
6
+ const VERSION = "5.0.134";
7
7
  //#endregion
8
8
  //#region src/edge/google-vertex-auth-edge.ts
9
9
  const loadCredentials = async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["GoogleVertexProviderSettings","GoogleVertexProviderSettingsOriginal"],"sources":["../../src/google-vertex-embedding-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-transcription-model-options.ts","../../src/google-vertex-video-settings.ts","../../src/google-vertex-speech-model-options.ts","../../src/google-vertex-provider-base.ts","../../src/edge/google-vertex-auth-edge.ts","../../src/edge/google-vertex-provider-edge.ts"],"mappings":";;;;;KAQY;;;UCNK;EACf;EACA;EACA,UAAU,WAAW;EACrB,QAAQ;;;;cCkBG,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,YACA,SACA,aACA,mBACC,WAAW,kCAAkC,QAC9C,QAAQ,WAAW;;;;KCtEX;;;KCGA;;;cCDC;;;;MASqpoB,YAAC;MAAsD,cAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCF9soB;;;KCTA;;;KCMA;;;UCgFK,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;;;;;;;EAOf,SAAS;;;;EAKT;;;;EAKA;;;;;;;;EASA,UAAU,WAAW;;;;;EAMrB,QAAQ;EAGR;;;;EAKA;;;;;;EAOA,YAAY;;;;;EAMZ;;;;IAIE;;;;;UClNa;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;UCbe,qCAAqCC;;;;;;EAMpD,oBAAoB;;wBAGN,mBACd,UAAS,+BACR;;;;qBA2BU,cAAY"}
1
+ {"version":3,"file":"index.d.ts","names":["GoogleVertexProviderSettings","GoogleVertexProviderSettingsOriginal"],"sources":["../../src/google-vertex-embedding-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-transcription-model-options.ts","../../src/google-vertex-video-settings.ts","../../src/google-vertex-speech-model-options.ts","../../src/google-vertex-provider-base.ts","../../src/edge/google-vertex-auth-edge.ts","../../src/edge/google-vertex-provider-edge.ts"],"mappings":";;;;;KAQY;;;UCNK;EACf;EACA;EACA,UAAU,WAAW;EACrB,QAAQ;;;;cCmBG,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,YACA,SACA,aACA,mBACC,WAAW,kCAAkC,QAC9C,QAAQ,WAAW;;;;KCvEX;;;KCGA;;;cCDC;;;;MAS87sB,YAAC;MAAsD,cAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCFv/sB;;;KCTA;;;KCMA;;;UC+EK,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;;;;;;;EAOf,SAAS;;;;EAKT;;;;EAKA;;;;;;;;EASA,UAAU,WAAW;;;;;EAMrB,QAAQ;EAGR;;;;EAKA;;;;;;EAOA,YAAY;;;;;EAMZ;;;;IAIE;;;;;UCjNa;;;;;EAKf;;;;;EAMA;;;;;EAMA;;;;UCbe,qCAAqCC;;;;;;EAMpD,oBAAoB;;wBAGN,mBACd,UAAS,+BACR;;;;qBA2BU,cAAY"}
@@ -1,9 +1,33 @@
1
1
  import { WORKFLOW_DESERIALIZE, WORKFLOW_SERIALIZE, combineHeaders, connectToWebSocket, convertBase64ToUint8Array, convertToBase64, convertUint8ArrayToBase64, createJsonErrorResponseHandler, createJsonResponseHandler, generateId, getRuntimeEnvironmentUserAgent, isValidHostnamePart, lazySchema, loadOptionalSetting, loadSetting, normalizeHeaders, parseProviderOptions, postJsonToApi, resolve, safeParseJSON, serializeModelOptions, waitForWebSocketBufferDrain, withUserAgentSuffix, withoutTrailingSlash, zodSchema } from "@ai-sdk/provider-utils";
2
- import { GoogleInteractionsLanguageModel, GoogleLanguageModel, GoogleSpeechModel, googleTools } from "@ai-sdk/google/internal";
2
+ import { GoogleInteractionsLanguageModel, GoogleLanguageModel, GoogleSpeechModel, getGoogleLanguageModelEntry, googleProviderOptions, googleTools } from "@ai-sdk/google/internal";
3
3
  import { AISDKError, InvalidArgumentError, LoadAPIKeyError, TooManyEmbeddingValuesForCallError } from "@ai-sdk/provider";
4
4
  import { z } from "zod/v4";
5
+ //#region src/google-vertex-model-catalog-config.ts
6
+ function requestConfig(modelId) {
7
+ const embedContent = modelId === "gemini-embedding-2" || modelId === "gemini-embedding-2-preview";
8
+ return {
9
+ language: {
10
+ endpoint: modelId.startsWith("endpoints/"),
11
+ maxOutputTokens: modelId === "meta/llama-4-maverick-17b-128e-instruct-maas" || modelId === "meta/llama-4-scout-17b-16e-instruct-maas" ? 8192 : void 0
12
+ },
13
+ image: { gemini: modelId.startsWith("gemini-") },
14
+ embedding: {
15
+ endpoint: embedContent ? "embedContent" : "predict",
16
+ maxEmbeddingsPerCall: embedContent ? 1 : 250
17
+ },
18
+ speech: { api: modelId.startsWith("chirp") ? "cloud-tts" : "gemini" },
19
+ transcription: {
20
+ api: modelId.startsWith("gemini") ? "gemini" : "cloud-speech",
21
+ live: modelId.includes("-live")
22
+ }
23
+ };
24
+ }
25
+ function getGoogleVertexRequestConfig(modelId) {
26
+ return requestConfig(modelId);
27
+ }
28
+ //#endregion
5
29
  //#region src/version.ts
6
- const VERSION = "5.0.132";
30
+ const VERSION = "5.0.134";
7
31
  //#endregion
8
32
  //#region src/google-vertex-error.ts
9
33
  const googleVertexErrorDataSchema = lazySchema(() => zodSchema(z.object({ error: z.object({
@@ -173,16 +197,482 @@ const googleVertexEmbedContentResponseSchema = lazySchema(() => zodSchema(z.obje
173
197
  usageMetadata: z.object({ promptTokenCount: z.number().nullish() }).nullish()
174
198
  })));
175
199
  function usesEmbedContentEndpoint(modelId) {
176
- return modelId === "gemini-embedding-2" || modelId === "gemini-embedding-2-preview";
200
+ return getGoogleVertexRequestConfig(modelId).embedding?.endpoint === "embedContent";
177
201
  }
178
202
  //#endregion
179
- //#region src/google-vertex-image-model.ts
180
- const googleVertexImageModelsWithFileInputSupport = /* @__PURE__ */ new Set([
203
+ //#region src/google-vertex-model-catalog.ts
204
+ const documentedImageDetails = {
205
+ "gemini-nano-banana-2.1": {
206
+ imageGeneration: true,
207
+ aspectRatios: [
208
+ "1:1",
209
+ "2:3",
210
+ "3:2",
211
+ "3:4",
212
+ "4:3",
213
+ "4:5",
214
+ "5:4",
215
+ "9:16",
216
+ "16:9",
217
+ "21:9",
218
+ "1:8",
219
+ "8:1",
220
+ "1:4",
221
+ "4:1"
222
+ ]
223
+ },
224
+ "gemini-3.1-flash-image-preview": {
225
+ imageGeneration: true,
226
+ aspectRatios: [
227
+ "1:1",
228
+ "2:3",
229
+ "3:2",
230
+ "3:4",
231
+ "4:3",
232
+ "4:5",
233
+ "5:4",
234
+ "9:16",
235
+ "16:9",
236
+ "21:9"
237
+ ]
238
+ },
239
+ "gemini-3-pro-image-preview": {
240
+ imageGeneration: true,
241
+ aspectRatios: [
242
+ "1:1",
243
+ "2:3",
244
+ "3:2",
245
+ "3:4",
246
+ "4:3",
247
+ "4:5",
248
+ "5:4",
249
+ "9:16",
250
+ "16:9",
251
+ "21:9"
252
+ ]
253
+ },
254
+ "gemini-2.5-flash-image": {
255
+ imageGeneration: true,
256
+ aspectRatios: [
257
+ "1:1",
258
+ "2:3",
259
+ "3:2",
260
+ "3:4",
261
+ "4:3",
262
+ "4:5",
263
+ "5:4",
264
+ "9:16",
265
+ "16:9",
266
+ "21:9"
267
+ ]
268
+ }
269
+ };
270
+ const documentedTranscriptionDetails = {
271
+ chirp_2: {
272
+ wordTimestampDescription: "Available with a potential quality and speed tradeoff",
273
+ languageDetectionDescription: "Auto detection with `['auto']`"
274
+ },
275
+ chirp_3: {
276
+ wordTimestampDescription: "Available with a potential transcription quality tradeoff",
277
+ languageDetectionDescription: "Auto detection with `['auto']`"
278
+ },
279
+ telephony: {
280
+ wordTimestampDescription: "Available",
281
+ languageDetectionDescription: "Explicit supported language codes, with alternative language detection support"
282
+ }
283
+ };
284
+ const googleVertexProviderOptions = {
285
+ language: googleProviderOptions.language,
286
+ image: Object.fromEntries(Object.entries(googleProviderOptions.language).filter(([key]) => key !== "responseModalities")),
287
+ embedding: {
288
+ outputDimensionality: { description: "Reduced output dimensions." },
289
+ taskType: { description: "Task for which embeddings are optimized." },
290
+ title: { description: "Document title; requires RETRIEVAL_DOCUMENT." },
291
+ autoTruncate: { description: "Truncate inputs exceeding the model context." }
292
+ },
293
+ speech: {
294
+ speechMetadata: { description: "Directions for Gemini 3.8 speech." },
295
+ turns: { description: "Structured transcript for Gemini 3.8 speech." },
296
+ multiSpeakerVoiceConfig: { description: "Voice configuration for dialogue speakers." }
297
+ },
298
+ transcription: {
299
+ languageCodes: { description: "Language hints or automatic language detection." },
300
+ enableAutomaticPunctuation: { description: "Include punctuation in Cloud Speech transcripts." },
301
+ enableWordTimeOffsets: { description: "Include Cloud Speech word timestamps." },
302
+ region: { description: "Cloud Speech region." },
303
+ customVocabulary: { description: "Vocabulary hints for Gemini transcription." },
304
+ wordTimestamp: { description: "Include Gemini word timestamps." },
305
+ diarization: { description: "Enable Gemini speaker diarization." },
306
+ mode: { description: "Verbatim or smart Gemini transcription formatting." }
307
+ },
308
+ video: {
309
+ pollIntervalMs: { description: "Polling interval." },
310
+ pollTimeoutMs: { description: "Polling timeout." },
311
+ personGeneration: { description: "Policy for generating people." },
312
+ negativePrompt: { description: "Content to avoid." },
313
+ generateAudio: { description: "Generate synchronized audio." },
314
+ gcsOutputDirectory: { description: "Cloud Storage output directory." },
315
+ referenceImages: { description: "Reference images for video generation." }
316
+ }
317
+ };
318
+ function languageEntry(modelId) {
319
+ const entry = getGoogleLanguageModelEntry(modelId);
320
+ return {
321
+ capabilities: { language: entry.capabilities.language },
322
+ providerOptions: { language: {
323
+ ...entry.providerOptions.language,
324
+ serviceTier: false
325
+ } },
326
+ requestConfig: { language: getGoogleVertexRequestConfig(modelId).language }
327
+ };
328
+ }
329
+ const imageModels = [
181
330
  "gemini-2.5-flash-image",
182
331
  "gemini-3-pro-image-preview",
183
332
  "gemini-3.1-flash-image-preview",
184
333
  "gemini-nano-banana-2.1"
185
- ]);
334
+ ];
335
+ function getGoogleVertexImageModelEntry(modelId) {
336
+ const known = imageModels.includes(modelId);
337
+ return {
338
+ capabilities: { image: {
339
+ sizes: { description: "Use aspectRatio; the size option is unsupported." },
340
+ fileInput: known ? true : "unknown",
341
+ maskInput: known ? false : "unknown",
342
+ maxImagesPerCall: 1,
343
+ ...documentedImageDetails[modelId]
344
+ } },
345
+ providerOptions: { image: Object.fromEntries(Object.keys(googleVertexProviderOptions.image).map((key) => [key, key === "serviceTier" ? false : { condition: "Support follows the Gemini language model and image configuration." }])) },
346
+ requestConfig: { image: getGoogleVertexRequestConfig(modelId).image }
347
+ };
348
+ }
349
+ function embeddingEntry(modelId) {
350
+ return {
351
+ capabilities: { embedding: {
352
+ defaultDimensions: modelId.startsWith("gemini-embedding-") ? 3072 : 768,
353
+ customDimensions: "unknown",
354
+ maxEmbeddingsPerCall: getGoogleVertexRequestConfig(modelId).embedding.maxEmbeddingsPerCall,
355
+ supportsParallelCalls: true,
356
+ multimodal: getGoogleVertexRequestConfig(modelId).embedding.endpoint === "embedContent"
357
+ } },
358
+ providerOptions: { embedding: {
359
+ outputDimensionality: "unknown",
360
+ taskType: "unknown",
361
+ title: { condition: "Requires RETRIEVAL_DOCUMENT." },
362
+ autoTruncate: true
363
+ } },
364
+ requestConfig: { embedding: getGoogleVertexRequestConfig(modelId).embedding }
365
+ };
366
+ }
367
+ function speechEntry(modelId) {
368
+ const chirp = getGoogleVertexRequestConfig(modelId).speech?.api === "cloud-tts";
369
+ return {
370
+ capabilities: { speech: {
371
+ instructions: !chirp,
372
+ multiSpeaker: !chirp
373
+ } },
374
+ providerOptions: { speech: {
375
+ multiSpeakerVoiceConfig: chirp ? false : true,
376
+ speechMetadata: chirp ? false : { condition: "Requires Gemini 3.8 TTS." },
377
+ turns: chirp ? false : { condition: "Requires Gemini 3.8 TTS." }
378
+ } },
379
+ requestConfig: { speech: getGoogleVertexRequestConfig(modelId).speech }
380
+ };
381
+ }
382
+ function transcriptionEntry(modelId) {
383
+ const config = getGoogleVertexRequestConfig(modelId).transcription;
384
+ const gemini = config.api === "gemini";
385
+ return {
386
+ capabilities: { transcription: {
387
+ transcription: !config.live,
388
+ streaming: config.live,
389
+ duration: gemini ? false : true,
390
+ segments: config.live ? false : { condition: "Requires word timestamps." },
391
+ language: true,
392
+ ...documentedTranscriptionDetails[modelId]
393
+ } },
394
+ providerOptions: { transcription: {
395
+ languageCodes: true,
396
+ enableAutomaticPunctuation: !gemini,
397
+ enableWordTimeOffsets: !gemini,
398
+ region: !gemini,
399
+ customVocabulary: gemini,
400
+ wordTimestamp: gemini,
401
+ diarization: gemini,
402
+ mode: gemini
403
+ } },
404
+ requestConfig: { transcription: config }
405
+ };
406
+ }
407
+ function videoEntry(modelId) {
408
+ const veo3 = modelId.startsWith("veo-3");
409
+ return {
410
+ capabilities: { video: {
411
+ inputs: {
412
+ text: true,
413
+ image: true,
414
+ firstFrame: true,
415
+ lastFrame: { condition: "Requires a Veo model supporting frame interpolation." },
416
+ referenceImage: { condition: "Requires a Veo model supporting reference images." },
417
+ referenceVideo: false
418
+ },
419
+ generateAudio: veo3,
420
+ aspectRatio: true,
421
+ resolution: true,
422
+ duration: true,
423
+ fps: false,
424
+ seed: true,
425
+ maxVideosPerCall: 4
426
+ } },
427
+ providerOptions: { video: {
428
+ pollIntervalMs: true,
429
+ pollTimeoutMs: true,
430
+ personGeneration: true,
431
+ negativePrompt: true,
432
+ generateAudio: veo3,
433
+ gcsOutputDirectory: true,
434
+ referenceImages: { condition: "Requires a Veo model supporting reference images." }
435
+ } }
436
+ };
437
+ }
438
+ [
439
+ ...[
440
+ "gemini-nano-banana-2.1",
441
+ "gemini-4-argon",
442
+ "gemini-3.8-flash",
443
+ "gemini-3.7-flash",
444
+ "gemini-3.6-flash",
445
+ "gemini-3.5-flash",
446
+ "gemini-3.5-flash-lite",
447
+ "gemini-2.5-pro",
448
+ "gemini-2.5-flash",
449
+ "gemini-2.5-flash-lite",
450
+ "gemini-2.0-flash-lite",
451
+ "gemini-2.0-flash",
452
+ "gemini-2.0-flash-001",
453
+ "gemini-1.5-flash",
454
+ "gemini-1.5-flash-001",
455
+ "gemini-1.5-flash-002",
456
+ "gemini-1.5-pro",
457
+ "gemini-1.5-pro-001",
458
+ "gemini-1.5-pro-002",
459
+ "gemini-1.0-pro-001",
460
+ "gemini-1.0-pro-vision-001",
461
+ "gemini-1.0-pro",
462
+ "gemini-1.0-pro-002",
463
+ "gemini-2.0-flash-lite-preview-02-05",
464
+ "gemini-2.5-flash-preview-09-2025",
465
+ "gemini-3-pro-preview",
466
+ "gemini-3-pro-image-preview",
467
+ "gemini-3-flash-preview",
468
+ "gemini-3.1-pro-preview",
469
+ "gemini-3.1-flash-image-preview",
470
+ "gemini-3.1-flash-lite-preview",
471
+ "gemini-2.0-pro-exp-02-05",
472
+ "gemini-2.0-flash-exp"
473
+ ].map((id) => [id, languageEntry(id)]),
474
+ ...[
475
+ "gemini-2.5-flash-image",
476
+ "gemini-3-pro-image-preview",
477
+ "gemini-3.1-flash-image-preview",
478
+ "gemini-nano-banana-2.1"
479
+ ].map((id) => [id, getGoogleVertexImageModelEntry(id)]),
480
+ ...[
481
+ "textembedding-gecko",
482
+ "textembedding-gecko@001",
483
+ "textembedding-gecko@003",
484
+ "textembedding-gecko-multilingual",
485
+ "textembedding-gecko-multilingual@001",
486
+ "text-multilingual-embedding-002",
487
+ "text-embedding-004",
488
+ "text-embedding-005",
489
+ "gemini-embedding-001",
490
+ "gemini-embedding-2",
491
+ "gemini-embedding-2-preview"
492
+ ].map((id) => [id, embeddingEntry(id)]),
493
+ ...[
494
+ "veo-2.0-generate-preview",
495
+ "veo-2.0-generate-exp",
496
+ "veo-2.0-generate-001",
497
+ "veo-3.0-generate-001",
498
+ "veo-3.0-fast-generate-001",
499
+ "veo-3.0-generate-preview",
500
+ "veo-3.0-fast-generate-preview",
501
+ "veo-3.1-generate-001",
502
+ "veo-3.1-fast-generate-001",
503
+ "veo-3.1-generate-preview",
504
+ "veo-3.1-fast-generate-preview"
505
+ ].map((id) => [id, videoEntry(id)]),
506
+ ...[
507
+ "gemini-2.5-flash-tts",
508
+ "gemini-2.5-pro-tts",
509
+ "gemini-2.5-flash-lite-preview-tts",
510
+ "gemini-3.1-flash-tts-preview",
511
+ "chirp-3-hd"
512
+ ].map((id) => [id, speechEntry(id)]),
513
+ ...[
514
+ "chirp_2",
515
+ "chirp_3",
516
+ "telephony"
517
+ ].map((id) => [id, transcriptionEntry(id)]),
518
+ ...["gemini-3.5-transcribe", "gemini-3.5-transcribe-live"].map((id) => [id, transcriptionEntry(id)])
519
+ ].reduce((catalog, [id, entry]) => {
520
+ const previous = catalog[id];
521
+ catalog[id] = {
522
+ capabilities: {
523
+ ...previous?.capabilities,
524
+ ...entry.capabilities
525
+ },
526
+ providerOptions: {
527
+ ...previous?.providerOptions,
528
+ ...entry.providerOptions
529
+ },
530
+ requestConfig: {
531
+ ...previous?.requestConfig,
532
+ ...entry.requestConfig
533
+ }
534
+ };
535
+ return catalog;
536
+ }, {});
537
+ Object.fromEntries(Object.entries({
538
+ "claude-fable-5-1": {
539
+ image: true,
540
+ objectGeneration: true,
541
+ tools: true,
542
+ streaming: true,
543
+ computerUse: true
544
+ },
545
+ "claude-3-7-sonnet@20250219": {
546
+ image: true,
547
+ objectGeneration: true,
548
+ tools: true,
549
+ streaming: true,
550
+ computerUse: true
551
+ },
552
+ "claude-3-5-sonnet-v2@20241022": {
553
+ image: true,
554
+ objectGeneration: true,
555
+ tools: true,
556
+ streaming: true,
557
+ computerUse: true
558
+ },
559
+ "claude-3-5-sonnet@20240620": {
560
+ image: true,
561
+ objectGeneration: true,
562
+ tools: true,
563
+ streaming: true,
564
+ computerUse: false
565
+ },
566
+ "claude-3-5-haiku@20241022": {
567
+ image: false,
568
+ objectGeneration: true,
569
+ tools: true,
570
+ streaming: true,
571
+ computerUse: false
572
+ },
573
+ "claude-3-sonnet@20240229": {
574
+ image: true,
575
+ objectGeneration: true,
576
+ tools: true,
577
+ streaming: true,
578
+ computerUse: false
579
+ },
580
+ "claude-3-haiku@20240307": {
581
+ image: true,
582
+ objectGeneration: true,
583
+ tools: true,
584
+ streaming: true,
585
+ computerUse: false
586
+ },
587
+ "claude-3-opus@20240229": {
588
+ image: true,
589
+ objectGeneration: true,
590
+ tools: true,
591
+ streaming: true,
592
+ computerUse: false
593
+ }
594
+ }).map(([id, support]) => {
595
+ return [id, { capabilities: { language: {
596
+ inputs: {
597
+ image: support.image,
598
+ audio: false
599
+ },
600
+ objectGeneration: support.objectGeneration,
601
+ tools: {
602
+ usage: support.tools,
603
+ streaming: support.streaming,
604
+ computerUse: support.computerUse
605
+ },
606
+ reasoning: { support: "unknown" },
607
+ sampling: {
608
+ temperature: "unknown",
609
+ topP: "unknown",
610
+ logprobs: false
611
+ }
612
+ } } }];
613
+ }));
614
+ Object.fromEntries(Object.entries({
615
+ "xai/grok-4.20-reasoning": { reasoning: true },
616
+ "xai/grok-4.20-non-reasoning": { reasoning: false },
617
+ "xai/grok-4.1-fast-reasoning": { reasoning: true },
618
+ "xai/grok-4.1-fast-non-reasoning": { reasoning: false }
619
+ }).map(([id, support]) => {
620
+ return [id, { capabilities: { language: {
621
+ inputs: {
622
+ image: "unknown",
623
+ audio: "unknown"
624
+ },
625
+ objectGeneration: "unknown",
626
+ tools: {
627
+ usage: "unknown",
628
+ streaming: "unknown"
629
+ },
630
+ reasoning: { support: support.reasoning },
631
+ sampling: {
632
+ temperature: "unknown",
633
+ topP: "unknown",
634
+ logprobs: "unknown"
635
+ }
636
+ } } }];
637
+ }));
638
+ Object.fromEntries(Object.entries({
639
+ "deepseek-ai/deepseek-r1-0528-maas": { publisher: "DeepSeek" },
640
+ "deepseek-ai/deepseek-v3.1-maas": { publisher: "DeepSeek" },
641
+ "deepseek-ai/deepseek-v3.2-maas": { publisher: "DeepSeek" },
642
+ "openai/gpt-oss-120b-maas": { publisher: "OpenAI" },
643
+ "openai/gpt-oss-20b-maas": { publisher: "OpenAI" },
644
+ "meta/llama-4-maverick-17b-128e-instruct-maas": { publisher: "Meta" },
645
+ "meta/llama-4-scout-17b-16e-instruct-maas": { publisher: "Meta" },
646
+ "minimax/minimax-m2-maas": { publisher: "MiniMax" },
647
+ "qwen/qwen3-coder-480b-a35b-instruct-maas": { publisher: "Qwen" },
648
+ "qwen/qwen3-next-80b-a3b-instruct-maas": { publisher: "Qwen" },
649
+ "qwen/qwen3-next-80b-a3b-thinking-maas": { publisher: "Qwen" },
650
+ "moonshotai/kimi-k2-thinking-maas": { publisher: "Moonshot" }
651
+ }).map(([id, support]) => {
652
+ return [id, {
653
+ capabilities: { language: {
654
+ inputs: {
655
+ image: "unknown",
656
+ audio: "unknown"
657
+ },
658
+ objectGeneration: "unknown",
659
+ tools: {
660
+ usage: "unknown",
661
+ streaming: "unknown"
662
+ },
663
+ reasoning: { support: "unknown" },
664
+ sampling: {
665
+ temperature: "unknown",
666
+ topP: "unknown",
667
+ logprobs: "unknown"
668
+ },
669
+ publisher: support.publisher
670
+ } },
671
+ requestConfig: getGoogleVertexRequestConfig(id)
672
+ }];
673
+ }));
674
+ //#endregion
675
+ //#region src/google-vertex-image-model.ts
186
676
  var GoogleVertexImageModel = class GoogleVertexImageModel {
187
677
  static [WORKFLOW_SERIALIZE](model) {
188
678
  return serializeModelOptions({
@@ -194,7 +684,7 @@ var GoogleVertexImageModel = class GoogleVertexImageModel {
194
684
  return new GoogleVertexImageModel(options.modelId, options.config);
195
685
  }
196
686
  get supportsFileInputs() {
197
- return googleVertexImageModelsWithFileInputSupport.has(this.modelId) ? true : void 0;
687
+ return getGoogleVertexImageModelEntry(this.modelId).capabilities.image?.fileInput === true ? true : void 0;
198
688
  }
199
689
  get supportsMaskInputs() {
200
690
  return this.supportsFileInputs === true ? false : void 0;
@@ -209,7 +699,7 @@ var GoogleVertexImageModel = class GoogleVertexImageModel {
209
699
  this.maxImagesPerCall = 1;
210
700
  }
211
701
  async doGenerate(options) {
212
- if (!this.modelId.startsWith("gemini-")) throw new Error("Google image models other than Gemini are no longer supported. Use a model ID that starts with `gemini-`.");
702
+ if (!getGoogleVertexRequestConfig(this.modelId).image?.gemini) throw new Error("Google image models other than Gemini are no longer supported. Use a model ID that starts with `gemini-`.");
213
703
  const { prompt, size, aspectRatio, seed, providerOptions, headers, abortSignal, files, mask } = options;
214
704
  const warnings = [];
215
705
  if (mask != null) throw new Error("Gemini image models do not support mask-based image editing.");
@@ -595,7 +1085,7 @@ const liveWebSocketPath = "google.cloud.aiplatform.v1.LlmBidiService/BidiGenerat
595
1085
  const defaultFinishGraceMs = 3e3;
596
1086
  /** Live transcription is only supported by `*-live` model variants. */
597
1087
  function isLiveTranscriptionModelId(modelId) {
598
- return modelId.includes("-live");
1088
+ return getGoogleVertexRequestConfig(modelId).transcription?.live === true;
599
1089
  }
600
1090
  /** Regional Vertex hostname (mirrors the provider's base-URL host rules). */
601
1091
  function vertexHost(location) {
@@ -1261,9 +1751,8 @@ const googleVertexOperationSchema = lazySchema(() => zodSchema(z.object({
1261
1751
  //#endregion
1262
1752
  //#region src/google-vertex-provider-base.ts
1263
1753
  const EXPRESS_MODE_BASE_URL = "https://aiplatform.googleapis.com/v1/publishers/google";
1264
- const ENDPOINT_MODEL_PREFIX = "endpoints/";
1265
1754
  function isEndpointModelId(modelId) {
1266
- return modelId.startsWith(ENDPOINT_MODEL_PREFIX);
1755
+ return getGoogleVertexRequestConfig(modelId).language?.endpoint === true;
1267
1756
  }
1268
1757
  function createExpressModeFetch(apiKey, customFetch) {
1269
1758
  return async (url, init) => {
@@ -1361,7 +1850,7 @@ function createGoogleVertex$1(options = {}) {
1361
1850
  generateId: options.generateId ?? generateId
1362
1851
  });
1363
1852
  const createSpeechModel = (modelId) => {
1364
- if (modelId.startsWith("chirp")) {
1853
+ if (getGoogleVertexRequestConfig(modelId).speech?.api === "cloud-tts") {
1365
1854
  if (apiKey) throw new Error("Google Vertex Chirp speech models do not support Express Mode API keys. Use standard Google Cloud credentials instead.");
1366
1855
  const config = createConfig("speech");
1367
1856
  return new GoogleVertexCloudTTSSpeechModel(modelId, {
@@ -1375,7 +1864,7 @@ function createGoogleVertex$1(options = {}) {
1375
1864
  const createTranscriptionModel = (modelId) => {
1376
1865
  if (apiKey) throw new Error("Google Vertex transcription models do not support Express Mode API keys. Use standard Google Cloud credentials instead.");
1377
1866
  const config = createConfig("transcription");
1378
- if (modelId.startsWith("gemini")) return new GoogleVertexGeminiTranscriptionModel(modelId, {
1867
+ if (getGoogleVertexRequestConfig(modelId).transcription?.api === "gemini") return new GoogleVertexGeminiTranscriptionModel(modelId, {
1379
1868
  provider: config.provider,
1380
1869
  baseURL: loadBaseURL(),
1381
1870
  headers: config.headers,