@ai-sdk/google 2.0.19 → 2.0.21

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,18 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 2.0.21
4
+
5
+ ### Patch Changes
6
+
7
+ - 53f53c1: Support `imageConfig.aspectRatio` configuration for Gemini models
8
+
9
+ ## 2.0.20
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [17f9872]
14
+ - @ai-sdk/provider-utils@3.0.12
15
+
3
16
  ## 2.0.19
4
17
 
5
18
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -28,6 +28,9 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
28
28
  audioTimestamp?: boolean | undefined;
29
29
  labels?: Record<string, string> | undefined;
30
30
  mediaResolution?: "MEDIA_RESOLUTION_UNSPECIFIED" | "MEDIA_RESOLUTION_LOW" | "MEDIA_RESOLUTION_MEDIUM" | "MEDIA_RESOLUTION_HIGH" | undefined;
31
+ imageConfig?: {
32
+ aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
33
+ } | undefined;
31
34
  }>;
32
35
  type GoogleGenerativeAIProviderOptions = InferValidator<typeof googleGenerativeAIProviderOptions>;
33
36
 
package/dist/index.d.ts CHANGED
@@ -28,6 +28,9 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
28
28
  audioTimestamp?: boolean | undefined;
29
29
  labels?: Record<string, string> | undefined;
30
30
  mediaResolution?: "MEDIA_RESOLUTION_UNSPECIFIED" | "MEDIA_RESOLUTION_LOW" | "MEDIA_RESOLUTION_MEDIUM" | "MEDIA_RESOLUTION_HIGH" | undefined;
31
+ imageConfig?: {
32
+ aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
33
+ } | undefined;
31
34
  }>;
32
35
  type GoogleGenerativeAIProviderOptions = InferValidator<typeof googleGenerativeAIProviderOptions>;
33
36
 
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // src/index.ts
@@ -40,23 +30,23 @@ module.exports = __toCommonJS(src_exports);
40
30
  var import_provider_utils11 = require("@ai-sdk/provider-utils");
41
31
 
42
32
  // src/version.ts
43
- var VERSION = true ? "2.0.19" : "0.0.0-test";
33
+ var VERSION = true ? "2.0.21" : "0.0.0-test";
44
34
 
45
35
  // src/google-generative-ai-embedding-model.ts
46
36
  var import_provider = require("@ai-sdk/provider");
47
37
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
48
- var z3 = __toESM(require("zod/v4"));
38
+ var import_v43 = require("zod/v4");
49
39
 
50
40
  // src/google-error.ts
51
41
  var import_provider_utils = require("@ai-sdk/provider-utils");
52
- var z = __toESM(require("zod/v4"));
42
+ var import_v4 = require("zod/v4");
53
43
  var googleErrorDataSchema = (0, import_provider_utils.lazySchema)(
54
44
  () => (0, import_provider_utils.zodSchema)(
55
- z.object({
56
- error: z.object({
57
- code: z.number().nullable(),
58
- message: z.string(),
59
- status: z.string()
45
+ import_v4.z.object({
46
+ error: import_v4.z.object({
47
+ code: import_v4.z.number().nullable(),
48
+ message: import_v4.z.string(),
49
+ status: import_v4.z.string()
60
50
  })
61
51
  })
62
52
  )
@@ -68,15 +58,15 @@ var googleFailedResponseHandler = (0, import_provider_utils.createJsonErrorRespo
68
58
 
69
59
  // src/google-generative-ai-embedding-options.ts
70
60
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
71
- var z2 = __toESM(require("zod/v4"));
61
+ var import_v42 = require("zod/v4");
72
62
  var googleGenerativeAIEmbeddingProviderOptions = (0, import_provider_utils2.lazySchema)(
73
63
  () => (0, import_provider_utils2.zodSchema)(
74
- z2.object({
64
+ import_v42.z.object({
75
65
  /**
76
66
  * Optional. Optional reduced dimension for the output embedding.
77
67
  * If set, excessive values in the output embedding are truncated from the end.
78
68
  */
79
- outputDimensionality: z2.number().optional(),
69
+ outputDimensionality: import_v42.z.number().optional(),
80
70
  /**
81
71
  * Optional. Specifies the task type for generating embeddings.
82
72
  * Supported task types:
@@ -89,7 +79,7 @@ var googleGenerativeAIEmbeddingProviderOptions = (0, import_provider_utils2.lazy
89
79
  * - FACT_VERIFICATION: Optimized for verifying factual information.
90
80
  * - CODE_RETRIEVAL_QUERY: Optimized for retrieving code blocks based on natural language queries.
91
81
  */
92
- taskType: z2.enum([
82
+ taskType: import_v42.z.enum([
93
83
  "SEMANTIC_SIMILARITY",
94
84
  "CLASSIFICATION",
95
85
  "CLUSTERING",
@@ -198,22 +188,22 @@ var GoogleGenerativeAIEmbeddingModel = class {
198
188
  };
199
189
  var googleGenerativeAITextEmbeddingResponseSchema = (0, import_provider_utils3.lazySchema)(
200
190
  () => (0, import_provider_utils3.zodSchema)(
201
- z3.object({
202
- embeddings: z3.array(z3.object({ values: z3.array(z3.number()) }))
191
+ import_v43.z.object({
192
+ embeddings: import_v43.z.array(import_v43.z.object({ values: import_v43.z.array(import_v43.z.number()) }))
203
193
  })
204
194
  )
205
195
  );
206
196
  var googleGenerativeAISingleEmbeddingResponseSchema = (0, import_provider_utils3.lazySchema)(
207
197
  () => (0, import_provider_utils3.zodSchema)(
208
- z3.object({
209
- embedding: z3.object({ values: z3.array(z3.number()) })
198
+ import_v43.z.object({
199
+ embedding: import_v43.z.object({ values: import_v43.z.array(import_v43.z.number()) })
210
200
  })
211
201
  )
212
202
  );
213
203
 
214
204
  // src/google-generative-ai-language-model.ts
215
205
  var import_provider_utils6 = require("@ai-sdk/provider-utils");
216
- var z5 = __toESM(require("zod/v4"));
206
+ var import_v45 = require("zod/v4");
217
207
 
218
208
  // src/convert-json-schema-to-openapi-schema.ts
219
209
  function convertJSONSchemaToOpenAPISchema(jsonSchema) {
@@ -486,21 +476,21 @@ function getModelPath(modelId) {
486
476
 
487
477
  // src/google-generative-ai-options.ts
488
478
  var import_provider_utils5 = require("@ai-sdk/provider-utils");
489
- var z4 = __toESM(require("zod/v4"));
479
+ var import_v44 = require("zod/v4");
490
480
  var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
491
481
  () => (0, import_provider_utils5.zodSchema)(
492
- z4.object({
493
- responseModalities: z4.array(z4.enum(["TEXT", "IMAGE"])).optional(),
494
- thinkingConfig: z4.object({
495
- thinkingBudget: z4.number().optional(),
496
- includeThoughts: z4.boolean().optional()
482
+ import_v44.z.object({
483
+ responseModalities: import_v44.z.array(import_v44.z.enum(["TEXT", "IMAGE"])).optional(),
484
+ thinkingConfig: import_v44.z.object({
485
+ thinkingBudget: import_v44.z.number().optional(),
486
+ includeThoughts: import_v44.z.boolean().optional()
497
487
  }).optional(),
498
488
  /**
499
489
  * Optional.
500
490
  * The name of the cached content used as context to serve the prediction.
501
491
  * Format: cachedContents/{cachedContent}
502
492
  */
503
- cachedContent: z4.string().optional(),
493
+ cachedContent: import_v44.z.string().optional(),
504
494
  /**
505
495
  * Optional. Enable structured output. Default is true.
506
496
  *
@@ -509,13 +499,13 @@ var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
509
499
  * Google Generative AI uses. You can use this to disable
510
500
  * structured outputs if you need to.
511
501
  */
512
- structuredOutputs: z4.boolean().optional(),
502
+ structuredOutputs: import_v44.z.boolean().optional(),
513
503
  /**
514
504
  * Optional. A list of unique safety settings for blocking unsafe content.
515
505
  */
516
- safetySettings: z4.array(
517
- z4.object({
518
- category: z4.enum([
506
+ safetySettings: import_v44.z.array(
507
+ import_v44.z.object({
508
+ category: import_v44.z.enum([
519
509
  "HARM_CATEGORY_UNSPECIFIED",
520
510
  "HARM_CATEGORY_HATE_SPEECH",
521
511
  "HARM_CATEGORY_DANGEROUS_CONTENT",
@@ -523,7 +513,7 @@ var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
523
513
  "HARM_CATEGORY_SEXUALLY_EXPLICIT",
524
514
  "HARM_CATEGORY_CIVIC_INTEGRITY"
525
515
  ]),
526
- threshold: z4.enum([
516
+ threshold: import_v44.z.enum([
527
517
  "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
528
518
  "BLOCK_LOW_AND_ABOVE",
529
519
  "BLOCK_MEDIUM_AND_ABOVE",
@@ -533,7 +523,7 @@ var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
533
523
  ])
534
524
  })
535
525
  ).optional(),
536
- threshold: z4.enum([
526
+ threshold: import_v44.z.enum([
537
527
  "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
538
528
  "BLOCK_LOW_AND_ABOVE",
539
529
  "BLOCK_MEDIUM_AND_ABOVE",
@@ -546,24 +536,43 @@ var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
546
536
  *
547
537
  * https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/audio-understanding
548
538
  */
549
- audioTimestamp: z4.boolean().optional(),
539
+ audioTimestamp: import_v44.z.boolean().optional(),
550
540
  /**
551
541
  * Optional. Defines labels used in billing reports. Available on Vertex AI only.
552
542
  *
553
543
  * https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/add-labels-to-api-calls
554
544
  */
555
- labels: z4.record(z4.string(), z4.string()).optional(),
545
+ labels: import_v44.z.record(import_v44.z.string(), import_v44.z.string()).optional(),
556
546
  /**
557
547
  * Optional. If specified, the media resolution specified will be used.
558
548
  *
559
549
  * https://ai.google.dev/api/generate-content#MediaResolution
560
550
  */
561
- mediaResolution: z4.enum([
551
+ mediaResolution: import_v44.z.enum([
562
552
  "MEDIA_RESOLUTION_UNSPECIFIED",
563
553
  "MEDIA_RESOLUTION_LOW",
564
554
  "MEDIA_RESOLUTION_MEDIUM",
565
555
  "MEDIA_RESOLUTION_HIGH"
566
- ]).optional()
556
+ ]).optional(),
557
+ /**
558
+ * Optional. Configures the image generation aspect ratio for Gemini models.
559
+ *
560
+ * https://ai.google.dev/gemini-api/docs/image-generation#aspect_ratios
561
+ */
562
+ imageConfig: import_v44.z.object({
563
+ aspectRatio: import_v44.z.enum([
564
+ "1:1",
565
+ "2:3",
566
+ "3:2",
567
+ "3:4",
568
+ "4:3",
569
+ "4:5",
570
+ "5:4",
571
+ "9:16",
572
+ "16:9",
573
+ "21:9"
574
+ ]).optional()
575
+ }).optional()
567
576
  })
568
577
  )
569
578
  );
@@ -818,7 +827,10 @@ var GoogleGenerativeAILanguageModel = class {
818
827
  },
819
828
  // provider options:
820
829
  responseModalities: googleOptions == null ? void 0 : googleOptions.responseModalities,
821
- thinkingConfig: googleOptions == null ? void 0 : googleOptions.thinkingConfig
830
+ thinkingConfig: googleOptions == null ? void 0 : googleOptions.thinkingConfig,
831
+ ...(googleOptions == null ? void 0 : googleOptions.imageConfig) && {
832
+ imageConfig: googleOptions.imageConfig
833
+ }
822
834
  },
823
835
  contents,
824
836
  systemInstruction: isGemmaModel ? void 0 : systemInstruction,
@@ -1229,129 +1241,129 @@ function extractSources({
1229
1241
  title: chunk.web.title
1230
1242
  }));
1231
1243
  }
1232
- var getGroundingMetadataSchema = () => z5.object({
1233
- webSearchQueries: z5.array(z5.string()).nullish(),
1234
- retrievalQueries: z5.array(z5.string()).nullish(),
1235
- searchEntryPoint: z5.object({ renderedContent: z5.string() }).nullish(),
1236
- groundingChunks: z5.array(
1237
- z5.object({
1238
- web: z5.object({ uri: z5.string(), title: z5.string() }).nullish(),
1239
- retrievedContext: z5.object({ uri: z5.string(), title: z5.string() }).nullish()
1244
+ var getGroundingMetadataSchema = () => import_v45.z.object({
1245
+ webSearchQueries: import_v45.z.array(import_v45.z.string()).nullish(),
1246
+ retrievalQueries: import_v45.z.array(import_v45.z.string()).nullish(),
1247
+ searchEntryPoint: import_v45.z.object({ renderedContent: import_v45.z.string() }).nullish(),
1248
+ groundingChunks: import_v45.z.array(
1249
+ import_v45.z.object({
1250
+ web: import_v45.z.object({ uri: import_v45.z.string(), title: import_v45.z.string() }).nullish(),
1251
+ retrievedContext: import_v45.z.object({ uri: import_v45.z.string(), title: import_v45.z.string() }).nullish()
1240
1252
  })
1241
1253
  ).nullish(),
1242
- groundingSupports: z5.array(
1243
- z5.object({
1244
- segment: z5.object({
1245
- startIndex: z5.number().nullish(),
1246
- endIndex: z5.number().nullish(),
1247
- text: z5.string().nullish()
1254
+ groundingSupports: import_v45.z.array(
1255
+ import_v45.z.object({
1256
+ segment: import_v45.z.object({
1257
+ startIndex: import_v45.z.number().nullish(),
1258
+ endIndex: import_v45.z.number().nullish(),
1259
+ text: import_v45.z.string().nullish()
1248
1260
  }),
1249
- segment_text: z5.string().nullish(),
1250
- groundingChunkIndices: z5.array(z5.number()).nullish(),
1251
- supportChunkIndices: z5.array(z5.number()).nullish(),
1252
- confidenceScores: z5.array(z5.number()).nullish(),
1253
- confidenceScore: z5.array(z5.number()).nullish()
1261
+ segment_text: import_v45.z.string().nullish(),
1262
+ groundingChunkIndices: import_v45.z.array(import_v45.z.number()).nullish(),
1263
+ supportChunkIndices: import_v45.z.array(import_v45.z.number()).nullish(),
1264
+ confidenceScores: import_v45.z.array(import_v45.z.number()).nullish(),
1265
+ confidenceScore: import_v45.z.array(import_v45.z.number()).nullish()
1254
1266
  })
1255
1267
  ).nullish(),
1256
- retrievalMetadata: z5.union([
1257
- z5.object({
1258
- webDynamicRetrievalScore: z5.number()
1268
+ retrievalMetadata: import_v45.z.union([
1269
+ import_v45.z.object({
1270
+ webDynamicRetrievalScore: import_v45.z.number()
1259
1271
  }),
1260
- z5.object({})
1272
+ import_v45.z.object({})
1261
1273
  ]).nullish()
1262
1274
  });
1263
- var getContentSchema = () => z5.object({
1264
- parts: z5.array(
1265
- z5.union([
1275
+ var getContentSchema = () => import_v45.z.object({
1276
+ parts: import_v45.z.array(
1277
+ import_v45.z.union([
1266
1278
  // note: order matters since text can be fully empty
1267
- z5.object({
1268
- functionCall: z5.object({
1269
- name: z5.string(),
1270
- args: z5.unknown()
1279
+ import_v45.z.object({
1280
+ functionCall: import_v45.z.object({
1281
+ name: import_v45.z.string(),
1282
+ args: import_v45.z.unknown()
1271
1283
  }),
1272
- thoughtSignature: z5.string().nullish()
1284
+ thoughtSignature: import_v45.z.string().nullish()
1273
1285
  }),
1274
- z5.object({
1275
- inlineData: z5.object({
1276
- mimeType: z5.string(),
1277
- data: z5.string()
1286
+ import_v45.z.object({
1287
+ inlineData: import_v45.z.object({
1288
+ mimeType: import_v45.z.string(),
1289
+ data: import_v45.z.string()
1278
1290
  })
1279
1291
  }),
1280
- z5.object({
1281
- executableCode: z5.object({
1282
- language: z5.string(),
1283
- code: z5.string()
1292
+ import_v45.z.object({
1293
+ executableCode: import_v45.z.object({
1294
+ language: import_v45.z.string(),
1295
+ code: import_v45.z.string()
1284
1296
  }).nullish(),
1285
- codeExecutionResult: z5.object({
1286
- outcome: z5.string(),
1287
- output: z5.string()
1297
+ codeExecutionResult: import_v45.z.object({
1298
+ outcome: import_v45.z.string(),
1299
+ output: import_v45.z.string()
1288
1300
  }).nullish(),
1289
- text: z5.string().nullish(),
1290
- thought: z5.boolean().nullish(),
1291
- thoughtSignature: z5.string().nullish()
1301
+ text: import_v45.z.string().nullish(),
1302
+ thought: import_v45.z.boolean().nullish(),
1303
+ thoughtSignature: import_v45.z.string().nullish()
1292
1304
  })
1293
1305
  ])
1294
1306
  ).nullish()
1295
1307
  });
1296
- var getSafetyRatingSchema = () => z5.object({
1297
- category: z5.string().nullish(),
1298
- probability: z5.string().nullish(),
1299
- probabilityScore: z5.number().nullish(),
1300
- severity: z5.string().nullish(),
1301
- severityScore: z5.number().nullish(),
1302
- blocked: z5.boolean().nullish()
1308
+ var getSafetyRatingSchema = () => import_v45.z.object({
1309
+ category: import_v45.z.string().nullish(),
1310
+ probability: import_v45.z.string().nullish(),
1311
+ probabilityScore: import_v45.z.number().nullish(),
1312
+ severity: import_v45.z.string().nullish(),
1313
+ severityScore: import_v45.z.number().nullish(),
1314
+ blocked: import_v45.z.boolean().nullish()
1303
1315
  });
1304
- var usageSchema = z5.object({
1305
- cachedContentTokenCount: z5.number().nullish(),
1306
- thoughtsTokenCount: z5.number().nullish(),
1307
- promptTokenCount: z5.number().nullish(),
1308
- candidatesTokenCount: z5.number().nullish(),
1309
- totalTokenCount: z5.number().nullish()
1316
+ var usageSchema = import_v45.z.object({
1317
+ cachedContentTokenCount: import_v45.z.number().nullish(),
1318
+ thoughtsTokenCount: import_v45.z.number().nullish(),
1319
+ promptTokenCount: import_v45.z.number().nullish(),
1320
+ candidatesTokenCount: import_v45.z.number().nullish(),
1321
+ totalTokenCount: import_v45.z.number().nullish()
1310
1322
  });
1311
- var getUrlContextMetadataSchema = () => z5.object({
1312
- urlMetadata: z5.array(
1313
- z5.object({
1314
- retrievedUrl: z5.string(),
1315
- urlRetrievalStatus: z5.string()
1323
+ var getUrlContextMetadataSchema = () => import_v45.z.object({
1324
+ urlMetadata: import_v45.z.array(
1325
+ import_v45.z.object({
1326
+ retrievedUrl: import_v45.z.string(),
1327
+ urlRetrievalStatus: import_v45.z.string()
1316
1328
  })
1317
1329
  )
1318
1330
  });
1319
1331
  var responseSchema = (0, import_provider_utils6.lazySchema)(
1320
1332
  () => (0, import_provider_utils6.zodSchema)(
1321
- z5.object({
1322
- candidates: z5.array(
1323
- z5.object({
1324
- content: getContentSchema().nullish().or(z5.object({}).strict()),
1325
- finishReason: z5.string().nullish(),
1326
- safetyRatings: z5.array(getSafetyRatingSchema()).nullish(),
1333
+ import_v45.z.object({
1334
+ candidates: import_v45.z.array(
1335
+ import_v45.z.object({
1336
+ content: getContentSchema().nullish().or(import_v45.z.object({}).strict()),
1337
+ finishReason: import_v45.z.string().nullish(),
1338
+ safetyRatings: import_v45.z.array(getSafetyRatingSchema()).nullish(),
1327
1339
  groundingMetadata: getGroundingMetadataSchema().nullish(),
1328
1340
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
1329
1341
  })
1330
1342
  ),
1331
1343
  usageMetadata: usageSchema.nullish(),
1332
- promptFeedback: z5.object({
1333
- blockReason: z5.string().nullish(),
1334
- safetyRatings: z5.array(getSafetyRatingSchema()).nullish()
1344
+ promptFeedback: import_v45.z.object({
1345
+ blockReason: import_v45.z.string().nullish(),
1346
+ safetyRatings: import_v45.z.array(getSafetyRatingSchema()).nullish()
1335
1347
  }).nullish()
1336
1348
  })
1337
1349
  )
1338
1350
  );
1339
1351
  var chunkSchema = (0, import_provider_utils6.lazySchema)(
1340
1352
  () => (0, import_provider_utils6.zodSchema)(
1341
- z5.object({
1342
- candidates: z5.array(
1343
- z5.object({
1353
+ import_v45.z.object({
1354
+ candidates: import_v45.z.array(
1355
+ import_v45.z.object({
1344
1356
  content: getContentSchema().nullish(),
1345
- finishReason: z5.string().nullish(),
1346
- safetyRatings: z5.array(getSafetyRatingSchema()).nullish(),
1357
+ finishReason: import_v45.z.string().nullish(),
1358
+ safetyRatings: import_v45.z.array(getSafetyRatingSchema()).nullish(),
1347
1359
  groundingMetadata: getGroundingMetadataSchema().nullish(),
1348
1360
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
1349
1361
  })
1350
1362
  ).nullish(),
1351
1363
  usageMetadata: usageSchema.nullish(),
1352
- promptFeedback: z5.object({
1353
- blockReason: z5.string().nullish(),
1354
- safetyRatings: z5.array(getSafetyRatingSchema()).nullish()
1364
+ promptFeedback: import_v45.z.object({
1365
+ blockReason: import_v45.z.string().nullish(),
1366
+ safetyRatings: import_v45.z.array(getSafetyRatingSchema()).nullish()
1355
1367
  }).nullish()
1356
1368
  })
1357
1369
  )
@@ -1359,31 +1371,31 @@ var chunkSchema = (0, import_provider_utils6.lazySchema)(
1359
1371
 
1360
1372
  // src/tool/code-execution.ts
1361
1373
  var import_provider_utils7 = require("@ai-sdk/provider-utils");
1362
- var z6 = __toESM(require("zod/v4"));
1374
+ var import_v46 = require("zod/v4");
1363
1375
  var codeExecution = (0, import_provider_utils7.createProviderDefinedToolFactoryWithOutputSchema)({
1364
1376
  id: "google.code_execution",
1365
1377
  name: "code_execution",
1366
- inputSchema: z6.object({
1367
- language: z6.string().describe("The programming language of the code."),
1368
- code: z6.string().describe("The code to be executed.")
1378
+ inputSchema: import_v46.z.object({
1379
+ language: import_v46.z.string().describe("The programming language of the code."),
1380
+ code: import_v46.z.string().describe("The code to be executed.")
1369
1381
  }),
1370
- outputSchema: z6.object({
1371
- outcome: z6.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),
1372
- output: z6.string().describe("The output from the code execution.")
1382
+ outputSchema: import_v46.z.object({
1383
+ outcome: import_v46.z.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),
1384
+ output: import_v46.z.string().describe("The output from the code execution.")
1373
1385
  })
1374
1386
  });
1375
1387
 
1376
1388
  // src/tool/google-search.ts
1377
1389
  var import_provider_utils8 = require("@ai-sdk/provider-utils");
1378
- var z7 = __toESM(require("zod/v4"));
1390
+ var import_v47 = require("zod/v4");
1379
1391
  var googleSearch = (0, import_provider_utils8.createProviderDefinedToolFactory)({
1380
1392
  id: "google.google_search",
1381
1393
  name: "google_search",
1382
1394
  inputSchema: (0, import_provider_utils8.lazySchema)(
1383
1395
  () => (0, import_provider_utils8.zodSchema)(
1384
- z7.object({
1385
- mode: z7.enum(["MODE_DYNAMIC", "MODE_UNSPECIFIED"]).default("MODE_UNSPECIFIED"),
1386
- dynamicThreshold: z7.number().default(1)
1396
+ import_v47.z.object({
1397
+ mode: import_v47.z.enum(["MODE_DYNAMIC", "MODE_UNSPECIFIED"]).default("MODE_UNSPECIFIED"),
1398
+ dynamicThreshold: import_v47.z.number().default(1)
1387
1399
  })
1388
1400
  )
1389
1401
  )
@@ -1391,11 +1403,11 @@ var googleSearch = (0, import_provider_utils8.createProviderDefinedToolFactory)(
1391
1403
 
1392
1404
  // src/tool/url-context.ts
1393
1405
  var import_provider_utils9 = require("@ai-sdk/provider-utils");
1394
- var z8 = __toESM(require("zod/v4"));
1406
+ var import_v48 = require("zod/v4");
1395
1407
  var urlContext = (0, import_provider_utils9.createProviderDefinedToolFactory)({
1396
1408
  id: "google.url_context",
1397
1409
  name: "url_context",
1398
- inputSchema: (0, import_provider_utils9.lazySchema)(() => (0, import_provider_utils9.zodSchema)(z8.object({})))
1410
+ inputSchema: (0, import_provider_utils9.lazySchema)(() => (0, import_provider_utils9.zodSchema)(import_v48.z.object({})))
1399
1411
  });
1400
1412
 
1401
1413
  // src/google-tools.ts
@@ -1425,7 +1437,7 @@ var googleTools = {
1425
1437
 
1426
1438
  // src/google-generative-ai-image-model.ts
1427
1439
  var import_provider_utils10 = require("@ai-sdk/provider-utils");
1428
- var z9 = __toESM(require("zod/v4"));
1440
+ var import_v49 = require("zod/v4");
1429
1441
  var GoogleGenerativeAIImageModel = class {
1430
1442
  constructor(modelId, settings, config) {
1431
1443
  this.modelId = modelId;
@@ -1519,16 +1531,16 @@ var GoogleGenerativeAIImageModel = class {
1519
1531
  };
1520
1532
  var googleImageResponseSchema = (0, import_provider_utils10.lazySchema)(
1521
1533
  () => (0, import_provider_utils10.zodSchema)(
1522
- z9.object({
1523
- predictions: z9.array(z9.object({ bytesBase64Encoded: z9.string() })).default([])
1534
+ import_v49.z.object({
1535
+ predictions: import_v49.z.array(import_v49.z.object({ bytesBase64Encoded: import_v49.z.string() })).default([])
1524
1536
  })
1525
1537
  )
1526
1538
  );
1527
1539
  var googleImageProviderOptionsSchema = (0, import_provider_utils10.lazySchema)(
1528
1540
  () => (0, import_provider_utils10.zodSchema)(
1529
- z9.object({
1530
- personGeneration: z9.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
1531
- aspectRatio: z9.enum(["1:1", "3:4", "4:3", "9:16", "16:9"]).nullish()
1541
+ import_v49.z.object({
1542
+ personGeneration: import_v49.z.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
1543
+ aspectRatio: import_v49.z.enum(["1:1", "3:4", "4:3", "9:16", "16:9"]).nullish()
1532
1544
  })
1533
1545
  )
1534
1546
  );