@ai-sdk/google 3.0.138 → 3.0.140

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.mjs CHANGED
@@ -238,7 +238,7 @@ import {
238
238
  } from "@ai-sdk/provider-utils";
239
239
 
240
240
  // src/version.ts
241
- var VERSION = true ? "3.0.138" : "0.0.0-test";
241
+ var VERSION = true ? "3.0.140" : "0.0.0-test";
242
242
 
243
243
  // src/google-generative-ai-embedding-model.ts
244
244
  import {
@@ -485,7 +485,7 @@ import {
485
485
  resolve as resolve3,
486
486
  zodSchema as zodSchema7
487
487
  } from "@ai-sdk/provider-utils";
488
- import { z as z7 } from "zod/v4";
488
+ import { z as z8 } from "zod/v4";
489
489
 
490
490
  // src/continue-google-stream.ts
491
491
  function continueGoogleStream({
@@ -916,6 +916,19 @@ import {
916
916
  isUrlSupported,
917
917
  secureJsonParse
918
918
  } from "@ai-sdk/provider-utils";
919
+
920
+ // src/google-generative-ai-prompt.ts
921
+ import { z as z6 } from "zod/v4";
922
+ var googleVideoMetadataSchema = z6.object({
923
+ /** Start offset as a duration in seconds, e.g. `'3.5s'`. */
924
+ startOffset: z6.string().optional(),
925
+ /** End offset as a duration in seconds, e.g. `'10s'`. */
926
+ endOffset: z6.string().optional(),
927
+ /** Frames per second in the range (0, 24]. Defaults to 1. */
928
+ fps: z6.number().gt(0).max(24).optional()
929
+ });
930
+
931
+ // src/convert-to-google-generative-ai-messages.ts
919
932
  var SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
920
933
  function getGoogleProviderOptions(providerOptions, providerOptionsName) {
921
934
  const namespaces = [
@@ -1054,7 +1067,7 @@ function appendLegacyToolResultParts(parts, toolName, outputValue, toolCallId, i
1054
1067
  }
1055
1068
  }
1056
1069
  function convertToGoogleGenerativeAIMessages(prompt, options) {
1057
- var _a2, _b, _c, _d, _e, _f, _g;
1070
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
1058
1071
  const systemInstructionParts = [];
1059
1072
  const contents = [];
1060
1073
  let systemMessagesAllowed = true;
@@ -1094,17 +1107,24 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
1094
1107
  }
1095
1108
  case "file": {
1096
1109
  const mediaType = part.mediaType === "image/*" ? "image/jpeg" : part.mediaType;
1110
+ const rawVideoMetadata = (_g = getGoogleProviderOptions(
1111
+ part.providerOptions,
1112
+ providerOptionsName
1113
+ )) == null ? void 0 : _g.videoMetadata;
1114
+ const videoMetadata = rawVideoMetadata == null ? void 0 : googleVideoMetadataSchema.parse(rawVideoMetadata);
1097
1115
  parts.push(
1098
1116
  part.data instanceof URL ? {
1099
1117
  fileData: {
1100
1118
  mimeType: mediaType,
1101
1119
  fileUri: part.data.protocol === "gs:" && part.originalUrl != null ? part.originalUrl : part.data.toString()
1102
- }
1120
+ },
1121
+ ...videoMetadata != null ? { videoMetadata } : {}
1103
1122
  } : {
1104
1123
  inlineData: {
1105
1124
  mimeType: mediaType,
1106
1125
  data: convertToBase642(part.data)
1107
- }
1126
+ },
1127
+ ...videoMetadata != null ? { videoMetadata } : {}
1108
1128
  }
1109
1129
  );
1110
1130
  break;
@@ -1265,7 +1285,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
1265
1285
  name: part.toolName,
1266
1286
  response: {
1267
1287
  name: part.toolName,
1268
- content: output.type === "execution-denied" ? (_g = output.reason) != null ? _g : "Tool call execution denied." : output.value
1288
+ content: output.type === "execution-denied" ? (_h = output.reason) != null ? _h : "Tool call execution denied." : output.value
1269
1289
  }
1270
1290
  }
1271
1291
  });
@@ -1376,23 +1396,23 @@ import {
1376
1396
  lazySchema as lazySchema6,
1377
1397
  zodSchema as zodSchema6
1378
1398
  } from "@ai-sdk/provider-utils";
1379
- import { z as z6 } from "zod/v4";
1399
+ import { z as z7 } from "zod/v4";
1380
1400
  var googleLanguageModelOptions = lazySchema6(
1381
1401
  () => zodSchema6(
1382
- z6.object({
1383
- responseModalities: z6.array(z6.enum(["TEXT", "IMAGE"])).optional(),
1384
- thinkingConfig: z6.object({
1385
- thinkingBudget: z6.number().optional(),
1386
- includeThoughts: z6.boolean().optional(),
1402
+ z7.object({
1403
+ responseModalities: z7.array(z7.enum(["TEXT", "IMAGE"])).optional(),
1404
+ thinkingConfig: z7.object({
1405
+ thinkingBudget: z7.number().optional(),
1406
+ includeThoughts: z7.boolean().optional(),
1387
1407
  // https://ai.google.dev/gemini-api/docs/gemini-3?thinking=high#thinking_level
1388
- thinkingLevel: z6.enum(["minimal", "low", "medium", "high"]).optional()
1408
+ thinkingLevel: z7.enum(["minimal", "low", "medium", "high"]).optional()
1389
1409
  }).optional(),
1390
1410
  /**
1391
1411
  * Optional.
1392
1412
  * The name of the cached content used as context to serve the prediction.
1393
1413
  * Format: cachedContents/{cachedContent}
1394
1414
  */
1395
- cachedContent: z6.string().optional(),
1415
+ cachedContent: z7.string().optional(),
1396
1416
  /**
1397
1417
  * Optional. Enable structured output. Default is true.
1398
1418
  *
@@ -1401,13 +1421,13 @@ var googleLanguageModelOptions = lazySchema6(
1401
1421
  * Google Generative AI uses. You can use this to disable
1402
1422
  * structured outputs if you need to.
1403
1423
  */
1404
- structuredOutputs: z6.boolean().optional(),
1424
+ structuredOutputs: z7.boolean().optional(),
1405
1425
  /**
1406
1426
  * Optional. A list of unique safety settings for blocking unsafe content.
1407
1427
  */
1408
- safetySettings: z6.array(
1409
- z6.object({
1410
- category: z6.enum([
1428
+ safetySettings: z7.array(
1429
+ z7.object({
1430
+ category: z7.enum([
1411
1431
  "HARM_CATEGORY_UNSPECIFIED",
1412
1432
  "HARM_CATEGORY_HATE_SPEECH",
1413
1433
  "HARM_CATEGORY_DANGEROUS_CONTENT",
@@ -1415,7 +1435,7 @@ var googleLanguageModelOptions = lazySchema6(
1415
1435
  "HARM_CATEGORY_SEXUALLY_EXPLICIT",
1416
1436
  "HARM_CATEGORY_CIVIC_INTEGRITY"
1417
1437
  ]),
1418
- threshold: z6.enum([
1438
+ threshold: z7.enum([
1419
1439
  "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
1420
1440
  "BLOCK_LOW_AND_ABOVE",
1421
1441
  "BLOCK_MEDIUM_AND_ABOVE",
@@ -1425,7 +1445,7 @@ var googleLanguageModelOptions = lazySchema6(
1425
1445
  ])
1426
1446
  })
1427
1447
  ).optional(),
1428
- threshold: z6.enum([
1448
+ threshold: z7.enum([
1429
1449
  "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
1430
1450
  "BLOCK_LOW_AND_ABOVE",
1431
1451
  "BLOCK_MEDIUM_AND_ABOVE",
@@ -1438,19 +1458,19 @@ var googleLanguageModelOptions = lazySchema6(
1438
1458
  *
1439
1459
  * https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/audio-understanding
1440
1460
  */
1441
- audioTimestamp: z6.boolean().optional(),
1461
+ audioTimestamp: z7.boolean().optional(),
1442
1462
  /**
1443
1463
  * Optional. Defines labels used in billing reports. Available on Vertex AI only.
1444
1464
  *
1445
1465
  * https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/add-labels-to-api-calls
1446
1466
  */
1447
- labels: z6.record(z6.string(), z6.string()).optional(),
1467
+ labels: z7.record(z7.string(), z7.string()).optional(),
1448
1468
  /**
1449
1469
  * Optional. If specified, the media resolution specified will be used.
1450
1470
  *
1451
1471
  * https://ai.google.dev/api/generate-content#MediaResolution
1452
1472
  */
1453
- mediaResolution: z6.enum([
1473
+ mediaResolution: z7.enum([
1454
1474
  "MEDIA_RESOLUTION_UNSPECIFIED",
1455
1475
  "MEDIA_RESOLUTION_LOW",
1456
1476
  "MEDIA_RESOLUTION_MEDIUM",
@@ -1461,8 +1481,8 @@ var googleLanguageModelOptions = lazySchema6(
1461
1481
  *
1462
1482
  * https://ai.google.dev/gemini-api/docs/image-generation#aspect_ratios
1463
1483
  */
1464
- imageConfig: z6.object({
1465
- aspectRatio: z6.enum([
1484
+ imageConfig: z7.object({
1485
+ aspectRatio: z7.enum([
1466
1486
  "1:1",
1467
1487
  "2:3",
1468
1488
  "3:2",
@@ -1478,12 +1498,12 @@ var googleLanguageModelOptions = lazySchema6(
1478
1498
  "1:4",
1479
1499
  "4:1"
1480
1500
  ]).optional(),
1481
- imageSize: z6.enum(["1K", "2K", "4K", "512"]).optional(),
1501
+ imageSize: z7.enum(["1K", "2K", "4K", "512"]).optional(),
1482
1502
  /**
1483
1503
  * Optional. Controls the generation of people in images.
1484
1504
  * Vertex AI only.
1485
1505
  */
1486
- personGeneration: z6.enum([
1506
+ personGeneration: z7.enum([
1487
1507
  "PERSON_GENERATION_UNSPECIFIED",
1488
1508
  "ALLOW_ALL",
1489
1509
  "ALLOW_ADULT",
@@ -1497,7 +1517,7 @@ var googleLanguageModelOptions = lazySchema6(
1497
1517
  *
1498
1518
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerationConfig
1499
1519
  */
1500
- prominentPeople: z6.enum([
1520
+ prominentPeople: z7.enum([
1501
1521
  "PROMINENT_PEOPLE_UNSPECIFIED",
1502
1522
  "ALLOW_PROMINENT_PEOPLE",
1503
1523
  "BLOCK_PROMINENT_PEOPLE"
@@ -1506,9 +1526,9 @@ var googleLanguageModelOptions = lazySchema6(
1506
1526
  * Optional. The image output format for generated images.
1507
1527
  * Vertex AI only.
1508
1528
  */
1509
- imageOutputOptions: z6.object({
1510
- mimeType: z6.enum(["image/jpeg", "image/png"]).optional(),
1511
- compressionQuality: z6.number().optional()
1529
+ imageOutputOptions: z7.object({
1530
+ mimeType: z7.enum(["image/jpeg", "image/png"]).optional(),
1531
+ compressionQuality: z7.number().optional()
1512
1532
  }).optional()
1513
1533
  }).optional(),
1514
1534
  /**
@@ -1517,10 +1537,10 @@ var googleLanguageModelOptions = lazySchema6(
1517
1537
  *
1518
1538
  * https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-maps
1519
1539
  */
1520
- retrievalConfig: z6.object({
1521
- latLng: z6.object({
1522
- latitude: z6.number(),
1523
- longitude: z6.number()
1540
+ retrievalConfig: z7.object({
1541
+ latLng: z7.object({
1542
+ latitude: z7.number(),
1543
+ longitude: z7.number()
1524
1544
  }).optional()
1525
1545
  }).optional(),
1526
1546
  /**
@@ -1533,12 +1553,12 @@ var googleLanguageModelOptions = lazySchema6(
1533
1553
  *
1534
1554
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc
1535
1555
  */
1536
- streamFunctionCallArguments: z6.boolean().optional(),
1556
+ streamFunctionCallArguments: z7.boolean().optional(),
1537
1557
  /**
1538
1558
  * Optional. The service tier to use for the request. Sent as the
1539
1559
  * `serviceTier` body field. Gemini API only.
1540
1560
  */
1541
- serviceTier: z6.enum(["standard", "flex", "priority"]).optional(),
1561
+ serviceTier: z7.enum(["standard", "flex", "priority"]).optional(),
1542
1562
  /**
1543
1563
  * Optional. Resumes a response that stopped with `MAX_TOKENS` because it
1544
1564
  * used up its `maxOutputTokens` budget (Gemini 4 long decode). Pass the
@@ -1548,7 +1568,7 @@ var googleLanguageModelOptions = lazySchema6(
1548
1568
  * per-request cap while budget remains (`CONTINUATION`) are continued
1549
1569
  * automatically. Sent as the `continuationToken` body field.
1550
1570
  */
1551
- continuationToken: z6.string().optional(),
1571
+ continuationToken: z7.string().optional(),
1552
1572
  /**
1553
1573
  * Optional. Vertex AI only. Sent as the
1554
1574
  * `X-Vertex-AI-LLM-Shared-Request-Type` request header to select a
@@ -1559,7 +1579,7 @@ var googleLanguageModelOptions = lazySchema6(
1559
1579
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/priority-paygo
1560
1580
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/flex-paygo
1561
1581
  */
1562
- sharedRequestType: z6.enum(["priority", "flex", "standard"]).optional(),
1582
+ sharedRequestType: z7.enum(["priority", "flex", "standard"]).optional(),
1563
1583
  /**
1564
1584
  * Optional. Vertex AI only. Sent as the `X-Vertex-AI-LLM-Request-Type`
1565
1585
  * request header. Set to `'shared'` together with `sharedRequestType`
@@ -1567,7 +1587,7 @@ var googleLanguageModelOptions = lazySchema6(
1567
1587
  *
1568
1588
  * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/priority-paygo
1569
1589
  */
1570
- requestType: z6.enum(["shared"]).optional()
1590
+ requestType: z7.enum(["shared"]).optional()
1571
1591
  })
1572
1592
  )
1573
1593
  );
@@ -1876,8 +1896,10 @@ var GoogleJSONAccumulator = class {
1876
1896
  processPartialArgs(partialArgs) {
1877
1897
  let delta = "";
1878
1898
  for (const arg of partialArgs) {
1879
- const rawPath = arg.jsonPath.replace(/^\$\./, "");
1880
- if (!rawPath) continue;
1899
+ const isArrayTerminator = arg.jsonPath.endsWith("[]");
1900
+ const jsonPath = isArrayTerminator ? arg.jsonPath.slice(0, -2) : arg.jsonPath;
1901
+ const rawPath = jsonPath.replace(/^\$\./, "");
1902
+ if (!rawPath || rawPath === "$") continue;
1881
1903
  const segments = parsePath(rawPath);
1882
1904
  const existingValue = getNestedValue(this.accumulatedArgs, segments);
1883
1905
  const isStringContinuation = arg.stringValue != null && existingValue !== void 0;
@@ -1892,7 +1914,16 @@ var GoogleJSONAccumulator = class {
1892
1914
  continue;
1893
1915
  }
1894
1916
  const resolved = resolvePartialArgValue(arg);
1895
- if (resolved == null) continue;
1917
+ if (resolved == null) {
1918
+ if (existingValue !== void 0 || arg.willContinue === true) continue;
1919
+ setNestedValue(
1920
+ this.accumulatedArgs,
1921
+ segments,
1922
+ isArrayTerminator ? [] : {}
1923
+ );
1924
+ delta += this.emitContainer(segments, isArrayTerminator);
1925
+ continue;
1926
+ }
1896
1927
  setNestedValue(this.accumulatedArgs, segments, resolved.value);
1897
1928
  delta += this.emitNavigationTo(segments, arg, resolved.json);
1898
1929
  }
@@ -1944,6 +1975,26 @@ var GoogleJSONAccumulator = class {
1944
1975
  fragment += this.emitLeaf(leafSegment, arg, valueJson);
1945
1976
  return fragment;
1946
1977
  }
1978
+ /**
1979
+ * Navigates to `targetSegments` and opens a container there. The container
1980
+ * stays open so later entries for its children continue inside it; it is
1981
+ * closed by subsequent navigation or by `finalize()`.
1982
+ *
1983
+ * Input: targetSegments=["nested","tags"], isArray=true
1984
+ * Output: '{"nested":{"tags":['
1985
+ */
1986
+ emitContainer(targetSegments, isArray) {
1987
+ let fragment = "";
1988
+ if (this.stringOpen) {
1989
+ fragment += '"';
1990
+ this.stringOpen = false;
1991
+ }
1992
+ fragment += this.ensureRoot();
1993
+ const commonDepth = this.findCommonStackDepth(targetSegments);
1994
+ fragment += this.closeDownTo(commonDepth);
1995
+ fragment += this.openDownTo(targetSegments, isArray ? 0 : "");
1996
+ return fragment;
1997
+ }
1947
1998
  /**
1948
1999
  * Returns the stack depth to preserve when navigating to a new target
1949
2000
  * container path. Always >= 1 (the root is never popped).
@@ -3155,205 +3206,205 @@ function extractSources({
3155
3206
  }
3156
3207
  return sources.length > 0 ? sources : void 0;
3157
3208
  }
3158
- var getGroundingMetadataSchema = () => z7.object({
3159
- webSearchQueries: z7.array(z7.string()).nullish(),
3160
- imageSearchQueries: z7.array(z7.string()).nullish(),
3161
- retrievalQueries: z7.array(z7.string()).nullish(),
3162
- searchEntryPoint: z7.object({ renderedContent: z7.string() }).nullish(),
3163
- groundingChunks: z7.array(
3164
- z7.object({
3165
- web: z7.object({ uri: z7.string(), title: z7.string().nullish() }).nullish(),
3166
- image: z7.object({
3167
- sourceUri: z7.string(),
3168
- imageUri: z7.string(),
3169
- title: z7.string().nullish(),
3170
- domain: z7.string().nullish()
3209
+ var getGroundingMetadataSchema = () => z8.object({
3210
+ webSearchQueries: z8.array(z8.string()).nullish(),
3211
+ imageSearchQueries: z8.array(z8.string()).nullish(),
3212
+ retrievalQueries: z8.array(z8.string()).nullish(),
3213
+ searchEntryPoint: z8.object({ renderedContent: z8.string() }).nullish(),
3214
+ groundingChunks: z8.array(
3215
+ z8.object({
3216
+ web: z8.object({ uri: z8.string(), title: z8.string().nullish() }).nullish(),
3217
+ image: z8.object({
3218
+ sourceUri: z8.string(),
3219
+ imageUri: z8.string(),
3220
+ title: z8.string().nullish(),
3221
+ domain: z8.string().nullish()
3171
3222
  }).nullish(),
3172
- retrievedContext: z7.object({
3173
- uri: z7.string().nullish(),
3174
- title: z7.string().nullish(),
3175
- text: z7.string().nullish(),
3176
- fileSearchStore: z7.string().nullish(),
3177
- customMetadata: z7.array(
3178
- z7.object({
3179
- key: z7.string(),
3180
- stringValue: z7.string().nullish(),
3181
- numericValue: z7.number().nullish(),
3182
- stringListValue: z7.object({ values: z7.array(z7.string()).nullish() }).nullish()
3223
+ retrievedContext: z8.object({
3224
+ uri: z8.string().nullish(),
3225
+ title: z8.string().nullish(),
3226
+ text: z8.string().nullish(),
3227
+ fileSearchStore: z8.string().nullish(),
3228
+ customMetadata: z8.array(
3229
+ z8.object({
3230
+ key: z8.string(),
3231
+ stringValue: z8.string().nullish(),
3232
+ numericValue: z8.number().nullish(),
3233
+ stringListValue: z8.object({ values: z8.array(z8.string()).nullish() }).nullish()
3183
3234
  })
3184
3235
  ).nullish()
3185
3236
  }).nullish(),
3186
- maps: z7.object({
3187
- uri: z7.string().nullish(),
3188
- title: z7.string().nullish(),
3189
- text: z7.string().nullish(),
3190
- placeId: z7.string().nullish()
3237
+ maps: z8.object({
3238
+ uri: z8.string().nullish(),
3239
+ title: z8.string().nullish(),
3240
+ text: z8.string().nullish(),
3241
+ placeId: z8.string().nullish()
3191
3242
  }).nullish()
3192
3243
  })
3193
3244
  ).nullish(),
3194
- groundingSupports: z7.array(
3195
- z7.object({
3196
- segment: z7.object({
3197
- startIndex: z7.number().nullish(),
3198
- endIndex: z7.number().nullish(),
3199
- text: z7.string().nullish()
3245
+ groundingSupports: z8.array(
3246
+ z8.object({
3247
+ segment: z8.object({
3248
+ startIndex: z8.number().nullish(),
3249
+ endIndex: z8.number().nullish(),
3250
+ text: z8.string().nullish()
3200
3251
  }).nullish(),
3201
- segment_text: z7.string().nullish(),
3202
- groundingChunkIndices: z7.array(z7.number()).nullish(),
3203
- supportChunkIndices: z7.array(z7.number()).nullish(),
3204
- confidenceScores: z7.array(z7.number()).nullish(),
3205
- confidenceScore: z7.array(z7.number()).nullish()
3252
+ segment_text: z8.string().nullish(),
3253
+ groundingChunkIndices: z8.array(z8.number()).nullish(),
3254
+ supportChunkIndices: z8.array(z8.number()).nullish(),
3255
+ confidenceScores: z8.array(z8.number()).nullish(),
3256
+ confidenceScore: z8.array(z8.number()).nullish()
3206
3257
  })
3207
3258
  ).nullish(),
3208
- retrievalMetadata: z7.union([
3209
- z7.object({
3210
- webDynamicRetrievalScore: z7.number()
3259
+ retrievalMetadata: z8.union([
3260
+ z8.object({
3261
+ webDynamicRetrievalScore: z8.number()
3211
3262
  }),
3212
- z7.object({})
3263
+ z8.object({})
3213
3264
  ]).nullish()
3214
3265
  });
3215
- var partialArgSchema = () => z7.object({
3216
- jsonPath: z7.string(),
3217
- stringValue: z7.string().nullish(),
3218
- numberValue: z7.number().nullish(),
3219
- boolValue: z7.boolean().nullish(),
3220
- nullValue: z7.unknown().nullish(),
3221
- willContinue: z7.boolean().nullish()
3266
+ var partialArgSchema = () => z8.object({
3267
+ jsonPath: z8.string(),
3268
+ stringValue: z8.string().nullish(),
3269
+ numberValue: z8.number().nullish(),
3270
+ boolValue: z8.boolean().nullish(),
3271
+ nullValue: z8.unknown().nullish(),
3272
+ willContinue: z8.boolean().nullish()
3222
3273
  });
3223
- var getContentSchema = () => z7.object({
3224
- parts: z7.array(
3225
- z7.union([
3274
+ var getContentSchema = () => z8.object({
3275
+ parts: z8.array(
3276
+ z8.union([
3226
3277
  // note: order matters since text can be fully empty
3227
- z7.object({
3228
- functionCall: z7.object({
3229
- id: z7.string().nullish(),
3230
- name: z7.string().nullish(),
3231
- args: z7.unknown().nullish(),
3232
- partialArgs: z7.array(partialArgSchema()).nullish(),
3233
- willContinue: z7.boolean().nullish()
3278
+ z8.object({
3279
+ functionCall: z8.object({
3280
+ id: z8.string().nullish(),
3281
+ name: z8.string().nullish(),
3282
+ args: z8.unknown().nullish(),
3283
+ partialArgs: z8.array(partialArgSchema()).nullish(),
3284
+ willContinue: z8.boolean().nullish()
3234
3285
  }),
3235
- thoughtSignature: z7.string().nullish()
3286
+ thoughtSignature: z8.string().nullish()
3236
3287
  }),
3237
- z7.object({
3238
- inlineData: z7.object({
3239
- mimeType: z7.string(),
3240
- data: z7.string()
3288
+ z8.object({
3289
+ inlineData: z8.object({
3290
+ mimeType: z8.string(),
3291
+ data: z8.string()
3241
3292
  }),
3242
- thought: z7.boolean().nullish(),
3243
- thoughtSignature: z7.string().nullish()
3293
+ thought: z8.boolean().nullish(),
3294
+ thoughtSignature: z8.string().nullish()
3244
3295
  }),
3245
- z7.object({
3246
- toolCall: z7.object({
3247
- toolType: z7.string(),
3248
- args: z7.unknown().nullish(),
3249
- id: z7.string()
3296
+ z8.object({
3297
+ toolCall: z8.object({
3298
+ toolType: z8.string(),
3299
+ args: z8.unknown().nullish(),
3300
+ id: z8.string()
3250
3301
  }),
3251
- thoughtSignature: z7.string().nullish()
3302
+ thoughtSignature: z8.string().nullish()
3252
3303
  }),
3253
- z7.object({
3254
- toolResponse: z7.object({
3255
- toolType: z7.string(),
3256
- response: z7.unknown().nullish(),
3257
- id: z7.string()
3304
+ z8.object({
3305
+ toolResponse: z8.object({
3306
+ toolType: z8.string(),
3307
+ response: z8.unknown().nullish(),
3308
+ id: z8.string()
3258
3309
  }),
3259
- thoughtSignature: z7.string().nullish()
3310
+ thoughtSignature: z8.string().nullish()
3260
3311
  }),
3261
- z7.object({
3262
- executableCode: z7.object({
3263
- language: z7.string(),
3264
- code: z7.string()
3312
+ z8.object({
3313
+ executableCode: z8.object({
3314
+ language: z8.string(),
3315
+ code: z8.string()
3265
3316
  }).nullish(),
3266
- codeExecutionResult: z7.object({
3267
- outcome: z7.string(),
3268
- output: z7.string().nullish()
3317
+ codeExecutionResult: z8.object({
3318
+ outcome: z8.string(),
3319
+ output: z8.string().nullish()
3269
3320
  }).nullish(),
3270
- text: z7.string().nullish(),
3271
- thought: z7.boolean().nullish(),
3272
- thoughtSignature: z7.string().nullish()
3321
+ text: z8.string().nullish(),
3322
+ thought: z8.boolean().nullish(),
3323
+ thoughtSignature: z8.string().nullish()
3273
3324
  })
3274
3325
  ])
3275
3326
  ).nullish()
3276
3327
  });
3277
- var getSafetyRatingSchema = () => z7.object({
3278
- category: z7.string().nullish(),
3279
- probability: z7.string().nullish(),
3280
- probabilityScore: z7.number().nullish(),
3281
- severity: z7.string().nullish(),
3282
- severityScore: z7.number().nullish(),
3283
- blocked: z7.boolean().nullish()
3328
+ var getSafetyRatingSchema = () => z8.object({
3329
+ category: z8.string().nullish(),
3330
+ probability: z8.string().nullish(),
3331
+ probabilityScore: z8.number().nullish(),
3332
+ severity: z8.string().nullish(),
3333
+ severityScore: z8.number().nullish(),
3334
+ blocked: z8.boolean().nullish()
3284
3335
  });
3285
- var tokenDetailsSchema = () => z7.array(
3286
- z7.object({
3287
- modality: z7.string(),
3288
- tokenCount: z7.number()
3289
- }).catchall(z7.json())
3336
+ var tokenDetailsSchema = () => z8.array(
3337
+ z8.object({
3338
+ modality: z8.string(),
3339
+ tokenCount: z8.number()
3340
+ }).catchall(z8.json())
3290
3341
  ).nullish();
3291
- var usageSchema = () => z7.object({
3292
- cachedContentTokenCount: z7.number().nullish(),
3293
- thoughtsTokenCount: z7.number().nullish(),
3294
- promptTokenCount: z7.number().nullish(),
3295
- candidatesTokenCount: z7.number().nullish(),
3296
- toolUsePromptTokenCount: z7.number().nullish(),
3297
- totalTokenCount: z7.number().nullish(),
3342
+ var usageSchema = () => z8.object({
3343
+ cachedContentTokenCount: z8.number().nullish(),
3344
+ thoughtsTokenCount: z8.number().nullish(),
3345
+ promptTokenCount: z8.number().nullish(),
3346
+ candidatesTokenCount: z8.number().nullish(),
3347
+ toolUsePromptTokenCount: z8.number().nullish(),
3348
+ totalTokenCount: z8.number().nullish(),
3298
3349
  // https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
3299
- trafficType: z7.string().nullish(),
3300
- serviceTier: z7.string().nullish(),
3350
+ trafficType: z8.string().nullish(),
3351
+ serviceTier: z8.string().nullish(),
3301
3352
  // https://ai.google.dev/api/generate-content#Modality
3302
3353
  promptTokensDetails: tokenDetailsSchema(),
3303
3354
  cacheTokensDetails: tokenDetailsSchema(),
3304
3355
  candidatesTokensDetails: tokenDetailsSchema(),
3305
3356
  toolUsePromptTokensDetails: tokenDetailsSchema()
3306
- }).catchall(z7.json());
3307
- var getUrlContextMetadataSchema = () => z7.object({
3308
- urlMetadata: z7.array(
3309
- z7.object({
3310
- retrievedUrl: z7.string(),
3311
- urlRetrievalStatus: z7.string()
3357
+ }).catchall(z8.json());
3358
+ var getUrlContextMetadataSchema = () => z8.object({
3359
+ urlMetadata: z8.array(
3360
+ z8.object({
3361
+ retrievedUrl: z8.string(),
3362
+ urlRetrievalStatus: z8.string()
3312
3363
  })
3313
3364
  ).nullish()
3314
3365
  });
3315
3366
  var responseSchema = lazySchema7(
3316
3367
  () => zodSchema7(
3317
- z7.object({
3318
- responseId: z7.string().nullish(),
3319
- candidates: z7.array(
3320
- z7.object({
3321
- content: getContentSchema().nullish().or(z7.object({}).strict()),
3322
- finishReason: z7.string().nullish(),
3323
- finishMessage: z7.string().nullish(),
3324
- continuationToken: z7.string().nullish(),
3325
- safetyRatings: z7.array(getSafetyRatingSchema()).nullish(),
3368
+ z8.object({
3369
+ responseId: z8.string().nullish(),
3370
+ candidates: z8.array(
3371
+ z8.object({
3372
+ content: getContentSchema().nullish().or(z8.object({}).strict()),
3373
+ finishReason: z8.string().nullish(),
3374
+ finishMessage: z8.string().nullish(),
3375
+ continuationToken: z8.string().nullish(),
3376
+ safetyRatings: z8.array(getSafetyRatingSchema()).nullish(),
3326
3377
  groundingMetadata: getGroundingMetadataSchema().nullish(),
3327
3378
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
3328
3379
  })
3329
3380
  ).nullish(),
3330
3381
  usageMetadata: usageSchema().nullish(),
3331
- promptFeedback: z7.object({
3332
- blockReason: z7.string().nullish(),
3333
- safetyRatings: z7.array(getSafetyRatingSchema()).nullish()
3382
+ promptFeedback: z8.object({
3383
+ blockReason: z8.string().nullish(),
3384
+ safetyRatings: z8.array(getSafetyRatingSchema()).nullish()
3334
3385
  }).nullish()
3335
3386
  })
3336
3387
  )
3337
3388
  );
3338
3389
  var chunkSchema = lazySchema7(
3339
3390
  () => zodSchema7(
3340
- z7.object({
3341
- responseId: z7.string().nullish(),
3342
- candidates: z7.array(
3343
- z7.object({
3391
+ z8.object({
3392
+ responseId: z8.string().nullish(),
3393
+ candidates: z8.array(
3394
+ z8.object({
3344
3395
  content: getContentSchema().nullish(),
3345
- finishReason: z7.string().nullish(),
3346
- finishMessage: z7.string().nullish(),
3347
- continuationToken: z7.string().nullish(),
3348
- safetyRatings: z7.array(getSafetyRatingSchema()).nullish(),
3396
+ finishReason: z8.string().nullish(),
3397
+ finishMessage: z8.string().nullish(),
3398
+ continuationToken: z8.string().nullish(),
3399
+ safetyRatings: z8.array(getSafetyRatingSchema()).nullish(),
3349
3400
  groundingMetadata: getGroundingMetadataSchema().nullish(),
3350
3401
  urlContextMetadata: getUrlContextMetadataSchema().nullish()
3351
3402
  })
3352
3403
  ).nullish(),
3353
3404
  usageMetadata: usageSchema().nullish(),
3354
- promptFeedback: z7.object({
3355
- blockReason: z7.string().nullish(),
3356
- safetyRatings: z7.array(getSafetyRatingSchema()).nullish()
3405
+ promptFeedback: z8.object({
3406
+ blockReason: z8.string().nullish(),
3407
+ safetyRatings: z8.array(getSafetyRatingSchema()).nullish()
3357
3408
  }).nullish()
3358
3409
  })
3359
3410
  )
@@ -3364,16 +3415,16 @@ function isConfirmedPromptBlockReason(blockReason) {
3364
3415
 
3365
3416
  // src/tool/code-execution.ts
3366
3417
  import { createProviderToolFactoryWithOutputSchema } from "@ai-sdk/provider-utils";
3367
- import { z as z8 } from "zod/v4";
3418
+ import { z as z9 } from "zod/v4";
3368
3419
  var codeExecution = createProviderToolFactoryWithOutputSchema({
3369
3420
  id: "google.code_execution",
3370
- inputSchema: z8.object({
3371
- language: z8.string().describe("The programming language of the code."),
3372
- code: z8.string().describe("The code to be executed.")
3421
+ inputSchema: z9.object({
3422
+ language: z9.string().describe("The programming language of the code."),
3423
+ code: z9.string().describe("The code to be executed.")
3373
3424
  }),
3374
- outputSchema: z8.object({
3375
- outcome: z8.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),
3376
- output: z8.string().describe("The output from the code execution.")
3425
+ outputSchema: z9.object({
3426
+ outcome: z9.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),
3427
+ output: z9.string().describe("The output from the code execution.")
3377
3428
  })
3378
3429
  });
3379
3430
 
@@ -3383,10 +3434,10 @@ import {
3383
3434
  lazySchema as lazySchema8,
3384
3435
  zodSchema as zodSchema8
3385
3436
  } from "@ai-sdk/provider-utils";
3386
- import { z as z9 } from "zod/v4";
3437
+ import { z as z10 } from "zod/v4";
3387
3438
  var enterpriseWebSearch = createProviderToolFactory({
3388
3439
  id: "google.enterprise_web_search",
3389
- inputSchema: lazySchema8(() => zodSchema8(z9.object({})))
3440
+ inputSchema: lazySchema8(() => zodSchema8(z10.object({})))
3390
3441
  });
3391
3442
 
3392
3443
  // src/tool/file-search.ts
@@ -3395,20 +3446,20 @@ import {
3395
3446
  lazySchema as lazySchema9,
3396
3447
  zodSchema as zodSchema9
3397
3448
  } from "@ai-sdk/provider-utils";
3398
- import { z as z10 } from "zod/v4";
3399
- var fileSearchArgsBaseSchema = () => z10.object({
3449
+ import { z as z11 } from "zod/v4";
3450
+ var fileSearchArgsBaseSchema = () => z11.object({
3400
3451
  /** The names of the file_search_stores to retrieve from.
3401
3452
  * Example: `fileSearchStores/my-file-search-store-123`
3402
3453
  */
3403
- fileSearchStoreNames: z10.array(z10.string()).describe(
3454
+ fileSearchStoreNames: z11.array(z11.string()).describe(
3404
3455
  "The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"
3405
3456
  ),
3406
3457
  /** The number of file search retrieval chunks to retrieve. */
3407
- topK: z10.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),
3458
+ topK: z11.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),
3408
3459
  /** Metadata filter to apply to the file search retrieval documents.
3409
3460
  * See https://google.aip.dev/160 for the syntax of the filter expression.
3410
3461
  */
3411
- metadataFilter: z10.string().describe(
3462
+ metadataFilter: z11.string().describe(
3412
3463
  "Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression."
3413
3464
  ).optional()
3414
3465
  }).passthrough();
@@ -3426,10 +3477,10 @@ import {
3426
3477
  lazySchema as lazySchema10,
3427
3478
  zodSchema as zodSchema10
3428
3479
  } from "@ai-sdk/provider-utils";
3429
- import { z as z11 } from "zod/v4";
3480
+ import { z as z12 } from "zod/v4";
3430
3481
  var googleMaps = createProviderToolFactory3({
3431
3482
  id: "google.google_maps",
3432
- inputSchema: lazySchema10(() => zodSchema10(z11.object({})))
3483
+ inputSchema: lazySchema10(() => zodSchema10(z12.object({})))
3433
3484
  });
3434
3485
 
3435
3486
  // src/tool/google-search.ts
@@ -3438,15 +3489,15 @@ import {
3438
3489
  lazySchema as lazySchema11,
3439
3490
  zodSchema as zodSchema11
3440
3491
  } from "@ai-sdk/provider-utils";
3441
- import { z as z12 } from "zod/v4";
3442
- var googleSearchToolArgsBaseSchema = () => z12.object({
3443
- searchTypes: z12.object({
3444
- webSearch: z12.object({}).optional(),
3445
- imageSearch: z12.object({}).optional()
3492
+ import { z as z13 } from "zod/v4";
3493
+ var googleSearchToolArgsBaseSchema = () => z13.object({
3494
+ searchTypes: z13.object({
3495
+ webSearch: z13.object({}).optional(),
3496
+ imageSearch: z13.object({}).optional()
3446
3497
  }).optional(),
3447
- timeRangeFilter: z12.object({
3448
- startTime: z12.string(),
3449
- endTime: z12.string()
3498
+ timeRangeFilter: z13.object({
3499
+ startTime: z13.string(),
3500
+ endTime: z13.string()
3450
3501
  }).optional()
3451
3502
  }).passthrough();
3452
3503
  var googleSearchToolArgsSchema = lazySchema11(
@@ -3465,20 +3516,20 @@ import {
3465
3516
  lazySchema as lazySchema12,
3466
3517
  zodSchema as zodSchema12
3467
3518
  } from "@ai-sdk/provider-utils";
3468
- import { z as z13 } from "zod/v4";
3519
+ import { z as z14 } from "zod/v4";
3469
3520
  var urlContext = createProviderToolFactory5({
3470
3521
  id: "google.url_context",
3471
- inputSchema: lazySchema12(() => zodSchema12(z13.object({})))
3522
+ inputSchema: lazySchema12(() => zodSchema12(z14.object({})))
3472
3523
  });
3473
3524
 
3474
3525
  // src/tool/vertex-rag-store.ts
3475
3526
  import { createProviderToolFactory as createProviderToolFactory6 } from "@ai-sdk/provider-utils";
3476
- import { z as z14 } from "zod/v4";
3527
+ import { z as z15 } from "zod/v4";
3477
3528
  var vertexRagStore = createProviderToolFactory6({
3478
3529
  id: "google.vertex_rag_store",
3479
- inputSchema: z14.object({
3480
- ragCorpus: z14.string(),
3481
- topK: z14.number().optional()
3530
+ inputSchema: z15.object({
3531
+ ragCorpus: z15.string(),
3532
+ topK: z15.number().optional()
3482
3533
  })
3483
3534
  });
3484
3535
 
@@ -3554,7 +3605,7 @@ import {
3554
3605
  resolve as resolve4,
3555
3606
  zodSchema as zodSchema13
3556
3607
  } from "@ai-sdk/provider-utils";
3557
- import { z as z15 } from "zod/v4";
3608
+ import { z as z16 } from "zod/v4";
3558
3609
  var GoogleGenerativeAIImageModel = class {
3559
3610
  constructor(modelId, settings, config) {
3560
3611
  this.modelId = modelId;
@@ -3810,11 +3861,11 @@ function isGeminiModel(modelId) {
3810
3861
  }
3811
3862
  var googleImageResponseSchema = lazySchema13(
3812
3863
  () => zodSchema13(
3813
- z15.object({
3814
- predictions: z15.array(
3815
- z15.union([
3816
- z15.object({ bytesBase64Encoded: z15.string() }),
3817
- z15.object({ raiFilteredReason: z15.string() })
3864
+ z16.object({
3865
+ predictions: z16.array(
3866
+ z16.union([
3867
+ z16.object({ bytesBase64Encoded: z16.string() }),
3868
+ z16.object({ raiFilteredReason: z16.string() })
3818
3869
  ])
3819
3870
  ).default([])
3820
3871
  })
@@ -3822,9 +3873,9 @@ var googleImageResponseSchema = lazySchema13(
3822
3873
  );
3823
3874
  var googleImageModelOptionsSchema = lazySchema13(
3824
3875
  () => zodSchema13(
3825
- z15.object({
3826
- personGeneration: z15.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
3827
- aspectRatio: z15.enum(["1:1", "3:4", "4:3", "9:16", "16:9"]).nullish(),
3876
+ z16.object({
3877
+ personGeneration: z16.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
3878
+ aspectRatio: z16.enum(["1:1", "3:4", "4:3", "9:16", "16:9"]).nullish(),
3828
3879
  /**
3829
3880
  * Enable Google Search grounding for Gemini image models. The value is
3830
3881
  * forwarded as the args of the `google.tools.googleSearch` provider
@@ -3856,7 +3907,7 @@ import {
3856
3907
  resolve as resolve5,
3857
3908
  zodSchema as zodSchema14
3858
3909
  } from "@ai-sdk/provider-utils";
3859
- import { z as z16 } from "zod/v4";
3910
+ import { z as z17 } from "zod/v4";
3860
3911
  function getFirstFrameImage(options) {
3861
3912
  var _a2, _b;
3862
3913
  return (_b = (_a2 = options.frameImages) == null ? void 0 : _a2.find((frame) => frame.frameType === "first_frame")) == null ? void 0 : _b.image;
@@ -4123,20 +4174,20 @@ var GoogleGenerativeAIVideoModel = class {
4123
4174
  };
4124
4175
  var googleOperationSchema = lazySchema14(
4125
4176
  () => zodSchema14(
4126
- z16.object({
4127
- name: z16.string().nullish(),
4128
- done: z16.boolean().nullish(),
4129
- error: z16.object({
4130
- code: z16.number().nullish(),
4131
- message: z16.string(),
4132
- status: z16.string().nullish()
4177
+ z17.object({
4178
+ name: z17.string().nullish(),
4179
+ done: z17.boolean().nullish(),
4180
+ error: z17.object({
4181
+ code: z17.number().nullish(),
4182
+ message: z17.string(),
4183
+ status: z17.string().nullish()
4133
4184
  }).nullish(),
4134
- response: z16.object({
4135
- generateVideoResponse: z16.object({
4136
- generatedSamples: z16.array(
4137
- z16.object({
4138
- video: z16.object({
4139
- uri: z16.string().nullish()
4185
+ response: z17.object({
4186
+ generateVideoResponse: z17.object({
4187
+ generatedSamples: z17.array(
4188
+ z17.object({
4189
+ video: z17.object({
4190
+ uri: z17.string().nullish()
4140
4191
  }).nullish()
4141
4192
  })
4142
4193
  ).nullish()
@@ -4147,15 +4198,15 @@ var googleOperationSchema = lazySchema14(
4147
4198
  );
4148
4199
  var googleVideoModelOptionsSchema = lazySchema14(
4149
4200
  () => zodSchema14(
4150
- z16.object({
4151
- pollIntervalMs: z16.number().positive().nullish(),
4152
- pollTimeoutMs: z16.number().positive().nullish(),
4153
- personGeneration: z16.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
4154
- negativePrompt: z16.string().nullish(),
4155
- referenceImages: z16.array(
4156
- z16.object({
4157
- bytesBase64Encoded: z16.string().nullish(),
4158
- gcsUri: z16.string().nullish()
4201
+ z17.object({
4202
+ pollIntervalMs: z17.number().positive().nullish(),
4203
+ pollTimeoutMs: z17.number().positive().nullish(),
4204
+ personGeneration: z17.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
4205
+ negativePrompt: z17.string().nullish(),
4206
+ referenceImages: z17.array(
4207
+ z17.object({
4208
+ bytesBase64Encoded: z17.string().nullish(),
4209
+ gcsUri: z17.string().nullish()
4159
4210
  })
4160
4211
  ).nullish()
4161
4212
  }).passthrough()
@@ -5331,30 +5382,30 @@ import {
5331
5382
  lazySchema as lazySchema15,
5332
5383
  zodSchema as zodSchema15
5333
5384
  } from "@ai-sdk/provider-utils";
5334
- import { z as z17 } from "zod/v4";
5335
- var tokenByModalitySchema = () => z17.object({
5336
- modality: z17.string().nullish(),
5337
- tokens: z17.number().nullish()
5385
+ import { z as z18 } from "zod/v4";
5386
+ var tokenByModalitySchema = () => z18.object({
5387
+ modality: z18.string().nullish(),
5388
+ tokens: z18.number().nullish()
5338
5389
  }).loose();
5339
- var usageSchema2 = () => z17.object({
5340
- total_input_tokens: z17.number().nullish(),
5341
- total_output_tokens: z17.number().nullish(),
5342
- total_thought_tokens: z17.number().nullish(),
5343
- total_cached_tokens: z17.number().nullish(),
5344
- total_tool_use_tokens: z17.number().nullish(),
5345
- total_tokens: z17.number().nullish(),
5346
- input_tokens_by_modality: z17.array(tokenByModalitySchema()).nullish(),
5347
- output_tokens_by_modality: z17.array(tokenByModalitySchema()).nullish(),
5348
- cached_tokens_by_modality: z17.array(tokenByModalitySchema()).nullish(),
5349
- tool_use_tokens_by_modality: z17.array(tokenByModalitySchema()).nullish(),
5350
- grounding_tool_count: z17.array(
5351
- z17.object({
5352
- type: z17.string().nullish(),
5353
- count: z17.number().nullish()
5390
+ var usageSchema2 = () => z18.object({
5391
+ total_input_tokens: z18.number().nullish(),
5392
+ total_output_tokens: z18.number().nullish(),
5393
+ total_thought_tokens: z18.number().nullish(),
5394
+ total_cached_tokens: z18.number().nullish(),
5395
+ total_tool_use_tokens: z18.number().nullish(),
5396
+ total_tokens: z18.number().nullish(),
5397
+ input_tokens_by_modality: z18.array(tokenByModalitySchema()).nullish(),
5398
+ output_tokens_by_modality: z18.array(tokenByModalitySchema()).nullish(),
5399
+ cached_tokens_by_modality: z18.array(tokenByModalitySchema()).nullish(),
5400
+ tool_use_tokens_by_modality: z18.array(tokenByModalitySchema()).nullish(),
5401
+ grounding_tool_count: z18.array(
5402
+ z18.object({
5403
+ type: z18.string().nullish(),
5404
+ count: z18.number().nullish()
5354
5405
  }).loose()
5355
5406
  ).nullish()
5356
5407
  }).loose();
5357
- var interactionStatusSchema = () => z17.enum([
5408
+ var interactionStatusSchema = () => z18.enum([
5358
5409
  "in_progress",
5359
5410
  "requires_action",
5360
5411
  "completed",
@@ -5363,69 +5414,69 @@ var interactionStatusSchema = () => z17.enum([
5363
5414
  "incomplete"
5364
5415
  ]);
5365
5416
  var annotationSchema = () => {
5366
- const urlCitation = z17.object({
5367
- type: z17.literal("url_citation"),
5368
- url: z17.string().nullish(),
5369
- title: z17.string().nullish(),
5370
- start_index: z17.number().nullish(),
5371
- end_index: z17.number().nullish()
5417
+ const urlCitation = z18.object({
5418
+ type: z18.literal("url_citation"),
5419
+ url: z18.string().nullish(),
5420
+ title: z18.string().nullish(),
5421
+ start_index: z18.number().nullish(),
5422
+ end_index: z18.number().nullish()
5372
5423
  }).loose();
5373
- const fileCitation = z17.object({
5374
- type: z17.literal("file_citation"),
5375
- file_name: z17.string().nullish(),
5376
- document_uri: z17.string().nullish(),
5377
- url: z17.string().nullish(),
5378
- page_number: z17.number().nullish(),
5379
- media_id: z17.string().nullish(),
5380
- start_index: z17.number().nullish(),
5381
- end_index: z17.number().nullish(),
5382
- custom_metadata: z17.record(z17.string(), z17.unknown()).nullish()
5424
+ const fileCitation = z18.object({
5425
+ type: z18.literal("file_citation"),
5426
+ file_name: z18.string().nullish(),
5427
+ document_uri: z18.string().nullish(),
5428
+ url: z18.string().nullish(),
5429
+ page_number: z18.number().nullish(),
5430
+ media_id: z18.string().nullish(),
5431
+ start_index: z18.number().nullish(),
5432
+ end_index: z18.number().nullish(),
5433
+ custom_metadata: z18.record(z18.string(), z18.unknown()).nullish()
5383
5434
  }).loose();
5384
- const placeCitation = z17.object({
5385
- type: z17.literal("place_citation"),
5386
- name: z17.string().nullish(),
5387
- url: z17.string().nullish(),
5388
- place_id: z17.string().nullish(),
5389
- start_index: z17.number().nullish(),
5390
- end_index: z17.number().nullish()
5435
+ const placeCitation = z18.object({
5436
+ type: z18.literal("place_citation"),
5437
+ name: z18.string().nullish(),
5438
+ url: z18.string().nullish(),
5439
+ place_id: z18.string().nullish(),
5440
+ start_index: z18.number().nullish(),
5441
+ end_index: z18.number().nullish()
5391
5442
  }).loose();
5392
- return z17.union([
5443
+ return z18.union([
5393
5444
  urlCitation,
5394
5445
  fileCitation,
5395
5446
  placeCitation,
5396
- z17.object({ type: z17.string() }).loose()
5447
+ z18.object({ type: z18.string() }).loose()
5397
5448
  ]);
5398
5449
  };
5399
- var thoughtSummaryItemSchema = () => z17.object({
5400
- type: z17.string(),
5401
- text: z17.string().nullish(),
5402
- data: z17.string().nullish(),
5403
- mime_type: z17.string().nullish()
5450
+ var thoughtSummaryItemSchema = () => z18.object({
5451
+ type: z18.string(),
5452
+ text: z18.string().nullish(),
5453
+ data: z18.string().nullish(),
5454
+ mime_type: z18.string().nullish()
5404
5455
  }).loose();
5405
5456
  var contentBlockSchema = () => {
5406
- const textContent = z17.object({
5407
- type: z17.literal("text"),
5408
- text: z17.string(),
5409
- annotations: z17.array(annotationSchema()).nullish()
5457
+ const textContent = z18.object({
5458
+ type: z18.literal("text"),
5459
+ text: z18.string(),
5460
+ annotations: z18.array(annotationSchema()).nullish()
5410
5461
  }).loose();
5411
- const imageContent = z17.object({
5412
- type: z17.literal("image"),
5413
- data: z17.string().nullish(),
5414
- mime_type: z17.string().nullish(),
5415
- resolution: z17.enum(["low", "medium", "high", "ultra_high"]).nullish(),
5416
- uri: z17.string().nullish()
5462
+ const imageContent = z18.object({
5463
+ type: z18.literal("image"),
5464
+ data: z18.string().nullish(),
5465
+ mime_type: z18.string().nullish(),
5466
+ resolution: z18.enum(["low", "medium", "high", "ultra_high"]).nullish(),
5467
+ uri: z18.string().nullish()
5417
5468
  }).loose();
5418
- const videoContent = z17.object({
5419
- type: z17.literal("video"),
5420
- data: z17.string().nullish(),
5421
- mime_type: z17.string().nullish(),
5422
- uri: z17.string().nullish()
5469
+ const videoContent = z18.object({
5470
+ type: z18.literal("video"),
5471
+ data: z18.string().nullish(),
5472
+ mime_type: z18.string().nullish(),
5473
+ uri: z18.string().nullish()
5423
5474
  }).loose();
5424
- return z17.union([
5475
+ return z18.union([
5425
5476
  textContent,
5426
5477
  imageContent,
5427
5478
  videoContent,
5428
- z17.object({ type: z17.string() }).loose()
5479
+ z18.object({ type: z18.string() }).loose()
5429
5480
  ]);
5430
5481
  };
5431
5482
  var BUILTIN_TOOL_CALL_STEP_TYPES = [
@@ -5445,73 +5496,73 @@ var BUILTIN_TOOL_RESULT_STEP_TYPES = [
5445
5496
  "mcp_server_tool_result"
5446
5497
  ];
5447
5498
  var stepSchema = () => {
5448
- const userInputStep = z17.object({
5449
- type: z17.literal("user_input"),
5450
- content: z17.array(contentBlockSchema()).nullish()
5499
+ const userInputStep = z18.object({
5500
+ type: z18.literal("user_input"),
5501
+ content: z18.array(contentBlockSchema()).nullish()
5451
5502
  }).loose();
5452
- const modelOutputStep = z17.object({
5453
- type: z17.literal("model_output"),
5454
- content: z17.array(contentBlockSchema()).nullish()
5503
+ const modelOutputStep = z18.object({
5504
+ type: z18.literal("model_output"),
5505
+ content: z18.array(contentBlockSchema()).nullish()
5455
5506
  }).loose();
5456
- const functionCallStep = z17.object({
5457
- type: z17.literal("function_call"),
5458
- id: z17.string(),
5459
- name: z17.string(),
5460
- arguments: z17.record(z17.string(), z17.unknown()).nullish(),
5461
- signature: z17.string().nullish()
5507
+ const functionCallStep = z18.object({
5508
+ type: z18.literal("function_call"),
5509
+ id: z18.string(),
5510
+ name: z18.string(),
5511
+ arguments: z18.record(z18.string(), z18.unknown()).nullish(),
5512
+ signature: z18.string().nullish()
5462
5513
  }).loose();
5463
- const thoughtStep = z17.object({
5464
- type: z17.literal("thought"),
5465
- signature: z17.string().nullish(),
5466
- summary: z17.array(thoughtSummaryItemSchema()).nullish()
5514
+ const thoughtStep = z18.object({
5515
+ type: z18.literal("thought"),
5516
+ signature: z18.string().nullish(),
5517
+ summary: z18.array(thoughtSummaryItemSchema()).nullish()
5467
5518
  }).loose();
5468
- const builtinToolCallStep = z17.object({
5469
- type: z17.enum(BUILTIN_TOOL_CALL_STEP_TYPES),
5470
- id: z17.string(),
5471
- arguments: z17.record(z17.string(), z17.unknown()).nullish(),
5472
- name: z17.string().nullish(),
5473
- server_name: z17.string().nullish(),
5474
- search_type: z17.string().nullish(),
5475
- signature: z17.string().nullish()
5519
+ const builtinToolCallStep = z18.object({
5520
+ type: z18.enum(BUILTIN_TOOL_CALL_STEP_TYPES),
5521
+ id: z18.string(),
5522
+ arguments: z18.record(z18.string(), z18.unknown()).nullish(),
5523
+ name: z18.string().nullish(),
5524
+ server_name: z18.string().nullish(),
5525
+ search_type: z18.string().nullish(),
5526
+ signature: z18.string().nullish()
5476
5527
  }).loose();
5477
- const builtinToolResultStep = z17.object({
5478
- type: z17.enum(BUILTIN_TOOL_RESULT_STEP_TYPES),
5479
- call_id: z17.string(),
5480
- result: z17.unknown().nullish(),
5481
- is_error: z17.boolean().nullish(),
5482
- name: z17.string().nullish(),
5483
- server_name: z17.string().nullish(),
5484
- signature: z17.string().nullish()
5528
+ const builtinToolResultStep = z18.object({
5529
+ type: z18.enum(BUILTIN_TOOL_RESULT_STEP_TYPES),
5530
+ call_id: z18.string(),
5531
+ result: z18.unknown().nullish(),
5532
+ is_error: z18.boolean().nullish(),
5533
+ name: z18.string().nullish(),
5534
+ server_name: z18.string().nullish(),
5535
+ signature: z18.string().nullish()
5485
5536
  }).loose();
5486
- return z17.union([
5537
+ return z18.union([
5487
5538
  userInputStep,
5488
5539
  modelOutputStep,
5489
5540
  functionCallStep,
5490
5541
  thoughtStep,
5491
5542
  builtinToolCallStep,
5492
5543
  builtinToolResultStep,
5493
- z17.object({ type: z17.string() }).loose()
5544
+ z18.object({ type: z18.string() }).loose()
5494
5545
  ]);
5495
5546
  };
5496
5547
  var googleInteractionsResponseSchema = lazySchema15(
5497
5548
  () => zodSchema15(
5498
- z17.object({
5549
+ z18.object({
5499
5550
  /*
5500
5551
  * `id` is omitted from the response body when `store: false` (fully
5501
5552
  * stateless mode) — there is no server-side interaction record for the
5502
5553
  * client to reference. `nullish` lets the schema accept that shape.
5503
5554
  */
5504
- id: z17.string().nullish(),
5505
- created: z17.string().nullish(),
5506
- updated: z17.string().nullish(),
5555
+ id: z18.string().nullish(),
5556
+ created: z18.string().nullish(),
5557
+ updated: z18.string().nullish(),
5507
5558
  status: interactionStatusSchema(),
5508
- model: z17.string().nullish(),
5509
- agent: z17.string().nullish(),
5510
- steps: z17.array(stepSchema()).nullish(),
5559
+ model: z18.string().nullish(),
5560
+ agent: z18.string().nullish(),
5561
+ steps: z18.array(stepSchema()).nullish(),
5511
5562
  usage: usageSchema2().nullish(),
5512
- service_tier: z17.string().nullish(),
5513
- previous_interaction_id: z17.string().nullish(),
5514
- response_modalities: z17.array(z17.string()).nullish()
5563
+ service_tier: z18.string().nullish(),
5564
+ previous_interaction_id: z18.string().nullish(),
5565
+ response_modalities: z18.array(z18.string()).nullish()
5515
5566
  }).loose()
5516
5567
  )
5517
5568
  );
@@ -5521,82 +5572,82 @@ var googleInteractionsEventSchema = lazySchema15(
5521
5572
  const status = interactionStatusSchema();
5522
5573
  const annotation = annotationSchema();
5523
5574
  const thoughtSummaryItem = thoughtSummaryItemSchema();
5524
- const interactionCreatedEvent = z17.object({
5525
- event_type: z17.literal("interaction.created"),
5526
- event_id: z17.string().nullish(),
5527
- interaction: z17.object({
5575
+ const interactionCreatedEvent = z18.object({
5576
+ event_type: z18.literal("interaction.created"),
5577
+ event_id: z18.string().nullish(),
5578
+ interaction: z18.object({
5528
5579
  /*
5529
5580
  * `id` is omitted when `store: false` (fully stateless mode);
5530
5581
  * see the matching note on `googleInteractionsResponseSchema.id`.
5531
5582
  */
5532
- id: z17.string().nullish(),
5533
- created: z17.string().nullish(),
5534
- model: z17.string().nullish(),
5535
- agent: z17.string().nullish(),
5583
+ id: z18.string().nullish(),
5584
+ created: z18.string().nullish(),
5585
+ model: z18.string().nullish(),
5586
+ agent: z18.string().nullish(),
5536
5587
  status: status.nullish()
5537
5588
  }).loose()
5538
5589
  }).loose();
5539
- const stepStartEvent = z17.object({
5540
- event_type: z17.literal("step.start"),
5541
- event_id: z17.string().nullish(),
5542
- index: z17.number(),
5590
+ const stepStartEvent = z18.object({
5591
+ event_type: z18.literal("step.start"),
5592
+ event_id: z18.string().nullish(),
5593
+ index: z18.number(),
5543
5594
  step: stepSchema()
5544
5595
  }).loose();
5545
- const stepDeltaText = z17.object({
5546
- type: z17.literal("text"),
5547
- text: z17.string()
5596
+ const stepDeltaText = z18.object({
5597
+ type: z18.literal("text"),
5598
+ text: z18.string()
5548
5599
  }).loose();
5549
- const stepDeltaThoughtSummary = z17.object({
5550
- type: z17.literal("thought_summary"),
5600
+ const stepDeltaThoughtSummary = z18.object({
5601
+ type: z18.literal("thought_summary"),
5551
5602
  content: thoughtSummaryItem.nullish()
5552
5603
  }).loose();
5553
- const stepDeltaThoughtSignature = z17.object({
5554
- type: z17.literal("thought_signature"),
5555
- signature: z17.string().nullish()
5604
+ const stepDeltaThoughtSignature = z18.object({
5605
+ type: z18.literal("thought_signature"),
5606
+ signature: z18.string().nullish()
5556
5607
  }).loose();
5557
- const stepDeltaArgumentsDelta = z17.object({
5558
- type: z17.literal("arguments_delta"),
5559
- arguments: z17.string().nullish(),
5560
- id: z17.string().nullish(),
5561
- signature: z17.string().nullish()
5608
+ const stepDeltaArgumentsDelta = z18.object({
5609
+ type: z18.literal("arguments_delta"),
5610
+ arguments: z18.string().nullish(),
5611
+ id: z18.string().nullish(),
5612
+ signature: z18.string().nullish()
5562
5613
  }).loose();
5563
- const stepDeltaTextAnnotation = z17.object({
5564
- type: z17.enum(["text_annotation_delta", "text_annotation"]),
5565
- annotations: z17.array(annotation).nullish()
5614
+ const stepDeltaTextAnnotation = z18.object({
5615
+ type: z18.enum(["text_annotation_delta", "text_annotation"]),
5616
+ annotations: z18.array(annotation).nullish()
5566
5617
  }).loose();
5567
- const stepDeltaImage = z17.object({
5568
- type: z17.literal("image"),
5569
- data: z17.string().nullish(),
5570
- mime_type: z17.string().nullish(),
5571
- resolution: z17.enum(["low", "medium", "high", "ultra_high"]).nullish(),
5572
- uri: z17.string().nullish()
5618
+ const stepDeltaImage = z18.object({
5619
+ type: z18.literal("image"),
5620
+ data: z18.string().nullish(),
5621
+ mime_type: z18.string().nullish(),
5622
+ resolution: z18.enum(["low", "medium", "high", "ultra_high"]).nullish(),
5623
+ uri: z18.string().nullish()
5573
5624
  }).loose();
5574
- const stepDeltaVideo = z17.object({
5575
- type: z17.literal("video"),
5576
- data: z17.string().nullish(),
5577
- mime_type: z17.string().nullish(),
5578
- uri: z17.string().nullish()
5625
+ const stepDeltaVideo = z18.object({
5626
+ type: z18.literal("video"),
5627
+ data: z18.string().nullish(),
5628
+ mime_type: z18.string().nullish(),
5629
+ uri: z18.string().nullish()
5579
5630
  }).loose();
5580
- const stepDeltaBuiltinToolCall = z17.object({
5581
- type: z17.enum(BUILTIN_TOOL_CALL_STEP_TYPES),
5582
- id: z17.string().nullish(),
5583
- arguments: z17.record(z17.string(), z17.unknown()).nullish(),
5584
- name: z17.string().nullish(),
5585
- server_name: z17.string().nullish(),
5586
- search_type: z17.string().nullish(),
5587
- signature: z17.string().nullish()
5631
+ const stepDeltaBuiltinToolCall = z18.object({
5632
+ type: z18.enum(BUILTIN_TOOL_CALL_STEP_TYPES),
5633
+ id: z18.string().nullish(),
5634
+ arguments: z18.record(z18.string(), z18.unknown()).nullish(),
5635
+ name: z18.string().nullish(),
5636
+ server_name: z18.string().nullish(),
5637
+ search_type: z18.string().nullish(),
5638
+ signature: z18.string().nullish()
5588
5639
  }).loose();
5589
- const stepDeltaBuiltinToolResult = z17.object({
5590
- type: z17.enum(BUILTIN_TOOL_RESULT_STEP_TYPES),
5591
- call_id: z17.string().nullish(),
5592
- result: z17.unknown().nullish(),
5593
- is_error: z17.boolean().nullish(),
5594
- name: z17.string().nullish(),
5595
- server_name: z17.string().nullish(),
5596
- signature: z17.string().nullish()
5640
+ const stepDeltaBuiltinToolResult = z18.object({
5641
+ type: z18.enum(BUILTIN_TOOL_RESULT_STEP_TYPES),
5642
+ call_id: z18.string().nullish(),
5643
+ result: z18.unknown().nullish(),
5644
+ is_error: z18.boolean().nullish(),
5645
+ name: z18.string().nullish(),
5646
+ server_name: z18.string().nullish(),
5647
+ signature: z18.string().nullish()
5597
5648
  }).loose();
5598
- const stepDeltaUnknown = z17.object({ type: z17.string() }).loose();
5599
- const stepDeltaUnion = z17.union([
5649
+ const stepDeltaUnknown = z18.object({ type: z18.string() }).loose();
5650
+ const stepDeltaUnion = z18.union([
5600
5651
  stepDeltaText,
5601
5652
  stepDeltaImage,
5602
5653
  stepDeltaVideo,
@@ -5608,55 +5659,55 @@ var googleInteractionsEventSchema = lazySchema15(
5608
5659
  stepDeltaBuiltinToolResult,
5609
5660
  stepDeltaUnknown
5610
5661
  ]);
5611
- const stepDeltaEvent = z17.object({
5612
- event_type: z17.literal("step.delta"),
5613
- event_id: z17.string().nullish(),
5614
- index: z17.number(),
5662
+ const stepDeltaEvent = z18.object({
5663
+ event_type: z18.literal("step.delta"),
5664
+ event_id: z18.string().nullish(),
5665
+ index: z18.number(),
5615
5666
  delta: stepDeltaUnion
5616
5667
  }).loose();
5617
- const stepStopEvent = z17.object({
5618
- event_type: z17.literal("step.stop"),
5619
- event_id: z17.string().nullish(),
5620
- index: z17.number()
5668
+ const stepStopEvent = z18.object({
5669
+ event_type: z18.literal("step.stop"),
5670
+ event_id: z18.string().nullish(),
5671
+ index: z18.number()
5621
5672
  }).loose();
5622
- const interactionStatusUpdateEvent = z17.object({
5623
- event_type: z17.literal("interaction.status_update"),
5624
- event_id: z17.string().nullish(),
5625
- interaction_id: z17.string().nullish(),
5673
+ const interactionStatusUpdateEvent = z18.object({
5674
+ event_type: z18.literal("interaction.status_update"),
5675
+ event_id: z18.string().nullish(),
5676
+ interaction_id: z18.string().nullish(),
5626
5677
  status: status.nullish()
5627
5678
  }).loose();
5628
- const interactionInProgressEvent = z17.object({
5629
- event_type: z17.literal("interaction.in_progress"),
5630
- event_id: z17.string().nullish(),
5631
- interaction_id: z17.string().nullish(),
5679
+ const interactionInProgressEvent = z18.object({
5680
+ event_type: z18.literal("interaction.in_progress"),
5681
+ event_id: z18.string().nullish(),
5682
+ interaction_id: z18.string().nullish(),
5632
5683
  status: status.nullish()
5633
5684
  }).loose();
5634
- const interactionRequiresActionEvent = z17.object({
5635
- event_type: z17.literal("interaction.requires_action"),
5636
- event_id: z17.string().nullish(),
5637
- interaction_id: z17.string().nullish(),
5685
+ const interactionRequiresActionEvent = z18.object({
5686
+ event_type: z18.literal("interaction.requires_action"),
5687
+ event_id: z18.string().nullish(),
5688
+ interaction_id: z18.string().nullish(),
5638
5689
  status: status.nullish()
5639
5690
  }).loose();
5640
- const interactionCompletedEvent = z17.object({
5641
- event_type: z17.literal("interaction.completed"),
5642
- event_id: z17.string().nullish(),
5643
- interaction: z17.object({
5644
- id: z17.string().nullish(),
5691
+ const interactionCompletedEvent = z18.object({
5692
+ event_type: z18.literal("interaction.completed"),
5693
+ event_id: z18.string().nullish(),
5694
+ interaction: z18.object({
5695
+ id: z18.string().nullish(),
5645
5696
  status: status.nullish(),
5646
5697
  usage: usageSchema2().nullish(),
5647
- service_tier: z17.string().nullish()
5698
+ service_tier: z18.string().nullish()
5648
5699
  }).loose()
5649
5700
  }).loose();
5650
- const errorEvent = z17.object({
5651
- event_type: z17.literal("error"),
5652
- event_id: z17.string().nullish(),
5653
- error: z17.object({
5654
- code: z17.string().nullish(),
5655
- message: z17.string().nullish()
5701
+ const errorEvent = z18.object({
5702
+ event_type: z18.literal("error"),
5703
+ event_id: z18.string().nullish(),
5704
+ error: z18.object({
5705
+ code: z18.string().nullish(),
5706
+ message: z18.string().nullish()
5656
5707
  }).loose().nullish()
5657
5708
  }).loose();
5658
- const unknownEvent = z17.object({ event_type: z17.string() }).loose();
5659
- return z17.union([
5709
+ const unknownEvent = z18.object({ event_type: z18.string() }).loose();
5710
+ return z18.union([
5660
5711
  interactionCreatedEvent,
5661
5712
  stepStartEvent,
5662
5713
  stepDeltaEvent,
@@ -5677,26 +5728,26 @@ import {
5677
5728
  lazySchema as lazySchema16,
5678
5729
  zodSchema as zodSchema16
5679
5730
  } from "@ai-sdk/provider-utils";
5680
- import { z as z18 } from "zod/v4";
5731
+ import { z as z19 } from "zod/v4";
5681
5732
  var googleInteractionsLanguageModelOptions = lazySchema16(
5682
5733
  () => zodSchema16(
5683
- z18.object({
5684
- previousInteractionId: z18.string().nullish(),
5685
- store: z18.boolean().nullish(),
5686
- agent: z18.string().nullish(),
5687
- agentConfig: z18.union([
5688
- z18.object({
5689
- type: z18.literal("dynamic")
5734
+ z19.object({
5735
+ previousInteractionId: z19.string().nullish(),
5736
+ store: z19.boolean().nullish(),
5737
+ agent: z19.string().nullish(),
5738
+ agentConfig: z19.union([
5739
+ z19.object({
5740
+ type: z19.literal("dynamic")
5690
5741
  }).loose(),
5691
- z18.object({
5692
- type: z18.literal("deep-research"),
5693
- thinkingSummaries: z18.enum(["auto", "none"]).nullish(),
5694
- visualization: z18.enum(["off", "auto"]).nullish(),
5695
- collaborativePlanning: z18.boolean().nullish()
5742
+ z19.object({
5743
+ type: z19.literal("deep-research"),
5744
+ thinkingSummaries: z19.enum(["auto", "none"]).nullish(),
5745
+ visualization: z19.enum(["off", "auto"]).nullish(),
5746
+ collaborativePlanning: z19.boolean().nullish()
5696
5747
  })
5697
5748
  ]).nullish(),
5698
- thinkingLevel: z18.enum(["minimal", "low", "medium", "high"]).nullish(),
5699
- thinkingSummaries: z18.enum(["auto", "none"]).nullish(),
5749
+ thinkingLevel: z19.enum(["minimal", "low", "medium", "high"]).nullish(),
5750
+ thinkingSummaries: z19.enum(["auto", "none"]).nullish(),
5700
5751
  /**
5701
5752
  * Output-format entries that map directly to the API's `response_format`
5702
5753
  * array. Use this to request image, audio, video, or non-JSON text
@@ -5706,17 +5757,17 @@ var googleInteractionsLanguageModelOptions = lazySchema16(
5706
5757
  * type: 'json', schema }` still drives JSON-mode and adds a matching
5707
5758
  * text entry automatically; entries listed here are appended.
5708
5759
  */
5709
- responseFormat: z18.array(
5710
- z18.union([
5711
- z18.object({
5712
- type: z18.literal("text"),
5713
- mimeType: z18.string().nullish(),
5714
- schema: z18.unknown().nullish()
5760
+ responseFormat: z19.array(
5761
+ z19.union([
5762
+ z19.object({
5763
+ type: z19.literal("text"),
5764
+ mimeType: z19.string().nullish(),
5765
+ schema: z19.unknown().nullish()
5715
5766
  }).loose(),
5716
- z18.object({
5717
- type: z18.literal("image"),
5718
- mimeType: z18.string().nullish(),
5719
- aspectRatio: z18.enum([
5767
+ z19.object({
5768
+ type: z19.literal("image"),
5769
+ mimeType: z19.string().nullish(),
5770
+ aspectRatio: z19.enum([
5720
5771
  "1:1",
5721
5772
  "2:3",
5722
5773
  "3:2",
@@ -5732,19 +5783,19 @@ var googleInteractionsLanguageModelOptions = lazySchema16(
5732
5783
  "1:4",
5733
5784
  "4:1"
5734
5785
  ]).nullish(),
5735
- imageSize: z18.enum(["1K", "2K", "4K", "512"]).nullish()
5786
+ imageSize: z19.enum(["1K", "2K", "4K", "512"]).nullish()
5736
5787
  }).loose(),
5737
- z18.object({
5738
- type: z18.literal("audio"),
5739
- mimeType: z18.string().nullish()
5788
+ z19.object({
5789
+ type: z19.literal("audio"),
5790
+ mimeType: z19.string().nullish()
5740
5791
  }).loose(),
5741
- z18.object({
5742
- type: z18.literal("video"),
5743
- aspectRatio: z18.enum(["16:9", "9:16"]).nullish(),
5744
- resolution: z18.enum(["360p", "720p", "1080p", "4k"]).nullish(),
5745
- duration: z18.string().nullish(),
5746
- delivery: z18.enum(["inline", "uri"]).nullish(),
5747
- gcsUri: z18.string().nullish()
5792
+ z19.object({
5793
+ type: z19.literal("video"),
5794
+ aspectRatio: z19.enum(["16:9", "9:16"]).nullish(),
5795
+ resolution: z19.enum(["360p", "720p", "1080p", "4k"]).nullish(),
5796
+ duration: z19.string().nullish(),
5797
+ delivery: z19.enum(["inline", "uri"]).nullish(),
5798
+ gcsUri: z19.string().nullish()
5748
5799
  }).loose()
5749
5800
  ])
5750
5801
  ).nullish(),
@@ -5754,8 +5805,8 @@ var googleInteractionsLanguageModelOptions = lazySchema16(
5754
5805
  * translates it into a matching `response_format` image entry and
5755
5806
  * emits a warning when set.
5756
5807
  */
5757
- imageConfig: z18.object({
5758
- aspectRatio: z18.enum([
5808
+ imageConfig: z19.object({
5809
+ aspectRatio: z19.enum([
5759
5810
  "1:1",
5760
5811
  "2:3",
5761
5812
  "3:2",
@@ -5771,35 +5822,35 @@ var googleInteractionsLanguageModelOptions = lazySchema16(
5771
5822
  "1:4",
5772
5823
  "4:1"
5773
5824
  ]).nullish(),
5774
- imageSize: z18.enum(["1K", "2K", "4K", "512"]).nullish()
5825
+ imageSize: z19.enum(["1K", "2K", "4K", "512"]).nullish()
5775
5826
  }).nullish(),
5776
- mediaResolution: z18.enum(["low", "medium", "high", "ultra_high"]).nullish(),
5777
- responseModalities: z18.array(z18.enum(["text", "image", "audio", "video", "document"])).nullish(),
5778
- serviceTier: z18.enum(["flex", "standard", "priority"]).nullish(),
5827
+ mediaResolution: z19.enum(["low", "medium", "high", "ultra_high"]).nullish(),
5828
+ responseModalities: z19.array(z19.enum(["text", "image", "audio", "video", "document"])).nullish(),
5829
+ serviceTier: z19.enum(["flex", "standard", "priority"]).nullish(),
5779
5830
  /**
5780
5831
  * Alternative to AI SDK `system` message. If both are set, the AI SDK
5781
5832
  * `system` message wins and a warning is emitted.
5782
5833
  */
5783
- systemInstruction: z18.string().nullish(),
5834
+ systemInstruction: z19.string().nullish(),
5784
5835
  /**
5785
5836
  * Per-block signature for round-tripping `thought.signature` and
5786
5837
  * `function_call.signature` blocks. Set by the SDK on output reasoning /
5787
5838
  * tool-call parts; passed back unchanged on input parts so the API
5788
5839
  * accepts the prior turn.
5789
5840
  */
5790
- signature: z18.string().nullish(),
5841
+ signature: z19.string().nullish(),
5791
5842
  /**
5792
5843
  * Set by the SDK on output assistant messages. The converter uses it to
5793
5844
  * decide which messages to drop when compacting under
5794
5845
  * `previousInteractionId`.
5795
5846
  */
5796
- interactionId: z18.string().nullish(),
5847
+ interactionId: z19.string().nullish(),
5797
5848
  /**
5798
5849
  * Maximum time, in milliseconds, to poll a background interaction (agent
5799
5850
  * call) before giving up. Defaults to 30 minutes. Long-running agents
5800
5851
  * such as deep research can take tens of minutes — increase if needed.
5801
5852
  */
5802
- pollingTimeoutMs: z18.number().int().positive().nullish(),
5853
+ pollingTimeoutMs: z19.number().int().positive().nullish(),
5803
5854
  /**
5804
5855
  * Run the interaction in the background. Required for agents whose
5805
5856
  * server-side workflow cannot complete within a single request/response.
@@ -5808,7 +5859,7 @@ var googleInteractionsLanguageModelOptions = lazySchema16(
5808
5859
  * reject `true`; see the agent's documentation for which mode it
5809
5860
  * requires.
5810
5861
  */
5811
- background: z18.boolean().nullish(),
5862
+ background: z19.boolean().nullish(),
5812
5863
  /**
5813
5864
  * Environment configuration for the agent sandbox. Only applies to agent
5814
5865
  * calls (`google.interactions({ agent })`); ignored on model-id calls.
@@ -5818,36 +5869,36 @@ var googleInteractionsLanguageModelOptions = lazySchema16(
5818
5869
  * - object: provision a fresh sandbox and optionally preload `sources`
5819
5870
  * and/or constrain outbound traffic via `network`.
5820
5871
  */
5821
- environment: z18.union([
5822
- z18.string(),
5823
- z18.object({
5824
- type: z18.literal("remote"),
5825
- sources: z18.array(
5826
- z18.union([
5827
- z18.object({
5828
- type: z18.literal("gcs"),
5829
- source: z18.string(),
5830
- target: z18.string().nullish()
5872
+ environment: z19.union([
5873
+ z19.string(),
5874
+ z19.object({
5875
+ type: z19.literal("remote"),
5876
+ sources: z19.array(
5877
+ z19.union([
5878
+ z19.object({
5879
+ type: z19.literal("gcs"),
5880
+ source: z19.string(),
5881
+ target: z19.string().nullish()
5831
5882
  }),
5832
- z18.object({
5833
- type: z18.literal("repository"),
5834
- source: z18.string(),
5835
- target: z18.string().nullish()
5883
+ z19.object({
5884
+ type: z19.literal("repository"),
5885
+ source: z19.string(),
5886
+ target: z19.string().nullish()
5836
5887
  }),
5837
- z18.object({
5838
- type: z18.literal("inline"),
5839
- content: z18.string(),
5840
- target: z18.string()
5888
+ z19.object({
5889
+ type: z19.literal("inline"),
5890
+ content: z19.string(),
5891
+ target: z19.string()
5841
5892
  })
5842
5893
  ])
5843
5894
  ).nullish(),
5844
- network: z18.union([
5845
- z18.literal("disabled"),
5846
- z18.object({
5847
- allowlist: z18.array(
5848
- z18.object({
5849
- domain: z18.string(),
5850
- transform: z18.array(z18.record(z18.string(), z18.string())).nullish()
5895
+ network: z19.union([
5896
+ z19.literal("disabled"),
5897
+ z19.object({
5898
+ allowlist: z19.array(
5899
+ z19.object({
5900
+ domain: z19.string(),
5901
+ transform: z19.array(z19.record(z19.string(), z19.string())).nullish()
5851
5902
  })
5852
5903
  )
5853
5904
  })