@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/CHANGELOG.md +16 -0
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +570 -519
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +570 -519
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +544 -493
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +544 -493
- package/dist/internal/index.mjs.map +1 -1
- package/docs/15-google-generative-ai.mdx +18 -2
- package/package.json +2 -2
- package/src/convert-to-google-generative-ai-messages.ts +17 -5
- package/src/google-generative-ai-prompt.ts +21 -2
- package/src/google-json-accumulator.ts +52 -3
- package/src/index.ts +4 -1
package/dist/index.js
CHANGED
|
@@ -244,7 +244,7 @@ var googleInteractionsTranscriptionResponseSchema = (0, import_provider_utils3.l
|
|
|
244
244
|
var import_provider_utils26 = require("@ai-sdk/provider-utils");
|
|
245
245
|
|
|
246
246
|
// src/version.ts
|
|
247
|
-
var VERSION = true ? "3.0.
|
|
247
|
+
var VERSION = true ? "3.0.140" : "0.0.0-test";
|
|
248
248
|
|
|
249
249
|
// src/google-generative-ai-embedding-model.ts
|
|
250
250
|
var import_provider2 = require("@ai-sdk/provider");
|
|
@@ -467,7 +467,7 @@ function validateMultimodalContentLength({
|
|
|
467
467
|
|
|
468
468
|
// src/google-generative-ai-language-model.ts
|
|
469
469
|
var import_provider_utils9 = require("@ai-sdk/provider-utils");
|
|
470
|
-
var
|
|
470
|
+
var import_v48 = require("zod/v4");
|
|
471
471
|
|
|
472
472
|
// src/continue-google-stream.ts
|
|
473
473
|
function continueGoogleStream({
|
|
@@ -890,6 +890,19 @@ function isEmptyObjectSchema(jsonSchema) {
|
|
|
890
890
|
// src/convert-to-google-generative-ai-messages.ts
|
|
891
891
|
var import_provider4 = require("@ai-sdk/provider");
|
|
892
892
|
var import_provider_utils6 = require("@ai-sdk/provider-utils");
|
|
893
|
+
|
|
894
|
+
// src/google-generative-ai-prompt.ts
|
|
895
|
+
var import_v46 = require("zod/v4");
|
|
896
|
+
var googleVideoMetadataSchema = import_v46.z.object({
|
|
897
|
+
/** Start offset as a duration in seconds, e.g. `'3.5s'`. */
|
|
898
|
+
startOffset: import_v46.z.string().optional(),
|
|
899
|
+
/** End offset as a duration in seconds, e.g. `'10s'`. */
|
|
900
|
+
endOffset: import_v46.z.string().optional(),
|
|
901
|
+
/** Frames per second in the range (0, 24]. Defaults to 1. */
|
|
902
|
+
fps: import_v46.z.number().gt(0).max(24).optional()
|
|
903
|
+
});
|
|
904
|
+
|
|
905
|
+
// src/convert-to-google-generative-ai-messages.ts
|
|
893
906
|
var SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
|
|
894
907
|
function getGoogleProviderOptions(providerOptions, providerOptionsName) {
|
|
895
908
|
const namespaces = [
|
|
@@ -1028,7 +1041,7 @@ function appendLegacyToolResultParts(parts, toolName, outputValue, toolCallId, i
|
|
|
1028
1041
|
}
|
|
1029
1042
|
}
|
|
1030
1043
|
function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
1031
|
-
var _a2, _b, _c, _d, _e, _f, _g;
|
|
1044
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
1032
1045
|
const systemInstructionParts = [];
|
|
1033
1046
|
const contents = [];
|
|
1034
1047
|
let systemMessagesAllowed = true;
|
|
@@ -1068,17 +1081,24 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
1068
1081
|
}
|
|
1069
1082
|
case "file": {
|
|
1070
1083
|
const mediaType = part.mediaType === "image/*" ? "image/jpeg" : part.mediaType;
|
|
1084
|
+
const rawVideoMetadata = (_g = getGoogleProviderOptions(
|
|
1085
|
+
part.providerOptions,
|
|
1086
|
+
providerOptionsName
|
|
1087
|
+
)) == null ? void 0 : _g.videoMetadata;
|
|
1088
|
+
const videoMetadata = rawVideoMetadata == null ? void 0 : googleVideoMetadataSchema.parse(rawVideoMetadata);
|
|
1071
1089
|
parts.push(
|
|
1072
1090
|
part.data instanceof URL ? {
|
|
1073
1091
|
fileData: {
|
|
1074
1092
|
mimeType: mediaType,
|
|
1075
1093
|
fileUri: part.data.protocol === "gs:" && part.originalUrl != null ? part.originalUrl : part.data.toString()
|
|
1076
|
-
}
|
|
1094
|
+
},
|
|
1095
|
+
...videoMetadata != null ? { videoMetadata } : {}
|
|
1077
1096
|
} : {
|
|
1078
1097
|
inlineData: {
|
|
1079
1098
|
mimeType: mediaType,
|
|
1080
1099
|
data: (0, import_provider_utils6.convertToBase64)(part.data)
|
|
1081
|
-
}
|
|
1100
|
+
},
|
|
1101
|
+
...videoMetadata != null ? { videoMetadata } : {}
|
|
1082
1102
|
}
|
|
1083
1103
|
);
|
|
1084
1104
|
break;
|
|
@@ -1239,7 +1259,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
1239
1259
|
name: part.toolName,
|
|
1240
1260
|
response: {
|
|
1241
1261
|
name: part.toolName,
|
|
1242
|
-
content: output.type === "execution-denied" ? (
|
|
1262
|
+
content: output.type === "execution-denied" ? (_h = output.reason) != null ? _h : "Tool call execution denied." : output.value
|
|
1243
1263
|
}
|
|
1244
1264
|
}
|
|
1245
1265
|
});
|
|
@@ -1343,23 +1363,23 @@ function getModelPath(modelId) {
|
|
|
1343
1363
|
|
|
1344
1364
|
// src/google-generative-ai-options.ts
|
|
1345
1365
|
var import_provider_utils8 = require("@ai-sdk/provider-utils");
|
|
1346
|
-
var
|
|
1366
|
+
var import_v47 = require("zod/v4");
|
|
1347
1367
|
var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
1348
1368
|
() => (0, import_provider_utils8.zodSchema)(
|
|
1349
|
-
|
|
1350
|
-
responseModalities:
|
|
1351
|
-
thinkingConfig:
|
|
1352
|
-
thinkingBudget:
|
|
1353
|
-
includeThoughts:
|
|
1369
|
+
import_v47.z.object({
|
|
1370
|
+
responseModalities: import_v47.z.array(import_v47.z.enum(["TEXT", "IMAGE"])).optional(),
|
|
1371
|
+
thinkingConfig: import_v47.z.object({
|
|
1372
|
+
thinkingBudget: import_v47.z.number().optional(),
|
|
1373
|
+
includeThoughts: import_v47.z.boolean().optional(),
|
|
1354
1374
|
// https://ai.google.dev/gemini-api/docs/gemini-3?thinking=high#thinking_level
|
|
1355
|
-
thinkingLevel:
|
|
1375
|
+
thinkingLevel: import_v47.z.enum(["minimal", "low", "medium", "high"]).optional()
|
|
1356
1376
|
}).optional(),
|
|
1357
1377
|
/**
|
|
1358
1378
|
* Optional.
|
|
1359
1379
|
* The name of the cached content used as context to serve the prediction.
|
|
1360
1380
|
* Format: cachedContents/{cachedContent}
|
|
1361
1381
|
*/
|
|
1362
|
-
cachedContent:
|
|
1382
|
+
cachedContent: import_v47.z.string().optional(),
|
|
1363
1383
|
/**
|
|
1364
1384
|
* Optional. Enable structured output. Default is true.
|
|
1365
1385
|
*
|
|
@@ -1368,13 +1388,13 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1368
1388
|
* Google Generative AI uses. You can use this to disable
|
|
1369
1389
|
* structured outputs if you need to.
|
|
1370
1390
|
*/
|
|
1371
|
-
structuredOutputs:
|
|
1391
|
+
structuredOutputs: import_v47.z.boolean().optional(),
|
|
1372
1392
|
/**
|
|
1373
1393
|
* Optional. A list of unique safety settings for blocking unsafe content.
|
|
1374
1394
|
*/
|
|
1375
|
-
safetySettings:
|
|
1376
|
-
|
|
1377
|
-
category:
|
|
1395
|
+
safetySettings: import_v47.z.array(
|
|
1396
|
+
import_v47.z.object({
|
|
1397
|
+
category: import_v47.z.enum([
|
|
1378
1398
|
"HARM_CATEGORY_UNSPECIFIED",
|
|
1379
1399
|
"HARM_CATEGORY_HATE_SPEECH",
|
|
1380
1400
|
"HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
@@ -1382,7 +1402,7 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1382
1402
|
"HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
1383
1403
|
"HARM_CATEGORY_CIVIC_INTEGRITY"
|
|
1384
1404
|
]),
|
|
1385
|
-
threshold:
|
|
1405
|
+
threshold: import_v47.z.enum([
|
|
1386
1406
|
"HARM_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
1387
1407
|
"BLOCK_LOW_AND_ABOVE",
|
|
1388
1408
|
"BLOCK_MEDIUM_AND_ABOVE",
|
|
@@ -1392,7 +1412,7 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1392
1412
|
])
|
|
1393
1413
|
})
|
|
1394
1414
|
).optional(),
|
|
1395
|
-
threshold:
|
|
1415
|
+
threshold: import_v47.z.enum([
|
|
1396
1416
|
"HARM_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
1397
1417
|
"BLOCK_LOW_AND_ABOVE",
|
|
1398
1418
|
"BLOCK_MEDIUM_AND_ABOVE",
|
|
@@ -1405,19 +1425,19 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1405
1425
|
*
|
|
1406
1426
|
* https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/audio-understanding
|
|
1407
1427
|
*/
|
|
1408
|
-
audioTimestamp:
|
|
1428
|
+
audioTimestamp: import_v47.z.boolean().optional(),
|
|
1409
1429
|
/**
|
|
1410
1430
|
* Optional. Defines labels used in billing reports. Available on Vertex AI only.
|
|
1411
1431
|
*
|
|
1412
1432
|
* https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/add-labels-to-api-calls
|
|
1413
1433
|
*/
|
|
1414
|
-
labels:
|
|
1434
|
+
labels: import_v47.z.record(import_v47.z.string(), import_v47.z.string()).optional(),
|
|
1415
1435
|
/**
|
|
1416
1436
|
* Optional. If specified, the media resolution specified will be used.
|
|
1417
1437
|
*
|
|
1418
1438
|
* https://ai.google.dev/api/generate-content#MediaResolution
|
|
1419
1439
|
*/
|
|
1420
|
-
mediaResolution:
|
|
1440
|
+
mediaResolution: import_v47.z.enum([
|
|
1421
1441
|
"MEDIA_RESOLUTION_UNSPECIFIED",
|
|
1422
1442
|
"MEDIA_RESOLUTION_LOW",
|
|
1423
1443
|
"MEDIA_RESOLUTION_MEDIUM",
|
|
@@ -1428,8 +1448,8 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1428
1448
|
*
|
|
1429
1449
|
* https://ai.google.dev/gemini-api/docs/image-generation#aspect_ratios
|
|
1430
1450
|
*/
|
|
1431
|
-
imageConfig:
|
|
1432
|
-
aspectRatio:
|
|
1451
|
+
imageConfig: import_v47.z.object({
|
|
1452
|
+
aspectRatio: import_v47.z.enum([
|
|
1433
1453
|
"1:1",
|
|
1434
1454
|
"2:3",
|
|
1435
1455
|
"3:2",
|
|
@@ -1445,12 +1465,12 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1445
1465
|
"1:4",
|
|
1446
1466
|
"4:1"
|
|
1447
1467
|
]).optional(),
|
|
1448
|
-
imageSize:
|
|
1468
|
+
imageSize: import_v47.z.enum(["1K", "2K", "4K", "512"]).optional(),
|
|
1449
1469
|
/**
|
|
1450
1470
|
* Optional. Controls the generation of people in images.
|
|
1451
1471
|
* Vertex AI only.
|
|
1452
1472
|
*/
|
|
1453
|
-
personGeneration:
|
|
1473
|
+
personGeneration: import_v47.z.enum([
|
|
1454
1474
|
"PERSON_GENERATION_UNSPECIFIED",
|
|
1455
1475
|
"ALLOW_ALL",
|
|
1456
1476
|
"ALLOW_ADULT",
|
|
@@ -1464,7 +1484,7 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1464
1484
|
*
|
|
1465
1485
|
* https://docs.cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerationConfig
|
|
1466
1486
|
*/
|
|
1467
|
-
prominentPeople:
|
|
1487
|
+
prominentPeople: import_v47.z.enum([
|
|
1468
1488
|
"PROMINENT_PEOPLE_UNSPECIFIED",
|
|
1469
1489
|
"ALLOW_PROMINENT_PEOPLE",
|
|
1470
1490
|
"BLOCK_PROMINENT_PEOPLE"
|
|
@@ -1473,9 +1493,9 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1473
1493
|
* Optional. The image output format for generated images.
|
|
1474
1494
|
* Vertex AI only.
|
|
1475
1495
|
*/
|
|
1476
|
-
imageOutputOptions:
|
|
1477
|
-
mimeType:
|
|
1478
|
-
compressionQuality:
|
|
1496
|
+
imageOutputOptions: import_v47.z.object({
|
|
1497
|
+
mimeType: import_v47.z.enum(["image/jpeg", "image/png"]).optional(),
|
|
1498
|
+
compressionQuality: import_v47.z.number().optional()
|
|
1479
1499
|
}).optional()
|
|
1480
1500
|
}).optional(),
|
|
1481
1501
|
/**
|
|
@@ -1484,10 +1504,10 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1484
1504
|
*
|
|
1485
1505
|
* https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-maps
|
|
1486
1506
|
*/
|
|
1487
|
-
retrievalConfig:
|
|
1488
|
-
latLng:
|
|
1489
|
-
latitude:
|
|
1490
|
-
longitude:
|
|
1507
|
+
retrievalConfig: import_v47.z.object({
|
|
1508
|
+
latLng: import_v47.z.object({
|
|
1509
|
+
latitude: import_v47.z.number(),
|
|
1510
|
+
longitude: import_v47.z.number()
|
|
1491
1511
|
}).optional()
|
|
1492
1512
|
}).optional(),
|
|
1493
1513
|
/**
|
|
@@ -1500,12 +1520,12 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1500
1520
|
*
|
|
1501
1521
|
* https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc
|
|
1502
1522
|
*/
|
|
1503
|
-
streamFunctionCallArguments:
|
|
1523
|
+
streamFunctionCallArguments: import_v47.z.boolean().optional(),
|
|
1504
1524
|
/**
|
|
1505
1525
|
* Optional. The service tier to use for the request. Sent as the
|
|
1506
1526
|
* `serviceTier` body field. Gemini API only.
|
|
1507
1527
|
*/
|
|
1508
|
-
serviceTier:
|
|
1528
|
+
serviceTier: import_v47.z.enum(["standard", "flex", "priority"]).optional(),
|
|
1509
1529
|
/**
|
|
1510
1530
|
* Optional. Resumes a response that stopped with `MAX_TOKENS` because it
|
|
1511
1531
|
* used up its `maxOutputTokens` budget (Gemini 4 long decode). Pass the
|
|
@@ -1515,7 +1535,7 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1515
1535
|
* per-request cap while budget remains (`CONTINUATION`) are continued
|
|
1516
1536
|
* automatically. Sent as the `continuationToken` body field.
|
|
1517
1537
|
*/
|
|
1518
|
-
continuationToken:
|
|
1538
|
+
continuationToken: import_v47.z.string().optional(),
|
|
1519
1539
|
/**
|
|
1520
1540
|
* Optional. Vertex AI only. Sent as the
|
|
1521
1541
|
* `X-Vertex-AI-LLM-Shared-Request-Type` request header to select a
|
|
@@ -1526,7 +1546,7 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1526
1546
|
* https://docs.cloud.google.com/vertex-ai/generative-ai/docs/priority-paygo
|
|
1527
1547
|
* https://docs.cloud.google.com/vertex-ai/generative-ai/docs/flex-paygo
|
|
1528
1548
|
*/
|
|
1529
|
-
sharedRequestType:
|
|
1549
|
+
sharedRequestType: import_v47.z.enum(["priority", "flex", "standard"]).optional(),
|
|
1530
1550
|
/**
|
|
1531
1551
|
* Optional. Vertex AI only. Sent as the `X-Vertex-AI-LLM-Request-Type`
|
|
1532
1552
|
* request header. Set to `'shared'` together with `sharedRequestType`
|
|
@@ -1534,7 +1554,7 @@ var googleLanguageModelOptions = (0, import_provider_utils8.lazySchema)(
|
|
|
1534
1554
|
*
|
|
1535
1555
|
* https://docs.cloud.google.com/vertex-ai/generative-ai/docs/priority-paygo
|
|
1536
1556
|
*/
|
|
1537
|
-
requestType:
|
|
1557
|
+
requestType: import_v47.z.enum(["shared"]).optional()
|
|
1538
1558
|
})
|
|
1539
1559
|
)
|
|
1540
1560
|
);
|
|
@@ -1841,8 +1861,10 @@ var GoogleJSONAccumulator = class {
|
|
|
1841
1861
|
processPartialArgs(partialArgs) {
|
|
1842
1862
|
let delta = "";
|
|
1843
1863
|
for (const arg of partialArgs) {
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1864
|
+
const isArrayTerminator = arg.jsonPath.endsWith("[]");
|
|
1865
|
+
const jsonPath = isArrayTerminator ? arg.jsonPath.slice(0, -2) : arg.jsonPath;
|
|
1866
|
+
const rawPath = jsonPath.replace(/^\$\./, "");
|
|
1867
|
+
if (!rawPath || rawPath === "$") continue;
|
|
1846
1868
|
const segments = parsePath(rawPath);
|
|
1847
1869
|
const existingValue = getNestedValue(this.accumulatedArgs, segments);
|
|
1848
1870
|
const isStringContinuation = arg.stringValue != null && existingValue !== void 0;
|
|
@@ -1857,7 +1879,16 @@ var GoogleJSONAccumulator = class {
|
|
|
1857
1879
|
continue;
|
|
1858
1880
|
}
|
|
1859
1881
|
const resolved = resolvePartialArgValue(arg);
|
|
1860
|
-
if (resolved == null)
|
|
1882
|
+
if (resolved == null) {
|
|
1883
|
+
if (existingValue !== void 0 || arg.willContinue === true) continue;
|
|
1884
|
+
setNestedValue(
|
|
1885
|
+
this.accumulatedArgs,
|
|
1886
|
+
segments,
|
|
1887
|
+
isArrayTerminator ? [] : {}
|
|
1888
|
+
);
|
|
1889
|
+
delta += this.emitContainer(segments, isArrayTerminator);
|
|
1890
|
+
continue;
|
|
1891
|
+
}
|
|
1861
1892
|
setNestedValue(this.accumulatedArgs, segments, resolved.value);
|
|
1862
1893
|
delta += this.emitNavigationTo(segments, arg, resolved.json);
|
|
1863
1894
|
}
|
|
@@ -1909,6 +1940,26 @@ var GoogleJSONAccumulator = class {
|
|
|
1909
1940
|
fragment += this.emitLeaf(leafSegment, arg, valueJson);
|
|
1910
1941
|
return fragment;
|
|
1911
1942
|
}
|
|
1943
|
+
/**
|
|
1944
|
+
* Navigates to `targetSegments` and opens a container there. The container
|
|
1945
|
+
* stays open so later entries for its children continue inside it; it is
|
|
1946
|
+
* closed by subsequent navigation or by `finalize()`.
|
|
1947
|
+
*
|
|
1948
|
+
* Input: targetSegments=["nested","tags"], isArray=true
|
|
1949
|
+
* Output: '{"nested":{"tags":['
|
|
1950
|
+
*/
|
|
1951
|
+
emitContainer(targetSegments, isArray) {
|
|
1952
|
+
let fragment = "";
|
|
1953
|
+
if (this.stringOpen) {
|
|
1954
|
+
fragment += '"';
|
|
1955
|
+
this.stringOpen = false;
|
|
1956
|
+
}
|
|
1957
|
+
fragment += this.ensureRoot();
|
|
1958
|
+
const commonDepth = this.findCommonStackDepth(targetSegments);
|
|
1959
|
+
fragment += this.closeDownTo(commonDepth);
|
|
1960
|
+
fragment += this.openDownTo(targetSegments, isArray ? 0 : "");
|
|
1961
|
+
return fragment;
|
|
1962
|
+
}
|
|
1912
1963
|
/**
|
|
1913
1964
|
* Returns the stack depth to preserve when navigating to a new target
|
|
1914
1965
|
* container path. Always >= 1 (the root is never popped).
|
|
@@ -3120,205 +3171,205 @@ function extractSources({
|
|
|
3120
3171
|
}
|
|
3121
3172
|
return sources.length > 0 ? sources : void 0;
|
|
3122
3173
|
}
|
|
3123
|
-
var getGroundingMetadataSchema = () =>
|
|
3124
|
-
webSearchQueries:
|
|
3125
|
-
imageSearchQueries:
|
|
3126
|
-
retrievalQueries:
|
|
3127
|
-
searchEntryPoint:
|
|
3128
|
-
groundingChunks:
|
|
3129
|
-
|
|
3130
|
-
web:
|
|
3131
|
-
image:
|
|
3132
|
-
sourceUri:
|
|
3133
|
-
imageUri:
|
|
3134
|
-
title:
|
|
3135
|
-
domain:
|
|
3174
|
+
var getGroundingMetadataSchema = () => import_v48.z.object({
|
|
3175
|
+
webSearchQueries: import_v48.z.array(import_v48.z.string()).nullish(),
|
|
3176
|
+
imageSearchQueries: import_v48.z.array(import_v48.z.string()).nullish(),
|
|
3177
|
+
retrievalQueries: import_v48.z.array(import_v48.z.string()).nullish(),
|
|
3178
|
+
searchEntryPoint: import_v48.z.object({ renderedContent: import_v48.z.string() }).nullish(),
|
|
3179
|
+
groundingChunks: import_v48.z.array(
|
|
3180
|
+
import_v48.z.object({
|
|
3181
|
+
web: import_v48.z.object({ uri: import_v48.z.string(), title: import_v48.z.string().nullish() }).nullish(),
|
|
3182
|
+
image: import_v48.z.object({
|
|
3183
|
+
sourceUri: import_v48.z.string(),
|
|
3184
|
+
imageUri: import_v48.z.string(),
|
|
3185
|
+
title: import_v48.z.string().nullish(),
|
|
3186
|
+
domain: import_v48.z.string().nullish()
|
|
3136
3187
|
}).nullish(),
|
|
3137
|
-
retrievedContext:
|
|
3138
|
-
uri:
|
|
3139
|
-
title:
|
|
3140
|
-
text:
|
|
3141
|
-
fileSearchStore:
|
|
3142
|
-
customMetadata:
|
|
3143
|
-
|
|
3144
|
-
key:
|
|
3145
|
-
stringValue:
|
|
3146
|
-
numericValue:
|
|
3147
|
-
stringListValue:
|
|
3188
|
+
retrievedContext: import_v48.z.object({
|
|
3189
|
+
uri: import_v48.z.string().nullish(),
|
|
3190
|
+
title: import_v48.z.string().nullish(),
|
|
3191
|
+
text: import_v48.z.string().nullish(),
|
|
3192
|
+
fileSearchStore: import_v48.z.string().nullish(),
|
|
3193
|
+
customMetadata: import_v48.z.array(
|
|
3194
|
+
import_v48.z.object({
|
|
3195
|
+
key: import_v48.z.string(),
|
|
3196
|
+
stringValue: import_v48.z.string().nullish(),
|
|
3197
|
+
numericValue: import_v48.z.number().nullish(),
|
|
3198
|
+
stringListValue: import_v48.z.object({ values: import_v48.z.array(import_v48.z.string()).nullish() }).nullish()
|
|
3148
3199
|
})
|
|
3149
3200
|
).nullish()
|
|
3150
3201
|
}).nullish(),
|
|
3151
|
-
maps:
|
|
3152
|
-
uri:
|
|
3153
|
-
title:
|
|
3154
|
-
text:
|
|
3155
|
-
placeId:
|
|
3202
|
+
maps: import_v48.z.object({
|
|
3203
|
+
uri: import_v48.z.string().nullish(),
|
|
3204
|
+
title: import_v48.z.string().nullish(),
|
|
3205
|
+
text: import_v48.z.string().nullish(),
|
|
3206
|
+
placeId: import_v48.z.string().nullish()
|
|
3156
3207
|
}).nullish()
|
|
3157
3208
|
})
|
|
3158
3209
|
).nullish(),
|
|
3159
|
-
groundingSupports:
|
|
3160
|
-
|
|
3161
|
-
segment:
|
|
3162
|
-
startIndex:
|
|
3163
|
-
endIndex:
|
|
3164
|
-
text:
|
|
3210
|
+
groundingSupports: import_v48.z.array(
|
|
3211
|
+
import_v48.z.object({
|
|
3212
|
+
segment: import_v48.z.object({
|
|
3213
|
+
startIndex: import_v48.z.number().nullish(),
|
|
3214
|
+
endIndex: import_v48.z.number().nullish(),
|
|
3215
|
+
text: import_v48.z.string().nullish()
|
|
3165
3216
|
}).nullish(),
|
|
3166
|
-
segment_text:
|
|
3167
|
-
groundingChunkIndices:
|
|
3168
|
-
supportChunkIndices:
|
|
3169
|
-
confidenceScores:
|
|
3170
|
-
confidenceScore:
|
|
3217
|
+
segment_text: import_v48.z.string().nullish(),
|
|
3218
|
+
groundingChunkIndices: import_v48.z.array(import_v48.z.number()).nullish(),
|
|
3219
|
+
supportChunkIndices: import_v48.z.array(import_v48.z.number()).nullish(),
|
|
3220
|
+
confidenceScores: import_v48.z.array(import_v48.z.number()).nullish(),
|
|
3221
|
+
confidenceScore: import_v48.z.array(import_v48.z.number()).nullish()
|
|
3171
3222
|
})
|
|
3172
3223
|
).nullish(),
|
|
3173
|
-
retrievalMetadata:
|
|
3174
|
-
|
|
3175
|
-
webDynamicRetrievalScore:
|
|
3224
|
+
retrievalMetadata: import_v48.z.union([
|
|
3225
|
+
import_v48.z.object({
|
|
3226
|
+
webDynamicRetrievalScore: import_v48.z.number()
|
|
3176
3227
|
}),
|
|
3177
|
-
|
|
3228
|
+
import_v48.z.object({})
|
|
3178
3229
|
]).nullish()
|
|
3179
3230
|
});
|
|
3180
|
-
var partialArgSchema = () =>
|
|
3181
|
-
jsonPath:
|
|
3182
|
-
stringValue:
|
|
3183
|
-
numberValue:
|
|
3184
|
-
boolValue:
|
|
3185
|
-
nullValue:
|
|
3186
|
-
willContinue:
|
|
3231
|
+
var partialArgSchema = () => import_v48.z.object({
|
|
3232
|
+
jsonPath: import_v48.z.string(),
|
|
3233
|
+
stringValue: import_v48.z.string().nullish(),
|
|
3234
|
+
numberValue: import_v48.z.number().nullish(),
|
|
3235
|
+
boolValue: import_v48.z.boolean().nullish(),
|
|
3236
|
+
nullValue: import_v48.z.unknown().nullish(),
|
|
3237
|
+
willContinue: import_v48.z.boolean().nullish()
|
|
3187
3238
|
});
|
|
3188
|
-
var getContentSchema = () =>
|
|
3189
|
-
parts:
|
|
3190
|
-
|
|
3239
|
+
var getContentSchema = () => import_v48.z.object({
|
|
3240
|
+
parts: import_v48.z.array(
|
|
3241
|
+
import_v48.z.union([
|
|
3191
3242
|
// note: order matters since text can be fully empty
|
|
3192
|
-
|
|
3193
|
-
functionCall:
|
|
3194
|
-
id:
|
|
3195
|
-
name:
|
|
3196
|
-
args:
|
|
3197
|
-
partialArgs:
|
|
3198
|
-
willContinue:
|
|
3243
|
+
import_v48.z.object({
|
|
3244
|
+
functionCall: import_v48.z.object({
|
|
3245
|
+
id: import_v48.z.string().nullish(),
|
|
3246
|
+
name: import_v48.z.string().nullish(),
|
|
3247
|
+
args: import_v48.z.unknown().nullish(),
|
|
3248
|
+
partialArgs: import_v48.z.array(partialArgSchema()).nullish(),
|
|
3249
|
+
willContinue: import_v48.z.boolean().nullish()
|
|
3199
3250
|
}),
|
|
3200
|
-
thoughtSignature:
|
|
3251
|
+
thoughtSignature: import_v48.z.string().nullish()
|
|
3201
3252
|
}),
|
|
3202
|
-
|
|
3203
|
-
inlineData:
|
|
3204
|
-
mimeType:
|
|
3205
|
-
data:
|
|
3253
|
+
import_v48.z.object({
|
|
3254
|
+
inlineData: import_v48.z.object({
|
|
3255
|
+
mimeType: import_v48.z.string(),
|
|
3256
|
+
data: import_v48.z.string()
|
|
3206
3257
|
}),
|
|
3207
|
-
thought:
|
|
3208
|
-
thoughtSignature:
|
|
3258
|
+
thought: import_v48.z.boolean().nullish(),
|
|
3259
|
+
thoughtSignature: import_v48.z.string().nullish()
|
|
3209
3260
|
}),
|
|
3210
|
-
|
|
3211
|
-
toolCall:
|
|
3212
|
-
toolType:
|
|
3213
|
-
args:
|
|
3214
|
-
id:
|
|
3261
|
+
import_v48.z.object({
|
|
3262
|
+
toolCall: import_v48.z.object({
|
|
3263
|
+
toolType: import_v48.z.string(),
|
|
3264
|
+
args: import_v48.z.unknown().nullish(),
|
|
3265
|
+
id: import_v48.z.string()
|
|
3215
3266
|
}),
|
|
3216
|
-
thoughtSignature:
|
|
3267
|
+
thoughtSignature: import_v48.z.string().nullish()
|
|
3217
3268
|
}),
|
|
3218
|
-
|
|
3219
|
-
toolResponse:
|
|
3220
|
-
toolType:
|
|
3221
|
-
response:
|
|
3222
|
-
id:
|
|
3269
|
+
import_v48.z.object({
|
|
3270
|
+
toolResponse: import_v48.z.object({
|
|
3271
|
+
toolType: import_v48.z.string(),
|
|
3272
|
+
response: import_v48.z.unknown().nullish(),
|
|
3273
|
+
id: import_v48.z.string()
|
|
3223
3274
|
}),
|
|
3224
|
-
thoughtSignature:
|
|
3275
|
+
thoughtSignature: import_v48.z.string().nullish()
|
|
3225
3276
|
}),
|
|
3226
|
-
|
|
3227
|
-
executableCode:
|
|
3228
|
-
language:
|
|
3229
|
-
code:
|
|
3277
|
+
import_v48.z.object({
|
|
3278
|
+
executableCode: import_v48.z.object({
|
|
3279
|
+
language: import_v48.z.string(),
|
|
3280
|
+
code: import_v48.z.string()
|
|
3230
3281
|
}).nullish(),
|
|
3231
|
-
codeExecutionResult:
|
|
3232
|
-
outcome:
|
|
3233
|
-
output:
|
|
3282
|
+
codeExecutionResult: import_v48.z.object({
|
|
3283
|
+
outcome: import_v48.z.string(),
|
|
3284
|
+
output: import_v48.z.string().nullish()
|
|
3234
3285
|
}).nullish(),
|
|
3235
|
-
text:
|
|
3236
|
-
thought:
|
|
3237
|
-
thoughtSignature:
|
|
3286
|
+
text: import_v48.z.string().nullish(),
|
|
3287
|
+
thought: import_v48.z.boolean().nullish(),
|
|
3288
|
+
thoughtSignature: import_v48.z.string().nullish()
|
|
3238
3289
|
})
|
|
3239
3290
|
])
|
|
3240
3291
|
).nullish()
|
|
3241
3292
|
});
|
|
3242
|
-
var getSafetyRatingSchema = () =>
|
|
3243
|
-
category:
|
|
3244
|
-
probability:
|
|
3245
|
-
probabilityScore:
|
|
3246
|
-
severity:
|
|
3247
|
-
severityScore:
|
|
3248
|
-
blocked:
|
|
3293
|
+
var getSafetyRatingSchema = () => import_v48.z.object({
|
|
3294
|
+
category: import_v48.z.string().nullish(),
|
|
3295
|
+
probability: import_v48.z.string().nullish(),
|
|
3296
|
+
probabilityScore: import_v48.z.number().nullish(),
|
|
3297
|
+
severity: import_v48.z.string().nullish(),
|
|
3298
|
+
severityScore: import_v48.z.number().nullish(),
|
|
3299
|
+
blocked: import_v48.z.boolean().nullish()
|
|
3249
3300
|
});
|
|
3250
|
-
var tokenDetailsSchema = () =>
|
|
3251
|
-
|
|
3252
|
-
modality:
|
|
3253
|
-
tokenCount:
|
|
3254
|
-
}).catchall(
|
|
3301
|
+
var tokenDetailsSchema = () => import_v48.z.array(
|
|
3302
|
+
import_v48.z.object({
|
|
3303
|
+
modality: import_v48.z.string(),
|
|
3304
|
+
tokenCount: import_v48.z.number()
|
|
3305
|
+
}).catchall(import_v48.z.json())
|
|
3255
3306
|
).nullish();
|
|
3256
|
-
var usageSchema = () =>
|
|
3257
|
-
cachedContentTokenCount:
|
|
3258
|
-
thoughtsTokenCount:
|
|
3259
|
-
promptTokenCount:
|
|
3260
|
-
candidatesTokenCount:
|
|
3261
|
-
toolUsePromptTokenCount:
|
|
3262
|
-
totalTokenCount:
|
|
3307
|
+
var usageSchema = () => import_v48.z.object({
|
|
3308
|
+
cachedContentTokenCount: import_v48.z.number().nullish(),
|
|
3309
|
+
thoughtsTokenCount: import_v48.z.number().nullish(),
|
|
3310
|
+
promptTokenCount: import_v48.z.number().nullish(),
|
|
3311
|
+
candidatesTokenCount: import_v48.z.number().nullish(),
|
|
3312
|
+
toolUsePromptTokenCount: import_v48.z.number().nullish(),
|
|
3313
|
+
totalTokenCount: import_v48.z.number().nullish(),
|
|
3263
3314
|
// https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#TrafficType
|
|
3264
|
-
trafficType:
|
|
3265
|
-
serviceTier:
|
|
3315
|
+
trafficType: import_v48.z.string().nullish(),
|
|
3316
|
+
serviceTier: import_v48.z.string().nullish(),
|
|
3266
3317
|
// https://ai.google.dev/api/generate-content#Modality
|
|
3267
3318
|
promptTokensDetails: tokenDetailsSchema(),
|
|
3268
3319
|
cacheTokensDetails: tokenDetailsSchema(),
|
|
3269
3320
|
candidatesTokensDetails: tokenDetailsSchema(),
|
|
3270
3321
|
toolUsePromptTokensDetails: tokenDetailsSchema()
|
|
3271
|
-
}).catchall(
|
|
3272
|
-
var getUrlContextMetadataSchema = () =>
|
|
3273
|
-
urlMetadata:
|
|
3274
|
-
|
|
3275
|
-
retrievedUrl:
|
|
3276
|
-
urlRetrievalStatus:
|
|
3322
|
+
}).catchall(import_v48.z.json());
|
|
3323
|
+
var getUrlContextMetadataSchema = () => import_v48.z.object({
|
|
3324
|
+
urlMetadata: import_v48.z.array(
|
|
3325
|
+
import_v48.z.object({
|
|
3326
|
+
retrievedUrl: import_v48.z.string(),
|
|
3327
|
+
urlRetrievalStatus: import_v48.z.string()
|
|
3277
3328
|
})
|
|
3278
3329
|
).nullish()
|
|
3279
3330
|
});
|
|
3280
3331
|
var responseSchema = (0, import_provider_utils9.lazySchema)(
|
|
3281
3332
|
() => (0, import_provider_utils9.zodSchema)(
|
|
3282
|
-
|
|
3283
|
-
responseId:
|
|
3284
|
-
candidates:
|
|
3285
|
-
|
|
3286
|
-
content: getContentSchema().nullish().or(
|
|
3287
|
-
finishReason:
|
|
3288
|
-
finishMessage:
|
|
3289
|
-
continuationToken:
|
|
3290
|
-
safetyRatings:
|
|
3333
|
+
import_v48.z.object({
|
|
3334
|
+
responseId: import_v48.z.string().nullish(),
|
|
3335
|
+
candidates: import_v48.z.array(
|
|
3336
|
+
import_v48.z.object({
|
|
3337
|
+
content: getContentSchema().nullish().or(import_v48.z.object({}).strict()),
|
|
3338
|
+
finishReason: import_v48.z.string().nullish(),
|
|
3339
|
+
finishMessage: import_v48.z.string().nullish(),
|
|
3340
|
+
continuationToken: import_v48.z.string().nullish(),
|
|
3341
|
+
safetyRatings: import_v48.z.array(getSafetyRatingSchema()).nullish(),
|
|
3291
3342
|
groundingMetadata: getGroundingMetadataSchema().nullish(),
|
|
3292
3343
|
urlContextMetadata: getUrlContextMetadataSchema().nullish()
|
|
3293
3344
|
})
|
|
3294
3345
|
).nullish(),
|
|
3295
3346
|
usageMetadata: usageSchema().nullish(),
|
|
3296
|
-
promptFeedback:
|
|
3297
|
-
blockReason:
|
|
3298
|
-
safetyRatings:
|
|
3347
|
+
promptFeedback: import_v48.z.object({
|
|
3348
|
+
blockReason: import_v48.z.string().nullish(),
|
|
3349
|
+
safetyRatings: import_v48.z.array(getSafetyRatingSchema()).nullish()
|
|
3299
3350
|
}).nullish()
|
|
3300
3351
|
})
|
|
3301
3352
|
)
|
|
3302
3353
|
);
|
|
3303
3354
|
var chunkSchema = (0, import_provider_utils9.lazySchema)(
|
|
3304
3355
|
() => (0, import_provider_utils9.zodSchema)(
|
|
3305
|
-
|
|
3306
|
-
responseId:
|
|
3307
|
-
candidates:
|
|
3308
|
-
|
|
3356
|
+
import_v48.z.object({
|
|
3357
|
+
responseId: import_v48.z.string().nullish(),
|
|
3358
|
+
candidates: import_v48.z.array(
|
|
3359
|
+
import_v48.z.object({
|
|
3309
3360
|
content: getContentSchema().nullish(),
|
|
3310
|
-
finishReason:
|
|
3311
|
-
finishMessage:
|
|
3312
|
-
continuationToken:
|
|
3313
|
-
safetyRatings:
|
|
3361
|
+
finishReason: import_v48.z.string().nullish(),
|
|
3362
|
+
finishMessage: import_v48.z.string().nullish(),
|
|
3363
|
+
continuationToken: import_v48.z.string().nullish(),
|
|
3364
|
+
safetyRatings: import_v48.z.array(getSafetyRatingSchema()).nullish(),
|
|
3314
3365
|
groundingMetadata: getGroundingMetadataSchema().nullish(),
|
|
3315
3366
|
urlContextMetadata: getUrlContextMetadataSchema().nullish()
|
|
3316
3367
|
})
|
|
3317
3368
|
).nullish(),
|
|
3318
3369
|
usageMetadata: usageSchema().nullish(),
|
|
3319
|
-
promptFeedback:
|
|
3320
|
-
blockReason:
|
|
3321
|
-
safetyRatings:
|
|
3370
|
+
promptFeedback: import_v48.z.object({
|
|
3371
|
+
blockReason: import_v48.z.string().nullish(),
|
|
3372
|
+
safetyRatings: import_v48.z.array(getSafetyRatingSchema()).nullish()
|
|
3322
3373
|
}).nullish()
|
|
3323
3374
|
})
|
|
3324
3375
|
)
|
|
@@ -3329,43 +3380,43 @@ function isConfirmedPromptBlockReason(blockReason) {
|
|
|
3329
3380
|
|
|
3330
3381
|
// src/tool/code-execution.ts
|
|
3331
3382
|
var import_provider_utils10 = require("@ai-sdk/provider-utils");
|
|
3332
|
-
var
|
|
3383
|
+
var import_v49 = require("zod/v4");
|
|
3333
3384
|
var codeExecution = (0, import_provider_utils10.createProviderToolFactoryWithOutputSchema)({
|
|
3334
3385
|
id: "google.code_execution",
|
|
3335
|
-
inputSchema:
|
|
3336
|
-
language:
|
|
3337
|
-
code:
|
|
3386
|
+
inputSchema: import_v49.z.object({
|
|
3387
|
+
language: import_v49.z.string().describe("The programming language of the code."),
|
|
3388
|
+
code: import_v49.z.string().describe("The code to be executed.")
|
|
3338
3389
|
}),
|
|
3339
|
-
outputSchema:
|
|
3340
|
-
outcome:
|
|
3341
|
-
output:
|
|
3390
|
+
outputSchema: import_v49.z.object({
|
|
3391
|
+
outcome: import_v49.z.string().describe('The outcome of the execution (e.g., "OUTCOME_OK").'),
|
|
3392
|
+
output: import_v49.z.string().describe("The output from the code execution.")
|
|
3342
3393
|
})
|
|
3343
3394
|
});
|
|
3344
3395
|
|
|
3345
3396
|
// src/tool/enterprise-web-search.ts
|
|
3346
3397
|
var import_provider_utils11 = require("@ai-sdk/provider-utils");
|
|
3347
|
-
var
|
|
3398
|
+
var import_v410 = require("zod/v4");
|
|
3348
3399
|
var enterpriseWebSearch = (0, import_provider_utils11.createProviderToolFactory)({
|
|
3349
3400
|
id: "google.enterprise_web_search",
|
|
3350
|
-
inputSchema: (0, import_provider_utils11.lazySchema)(() => (0, import_provider_utils11.zodSchema)(
|
|
3401
|
+
inputSchema: (0, import_provider_utils11.lazySchema)(() => (0, import_provider_utils11.zodSchema)(import_v410.z.object({})))
|
|
3351
3402
|
});
|
|
3352
3403
|
|
|
3353
3404
|
// src/tool/file-search.ts
|
|
3354
3405
|
var import_provider_utils12 = require("@ai-sdk/provider-utils");
|
|
3355
|
-
var
|
|
3356
|
-
var fileSearchArgsBaseSchema = () =>
|
|
3406
|
+
var import_v411 = require("zod/v4");
|
|
3407
|
+
var fileSearchArgsBaseSchema = () => import_v411.z.object({
|
|
3357
3408
|
/** The names of the file_search_stores to retrieve from.
|
|
3358
3409
|
* Example: `fileSearchStores/my-file-search-store-123`
|
|
3359
3410
|
*/
|
|
3360
|
-
fileSearchStoreNames:
|
|
3411
|
+
fileSearchStoreNames: import_v411.z.array(import_v411.z.string()).describe(
|
|
3361
3412
|
"The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"
|
|
3362
3413
|
),
|
|
3363
3414
|
/** The number of file search retrieval chunks to retrieve. */
|
|
3364
|
-
topK:
|
|
3415
|
+
topK: import_v411.z.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),
|
|
3365
3416
|
/** Metadata filter to apply to the file search retrieval documents.
|
|
3366
3417
|
* See https://google.aip.dev/160 for the syntax of the filter expression.
|
|
3367
3418
|
*/
|
|
3368
|
-
metadataFilter:
|
|
3419
|
+
metadataFilter: import_v411.z.string().describe(
|
|
3369
3420
|
"Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression."
|
|
3370
3421
|
).optional()
|
|
3371
3422
|
}).passthrough();
|
|
@@ -3379,23 +3430,23 @@ var fileSearch = (0, import_provider_utils12.createProviderToolFactory)({
|
|
|
3379
3430
|
|
|
3380
3431
|
// src/tool/google-maps.ts
|
|
3381
3432
|
var import_provider_utils13 = require("@ai-sdk/provider-utils");
|
|
3382
|
-
var
|
|
3433
|
+
var import_v412 = require("zod/v4");
|
|
3383
3434
|
var googleMaps = (0, import_provider_utils13.createProviderToolFactory)({
|
|
3384
3435
|
id: "google.google_maps",
|
|
3385
|
-
inputSchema: (0, import_provider_utils13.lazySchema)(() => (0, import_provider_utils13.zodSchema)(
|
|
3436
|
+
inputSchema: (0, import_provider_utils13.lazySchema)(() => (0, import_provider_utils13.zodSchema)(import_v412.z.object({})))
|
|
3386
3437
|
});
|
|
3387
3438
|
|
|
3388
3439
|
// src/tool/google-search.ts
|
|
3389
3440
|
var import_provider_utils14 = require("@ai-sdk/provider-utils");
|
|
3390
|
-
var
|
|
3391
|
-
var googleSearchToolArgsBaseSchema = () =>
|
|
3392
|
-
searchTypes:
|
|
3393
|
-
webSearch:
|
|
3394
|
-
imageSearch:
|
|
3441
|
+
var import_v413 = require("zod/v4");
|
|
3442
|
+
var googleSearchToolArgsBaseSchema = () => import_v413.z.object({
|
|
3443
|
+
searchTypes: import_v413.z.object({
|
|
3444
|
+
webSearch: import_v413.z.object({}).optional(),
|
|
3445
|
+
imageSearch: import_v413.z.object({}).optional()
|
|
3395
3446
|
}).optional(),
|
|
3396
|
-
timeRangeFilter:
|
|
3397
|
-
startTime:
|
|
3398
|
-
endTime:
|
|
3447
|
+
timeRangeFilter: import_v413.z.object({
|
|
3448
|
+
startTime: import_v413.z.string(),
|
|
3449
|
+
endTime: import_v413.z.string()
|
|
3399
3450
|
}).optional()
|
|
3400
3451
|
}).passthrough();
|
|
3401
3452
|
var googleSearchToolArgsSchema = (0, import_provider_utils14.lazySchema)(
|
|
@@ -3410,20 +3461,20 @@ var googleSearch = (0, import_provider_utils14.createProviderToolFactory)(
|
|
|
3410
3461
|
|
|
3411
3462
|
// src/tool/url-context.ts
|
|
3412
3463
|
var import_provider_utils15 = require("@ai-sdk/provider-utils");
|
|
3413
|
-
var
|
|
3464
|
+
var import_v414 = require("zod/v4");
|
|
3414
3465
|
var urlContext = (0, import_provider_utils15.createProviderToolFactory)({
|
|
3415
3466
|
id: "google.url_context",
|
|
3416
|
-
inputSchema: (0, import_provider_utils15.lazySchema)(() => (0, import_provider_utils15.zodSchema)(
|
|
3467
|
+
inputSchema: (0, import_provider_utils15.lazySchema)(() => (0, import_provider_utils15.zodSchema)(import_v414.z.object({})))
|
|
3417
3468
|
});
|
|
3418
3469
|
|
|
3419
3470
|
// src/tool/vertex-rag-store.ts
|
|
3420
3471
|
var import_provider_utils16 = require("@ai-sdk/provider-utils");
|
|
3421
|
-
var
|
|
3472
|
+
var import_v415 = require("zod/v4");
|
|
3422
3473
|
var vertexRagStore = (0, import_provider_utils16.createProviderToolFactory)({
|
|
3423
3474
|
id: "google.vertex_rag_store",
|
|
3424
|
-
inputSchema:
|
|
3425
|
-
ragCorpus:
|
|
3426
|
-
topK:
|
|
3475
|
+
inputSchema: import_v415.z.object({
|
|
3476
|
+
ragCorpus: import_v415.z.string(),
|
|
3477
|
+
topK: import_v415.z.number().optional()
|
|
3427
3478
|
})
|
|
3428
3479
|
});
|
|
3429
3480
|
|
|
@@ -3489,7 +3540,7 @@ var googleTools = {
|
|
|
3489
3540
|
|
|
3490
3541
|
// src/google-generative-ai-image-model.ts
|
|
3491
3542
|
var import_provider_utils17 = require("@ai-sdk/provider-utils");
|
|
3492
|
-
var
|
|
3543
|
+
var import_v416 = require("zod/v4");
|
|
3493
3544
|
var GoogleGenerativeAIImageModel = class {
|
|
3494
3545
|
constructor(modelId, settings, config) {
|
|
3495
3546
|
this.modelId = modelId;
|
|
@@ -3745,11 +3796,11 @@ function isGeminiModel(modelId) {
|
|
|
3745
3796
|
}
|
|
3746
3797
|
var googleImageResponseSchema = (0, import_provider_utils17.lazySchema)(
|
|
3747
3798
|
() => (0, import_provider_utils17.zodSchema)(
|
|
3748
|
-
|
|
3749
|
-
predictions:
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3799
|
+
import_v416.z.object({
|
|
3800
|
+
predictions: import_v416.z.array(
|
|
3801
|
+
import_v416.z.union([
|
|
3802
|
+
import_v416.z.object({ bytesBase64Encoded: import_v416.z.string() }),
|
|
3803
|
+
import_v416.z.object({ raiFilteredReason: import_v416.z.string() })
|
|
3753
3804
|
])
|
|
3754
3805
|
).default([])
|
|
3755
3806
|
})
|
|
@@ -3757,9 +3808,9 @@ var googleImageResponseSchema = (0, import_provider_utils17.lazySchema)(
|
|
|
3757
3808
|
);
|
|
3758
3809
|
var googleImageModelOptionsSchema = (0, import_provider_utils17.lazySchema)(
|
|
3759
3810
|
() => (0, import_provider_utils17.zodSchema)(
|
|
3760
|
-
|
|
3761
|
-
personGeneration:
|
|
3762
|
-
aspectRatio:
|
|
3811
|
+
import_v416.z.object({
|
|
3812
|
+
personGeneration: import_v416.z.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
|
|
3813
|
+
aspectRatio: import_v416.z.enum(["1:1", "3:4", "4:3", "9:16", "16:9"]).nullish(),
|
|
3763
3814
|
/**
|
|
3764
3815
|
* Enable Google Search grounding for Gemini image models. The value is
|
|
3765
3816
|
* forwarded as the args of the `google.tools.googleSearch` provider
|
|
@@ -3777,7 +3828,7 @@ var googleImageModelOptionsSchema = (0, import_provider_utils17.lazySchema)(
|
|
|
3777
3828
|
// src/google-generative-ai-video-model.ts
|
|
3778
3829
|
var import_provider6 = require("@ai-sdk/provider");
|
|
3779
3830
|
var import_provider_utils18 = require("@ai-sdk/provider-utils");
|
|
3780
|
-
var
|
|
3831
|
+
var import_v417 = require("zod/v4");
|
|
3781
3832
|
function getFirstFrameImage(options) {
|
|
3782
3833
|
var _a2, _b;
|
|
3783
3834
|
return (_b = (_a2 = options.frameImages) == null ? void 0 : _a2.find((frame) => frame.frameType === "first_frame")) == null ? void 0 : _b.image;
|
|
@@ -4044,20 +4095,20 @@ var GoogleGenerativeAIVideoModel = class {
|
|
|
4044
4095
|
};
|
|
4045
4096
|
var googleOperationSchema = (0, import_provider_utils18.lazySchema)(
|
|
4046
4097
|
() => (0, import_provider_utils18.zodSchema)(
|
|
4047
|
-
|
|
4048
|
-
name:
|
|
4049
|
-
done:
|
|
4050
|
-
error:
|
|
4051
|
-
code:
|
|
4052
|
-
message:
|
|
4053
|
-
status:
|
|
4098
|
+
import_v417.z.object({
|
|
4099
|
+
name: import_v417.z.string().nullish(),
|
|
4100
|
+
done: import_v417.z.boolean().nullish(),
|
|
4101
|
+
error: import_v417.z.object({
|
|
4102
|
+
code: import_v417.z.number().nullish(),
|
|
4103
|
+
message: import_v417.z.string(),
|
|
4104
|
+
status: import_v417.z.string().nullish()
|
|
4054
4105
|
}).nullish(),
|
|
4055
|
-
response:
|
|
4056
|
-
generateVideoResponse:
|
|
4057
|
-
generatedSamples:
|
|
4058
|
-
|
|
4059
|
-
video:
|
|
4060
|
-
uri:
|
|
4106
|
+
response: import_v417.z.object({
|
|
4107
|
+
generateVideoResponse: import_v417.z.object({
|
|
4108
|
+
generatedSamples: import_v417.z.array(
|
|
4109
|
+
import_v417.z.object({
|
|
4110
|
+
video: import_v417.z.object({
|
|
4111
|
+
uri: import_v417.z.string().nullish()
|
|
4061
4112
|
}).nullish()
|
|
4062
4113
|
})
|
|
4063
4114
|
).nullish()
|
|
@@ -4068,15 +4119,15 @@ var googleOperationSchema = (0, import_provider_utils18.lazySchema)(
|
|
|
4068
4119
|
);
|
|
4069
4120
|
var googleVideoModelOptionsSchema = (0, import_provider_utils18.lazySchema)(
|
|
4070
4121
|
() => (0, import_provider_utils18.zodSchema)(
|
|
4071
|
-
|
|
4072
|
-
pollIntervalMs:
|
|
4073
|
-
pollTimeoutMs:
|
|
4074
|
-
personGeneration:
|
|
4075
|
-
negativePrompt:
|
|
4076
|
-
referenceImages:
|
|
4077
|
-
|
|
4078
|
-
bytesBase64Encoded:
|
|
4079
|
-
gcsUri:
|
|
4122
|
+
import_v417.z.object({
|
|
4123
|
+
pollIntervalMs: import_v417.z.number().positive().nullish(),
|
|
4124
|
+
pollTimeoutMs: import_v417.z.number().positive().nullish(),
|
|
4125
|
+
personGeneration: import_v417.z.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
|
|
4126
|
+
negativePrompt: import_v417.z.string().nullish(),
|
|
4127
|
+
referenceImages: import_v417.z.array(
|
|
4128
|
+
import_v417.z.object({
|
|
4129
|
+
bytesBase64Encoded: import_v417.z.string().nullish(),
|
|
4130
|
+
gcsUri: import_v417.z.string().nullish()
|
|
4080
4131
|
})
|
|
4081
4132
|
).nullish()
|
|
4082
4133
|
}).passthrough()
|
|
@@ -5241,30 +5292,30 @@ ${block.text}`
|
|
|
5241
5292
|
|
|
5242
5293
|
// src/interactions/google-interactions-api.ts
|
|
5243
5294
|
var import_provider_utils20 = require("@ai-sdk/provider-utils");
|
|
5244
|
-
var
|
|
5245
|
-
var tokenByModalitySchema = () =>
|
|
5246
|
-
modality:
|
|
5247
|
-
tokens:
|
|
5295
|
+
var import_v418 = require("zod/v4");
|
|
5296
|
+
var tokenByModalitySchema = () => import_v418.z.object({
|
|
5297
|
+
modality: import_v418.z.string().nullish(),
|
|
5298
|
+
tokens: import_v418.z.number().nullish()
|
|
5248
5299
|
}).loose();
|
|
5249
|
-
var usageSchema2 = () =>
|
|
5250
|
-
total_input_tokens:
|
|
5251
|
-
total_output_tokens:
|
|
5252
|
-
total_thought_tokens:
|
|
5253
|
-
total_cached_tokens:
|
|
5254
|
-
total_tool_use_tokens:
|
|
5255
|
-
total_tokens:
|
|
5256
|
-
input_tokens_by_modality:
|
|
5257
|
-
output_tokens_by_modality:
|
|
5258
|
-
cached_tokens_by_modality:
|
|
5259
|
-
tool_use_tokens_by_modality:
|
|
5260
|
-
grounding_tool_count:
|
|
5261
|
-
|
|
5262
|
-
type:
|
|
5263
|
-
count:
|
|
5300
|
+
var usageSchema2 = () => import_v418.z.object({
|
|
5301
|
+
total_input_tokens: import_v418.z.number().nullish(),
|
|
5302
|
+
total_output_tokens: import_v418.z.number().nullish(),
|
|
5303
|
+
total_thought_tokens: import_v418.z.number().nullish(),
|
|
5304
|
+
total_cached_tokens: import_v418.z.number().nullish(),
|
|
5305
|
+
total_tool_use_tokens: import_v418.z.number().nullish(),
|
|
5306
|
+
total_tokens: import_v418.z.number().nullish(),
|
|
5307
|
+
input_tokens_by_modality: import_v418.z.array(tokenByModalitySchema()).nullish(),
|
|
5308
|
+
output_tokens_by_modality: import_v418.z.array(tokenByModalitySchema()).nullish(),
|
|
5309
|
+
cached_tokens_by_modality: import_v418.z.array(tokenByModalitySchema()).nullish(),
|
|
5310
|
+
tool_use_tokens_by_modality: import_v418.z.array(tokenByModalitySchema()).nullish(),
|
|
5311
|
+
grounding_tool_count: import_v418.z.array(
|
|
5312
|
+
import_v418.z.object({
|
|
5313
|
+
type: import_v418.z.string().nullish(),
|
|
5314
|
+
count: import_v418.z.number().nullish()
|
|
5264
5315
|
}).loose()
|
|
5265
5316
|
).nullish()
|
|
5266
5317
|
}).loose();
|
|
5267
|
-
var interactionStatusSchema = () =>
|
|
5318
|
+
var interactionStatusSchema = () => import_v418.z.enum([
|
|
5268
5319
|
"in_progress",
|
|
5269
5320
|
"requires_action",
|
|
5270
5321
|
"completed",
|
|
@@ -5273,69 +5324,69 @@ var interactionStatusSchema = () => import_v417.z.enum([
|
|
|
5273
5324
|
"incomplete"
|
|
5274
5325
|
]);
|
|
5275
5326
|
var annotationSchema = () => {
|
|
5276
|
-
const urlCitation =
|
|
5277
|
-
type:
|
|
5278
|
-
url:
|
|
5279
|
-
title:
|
|
5280
|
-
start_index:
|
|
5281
|
-
end_index:
|
|
5327
|
+
const urlCitation = import_v418.z.object({
|
|
5328
|
+
type: import_v418.z.literal("url_citation"),
|
|
5329
|
+
url: import_v418.z.string().nullish(),
|
|
5330
|
+
title: import_v418.z.string().nullish(),
|
|
5331
|
+
start_index: import_v418.z.number().nullish(),
|
|
5332
|
+
end_index: import_v418.z.number().nullish()
|
|
5282
5333
|
}).loose();
|
|
5283
|
-
const fileCitation =
|
|
5284
|
-
type:
|
|
5285
|
-
file_name:
|
|
5286
|
-
document_uri:
|
|
5287
|
-
url:
|
|
5288
|
-
page_number:
|
|
5289
|
-
media_id:
|
|
5290
|
-
start_index:
|
|
5291
|
-
end_index:
|
|
5292
|
-
custom_metadata:
|
|
5334
|
+
const fileCitation = import_v418.z.object({
|
|
5335
|
+
type: import_v418.z.literal("file_citation"),
|
|
5336
|
+
file_name: import_v418.z.string().nullish(),
|
|
5337
|
+
document_uri: import_v418.z.string().nullish(),
|
|
5338
|
+
url: import_v418.z.string().nullish(),
|
|
5339
|
+
page_number: import_v418.z.number().nullish(),
|
|
5340
|
+
media_id: import_v418.z.string().nullish(),
|
|
5341
|
+
start_index: import_v418.z.number().nullish(),
|
|
5342
|
+
end_index: import_v418.z.number().nullish(),
|
|
5343
|
+
custom_metadata: import_v418.z.record(import_v418.z.string(), import_v418.z.unknown()).nullish()
|
|
5293
5344
|
}).loose();
|
|
5294
|
-
const placeCitation =
|
|
5295
|
-
type:
|
|
5296
|
-
name:
|
|
5297
|
-
url:
|
|
5298
|
-
place_id:
|
|
5299
|
-
start_index:
|
|
5300
|
-
end_index:
|
|
5345
|
+
const placeCitation = import_v418.z.object({
|
|
5346
|
+
type: import_v418.z.literal("place_citation"),
|
|
5347
|
+
name: import_v418.z.string().nullish(),
|
|
5348
|
+
url: import_v418.z.string().nullish(),
|
|
5349
|
+
place_id: import_v418.z.string().nullish(),
|
|
5350
|
+
start_index: import_v418.z.number().nullish(),
|
|
5351
|
+
end_index: import_v418.z.number().nullish()
|
|
5301
5352
|
}).loose();
|
|
5302
|
-
return
|
|
5353
|
+
return import_v418.z.union([
|
|
5303
5354
|
urlCitation,
|
|
5304
5355
|
fileCitation,
|
|
5305
5356
|
placeCitation,
|
|
5306
|
-
|
|
5357
|
+
import_v418.z.object({ type: import_v418.z.string() }).loose()
|
|
5307
5358
|
]);
|
|
5308
5359
|
};
|
|
5309
|
-
var thoughtSummaryItemSchema = () =>
|
|
5310
|
-
type:
|
|
5311
|
-
text:
|
|
5312
|
-
data:
|
|
5313
|
-
mime_type:
|
|
5360
|
+
var thoughtSummaryItemSchema = () => import_v418.z.object({
|
|
5361
|
+
type: import_v418.z.string(),
|
|
5362
|
+
text: import_v418.z.string().nullish(),
|
|
5363
|
+
data: import_v418.z.string().nullish(),
|
|
5364
|
+
mime_type: import_v418.z.string().nullish()
|
|
5314
5365
|
}).loose();
|
|
5315
5366
|
var contentBlockSchema = () => {
|
|
5316
|
-
const textContent =
|
|
5317
|
-
type:
|
|
5318
|
-
text:
|
|
5319
|
-
annotations:
|
|
5367
|
+
const textContent = import_v418.z.object({
|
|
5368
|
+
type: import_v418.z.literal("text"),
|
|
5369
|
+
text: import_v418.z.string(),
|
|
5370
|
+
annotations: import_v418.z.array(annotationSchema()).nullish()
|
|
5320
5371
|
}).loose();
|
|
5321
|
-
const imageContent =
|
|
5322
|
-
type:
|
|
5323
|
-
data:
|
|
5324
|
-
mime_type:
|
|
5325
|
-
resolution:
|
|
5326
|
-
uri:
|
|
5372
|
+
const imageContent = import_v418.z.object({
|
|
5373
|
+
type: import_v418.z.literal("image"),
|
|
5374
|
+
data: import_v418.z.string().nullish(),
|
|
5375
|
+
mime_type: import_v418.z.string().nullish(),
|
|
5376
|
+
resolution: import_v418.z.enum(["low", "medium", "high", "ultra_high"]).nullish(),
|
|
5377
|
+
uri: import_v418.z.string().nullish()
|
|
5327
5378
|
}).loose();
|
|
5328
|
-
const videoContent =
|
|
5329
|
-
type:
|
|
5330
|
-
data:
|
|
5331
|
-
mime_type:
|
|
5332
|
-
uri:
|
|
5379
|
+
const videoContent = import_v418.z.object({
|
|
5380
|
+
type: import_v418.z.literal("video"),
|
|
5381
|
+
data: import_v418.z.string().nullish(),
|
|
5382
|
+
mime_type: import_v418.z.string().nullish(),
|
|
5383
|
+
uri: import_v418.z.string().nullish()
|
|
5333
5384
|
}).loose();
|
|
5334
|
-
return
|
|
5385
|
+
return import_v418.z.union([
|
|
5335
5386
|
textContent,
|
|
5336
5387
|
imageContent,
|
|
5337
5388
|
videoContent,
|
|
5338
|
-
|
|
5389
|
+
import_v418.z.object({ type: import_v418.z.string() }).loose()
|
|
5339
5390
|
]);
|
|
5340
5391
|
};
|
|
5341
5392
|
var BUILTIN_TOOL_CALL_STEP_TYPES = [
|
|
@@ -5355,73 +5406,73 @@ var BUILTIN_TOOL_RESULT_STEP_TYPES = [
|
|
|
5355
5406
|
"mcp_server_tool_result"
|
|
5356
5407
|
];
|
|
5357
5408
|
var stepSchema = () => {
|
|
5358
|
-
const userInputStep =
|
|
5359
|
-
type:
|
|
5360
|
-
content:
|
|
5409
|
+
const userInputStep = import_v418.z.object({
|
|
5410
|
+
type: import_v418.z.literal("user_input"),
|
|
5411
|
+
content: import_v418.z.array(contentBlockSchema()).nullish()
|
|
5361
5412
|
}).loose();
|
|
5362
|
-
const modelOutputStep =
|
|
5363
|
-
type:
|
|
5364
|
-
content:
|
|
5413
|
+
const modelOutputStep = import_v418.z.object({
|
|
5414
|
+
type: import_v418.z.literal("model_output"),
|
|
5415
|
+
content: import_v418.z.array(contentBlockSchema()).nullish()
|
|
5365
5416
|
}).loose();
|
|
5366
|
-
const functionCallStep =
|
|
5367
|
-
type:
|
|
5368
|
-
id:
|
|
5369
|
-
name:
|
|
5370
|
-
arguments:
|
|
5371
|
-
signature:
|
|
5417
|
+
const functionCallStep = import_v418.z.object({
|
|
5418
|
+
type: import_v418.z.literal("function_call"),
|
|
5419
|
+
id: import_v418.z.string(),
|
|
5420
|
+
name: import_v418.z.string(),
|
|
5421
|
+
arguments: import_v418.z.record(import_v418.z.string(), import_v418.z.unknown()).nullish(),
|
|
5422
|
+
signature: import_v418.z.string().nullish()
|
|
5372
5423
|
}).loose();
|
|
5373
|
-
const thoughtStep =
|
|
5374
|
-
type:
|
|
5375
|
-
signature:
|
|
5376
|
-
summary:
|
|
5424
|
+
const thoughtStep = import_v418.z.object({
|
|
5425
|
+
type: import_v418.z.literal("thought"),
|
|
5426
|
+
signature: import_v418.z.string().nullish(),
|
|
5427
|
+
summary: import_v418.z.array(thoughtSummaryItemSchema()).nullish()
|
|
5377
5428
|
}).loose();
|
|
5378
|
-
const builtinToolCallStep =
|
|
5379
|
-
type:
|
|
5380
|
-
id:
|
|
5381
|
-
arguments:
|
|
5382
|
-
name:
|
|
5383
|
-
server_name:
|
|
5384
|
-
search_type:
|
|
5385
|
-
signature:
|
|
5429
|
+
const builtinToolCallStep = import_v418.z.object({
|
|
5430
|
+
type: import_v418.z.enum(BUILTIN_TOOL_CALL_STEP_TYPES),
|
|
5431
|
+
id: import_v418.z.string(),
|
|
5432
|
+
arguments: import_v418.z.record(import_v418.z.string(), import_v418.z.unknown()).nullish(),
|
|
5433
|
+
name: import_v418.z.string().nullish(),
|
|
5434
|
+
server_name: import_v418.z.string().nullish(),
|
|
5435
|
+
search_type: import_v418.z.string().nullish(),
|
|
5436
|
+
signature: import_v418.z.string().nullish()
|
|
5386
5437
|
}).loose();
|
|
5387
|
-
const builtinToolResultStep =
|
|
5388
|
-
type:
|
|
5389
|
-
call_id:
|
|
5390
|
-
result:
|
|
5391
|
-
is_error:
|
|
5392
|
-
name:
|
|
5393
|
-
server_name:
|
|
5394
|
-
signature:
|
|
5438
|
+
const builtinToolResultStep = import_v418.z.object({
|
|
5439
|
+
type: import_v418.z.enum(BUILTIN_TOOL_RESULT_STEP_TYPES),
|
|
5440
|
+
call_id: import_v418.z.string(),
|
|
5441
|
+
result: import_v418.z.unknown().nullish(),
|
|
5442
|
+
is_error: import_v418.z.boolean().nullish(),
|
|
5443
|
+
name: import_v418.z.string().nullish(),
|
|
5444
|
+
server_name: import_v418.z.string().nullish(),
|
|
5445
|
+
signature: import_v418.z.string().nullish()
|
|
5395
5446
|
}).loose();
|
|
5396
|
-
return
|
|
5447
|
+
return import_v418.z.union([
|
|
5397
5448
|
userInputStep,
|
|
5398
5449
|
modelOutputStep,
|
|
5399
5450
|
functionCallStep,
|
|
5400
5451
|
thoughtStep,
|
|
5401
5452
|
builtinToolCallStep,
|
|
5402
5453
|
builtinToolResultStep,
|
|
5403
|
-
|
|
5454
|
+
import_v418.z.object({ type: import_v418.z.string() }).loose()
|
|
5404
5455
|
]);
|
|
5405
5456
|
};
|
|
5406
5457
|
var googleInteractionsResponseSchema = (0, import_provider_utils20.lazySchema)(
|
|
5407
5458
|
() => (0, import_provider_utils20.zodSchema)(
|
|
5408
|
-
|
|
5459
|
+
import_v418.z.object({
|
|
5409
5460
|
/*
|
|
5410
5461
|
* `id` is omitted from the response body when `store: false` (fully
|
|
5411
5462
|
* stateless mode) — there is no server-side interaction record for the
|
|
5412
5463
|
* client to reference. `nullish` lets the schema accept that shape.
|
|
5413
5464
|
*/
|
|
5414
|
-
id:
|
|
5415
|
-
created:
|
|
5416
|
-
updated:
|
|
5465
|
+
id: import_v418.z.string().nullish(),
|
|
5466
|
+
created: import_v418.z.string().nullish(),
|
|
5467
|
+
updated: import_v418.z.string().nullish(),
|
|
5417
5468
|
status: interactionStatusSchema(),
|
|
5418
|
-
model:
|
|
5419
|
-
agent:
|
|
5420
|
-
steps:
|
|
5469
|
+
model: import_v418.z.string().nullish(),
|
|
5470
|
+
agent: import_v418.z.string().nullish(),
|
|
5471
|
+
steps: import_v418.z.array(stepSchema()).nullish(),
|
|
5421
5472
|
usage: usageSchema2().nullish(),
|
|
5422
|
-
service_tier:
|
|
5423
|
-
previous_interaction_id:
|
|
5424
|
-
response_modalities:
|
|
5473
|
+
service_tier: import_v418.z.string().nullish(),
|
|
5474
|
+
previous_interaction_id: import_v418.z.string().nullish(),
|
|
5475
|
+
response_modalities: import_v418.z.array(import_v418.z.string()).nullish()
|
|
5425
5476
|
}).loose()
|
|
5426
5477
|
)
|
|
5427
5478
|
);
|
|
@@ -5431,82 +5482,82 @@ var googleInteractionsEventSchema = (0, import_provider_utils20.lazySchema)(
|
|
|
5431
5482
|
const status = interactionStatusSchema();
|
|
5432
5483
|
const annotation = annotationSchema();
|
|
5433
5484
|
const thoughtSummaryItem = thoughtSummaryItemSchema();
|
|
5434
|
-
const interactionCreatedEvent =
|
|
5435
|
-
event_type:
|
|
5436
|
-
event_id:
|
|
5437
|
-
interaction:
|
|
5485
|
+
const interactionCreatedEvent = import_v418.z.object({
|
|
5486
|
+
event_type: import_v418.z.literal("interaction.created"),
|
|
5487
|
+
event_id: import_v418.z.string().nullish(),
|
|
5488
|
+
interaction: import_v418.z.object({
|
|
5438
5489
|
/*
|
|
5439
5490
|
* `id` is omitted when `store: false` (fully stateless mode);
|
|
5440
5491
|
* see the matching note on `googleInteractionsResponseSchema.id`.
|
|
5441
5492
|
*/
|
|
5442
|
-
id:
|
|
5443
|
-
created:
|
|
5444
|
-
model:
|
|
5445
|
-
agent:
|
|
5493
|
+
id: import_v418.z.string().nullish(),
|
|
5494
|
+
created: import_v418.z.string().nullish(),
|
|
5495
|
+
model: import_v418.z.string().nullish(),
|
|
5496
|
+
agent: import_v418.z.string().nullish(),
|
|
5446
5497
|
status: status.nullish()
|
|
5447
5498
|
}).loose()
|
|
5448
5499
|
}).loose();
|
|
5449
|
-
const stepStartEvent =
|
|
5450
|
-
event_type:
|
|
5451
|
-
event_id:
|
|
5452
|
-
index:
|
|
5500
|
+
const stepStartEvent = import_v418.z.object({
|
|
5501
|
+
event_type: import_v418.z.literal("step.start"),
|
|
5502
|
+
event_id: import_v418.z.string().nullish(),
|
|
5503
|
+
index: import_v418.z.number(),
|
|
5453
5504
|
step: stepSchema()
|
|
5454
5505
|
}).loose();
|
|
5455
|
-
const stepDeltaText =
|
|
5456
|
-
type:
|
|
5457
|
-
text:
|
|
5506
|
+
const stepDeltaText = import_v418.z.object({
|
|
5507
|
+
type: import_v418.z.literal("text"),
|
|
5508
|
+
text: import_v418.z.string()
|
|
5458
5509
|
}).loose();
|
|
5459
|
-
const stepDeltaThoughtSummary =
|
|
5460
|
-
type:
|
|
5510
|
+
const stepDeltaThoughtSummary = import_v418.z.object({
|
|
5511
|
+
type: import_v418.z.literal("thought_summary"),
|
|
5461
5512
|
content: thoughtSummaryItem.nullish()
|
|
5462
5513
|
}).loose();
|
|
5463
|
-
const stepDeltaThoughtSignature =
|
|
5464
|
-
type:
|
|
5465
|
-
signature:
|
|
5514
|
+
const stepDeltaThoughtSignature = import_v418.z.object({
|
|
5515
|
+
type: import_v418.z.literal("thought_signature"),
|
|
5516
|
+
signature: import_v418.z.string().nullish()
|
|
5466
5517
|
}).loose();
|
|
5467
|
-
const stepDeltaArgumentsDelta =
|
|
5468
|
-
type:
|
|
5469
|
-
arguments:
|
|
5470
|
-
id:
|
|
5471
|
-
signature:
|
|
5518
|
+
const stepDeltaArgumentsDelta = import_v418.z.object({
|
|
5519
|
+
type: import_v418.z.literal("arguments_delta"),
|
|
5520
|
+
arguments: import_v418.z.string().nullish(),
|
|
5521
|
+
id: import_v418.z.string().nullish(),
|
|
5522
|
+
signature: import_v418.z.string().nullish()
|
|
5472
5523
|
}).loose();
|
|
5473
|
-
const stepDeltaTextAnnotation =
|
|
5474
|
-
type:
|
|
5475
|
-
annotations:
|
|
5524
|
+
const stepDeltaTextAnnotation = import_v418.z.object({
|
|
5525
|
+
type: import_v418.z.enum(["text_annotation_delta", "text_annotation"]),
|
|
5526
|
+
annotations: import_v418.z.array(annotation).nullish()
|
|
5476
5527
|
}).loose();
|
|
5477
|
-
const stepDeltaImage =
|
|
5478
|
-
type:
|
|
5479
|
-
data:
|
|
5480
|
-
mime_type:
|
|
5481
|
-
resolution:
|
|
5482
|
-
uri:
|
|
5528
|
+
const stepDeltaImage = import_v418.z.object({
|
|
5529
|
+
type: import_v418.z.literal("image"),
|
|
5530
|
+
data: import_v418.z.string().nullish(),
|
|
5531
|
+
mime_type: import_v418.z.string().nullish(),
|
|
5532
|
+
resolution: import_v418.z.enum(["low", "medium", "high", "ultra_high"]).nullish(),
|
|
5533
|
+
uri: import_v418.z.string().nullish()
|
|
5483
5534
|
}).loose();
|
|
5484
|
-
const stepDeltaVideo =
|
|
5485
|
-
type:
|
|
5486
|
-
data:
|
|
5487
|
-
mime_type:
|
|
5488
|
-
uri:
|
|
5535
|
+
const stepDeltaVideo = import_v418.z.object({
|
|
5536
|
+
type: import_v418.z.literal("video"),
|
|
5537
|
+
data: import_v418.z.string().nullish(),
|
|
5538
|
+
mime_type: import_v418.z.string().nullish(),
|
|
5539
|
+
uri: import_v418.z.string().nullish()
|
|
5489
5540
|
}).loose();
|
|
5490
|
-
const stepDeltaBuiltinToolCall =
|
|
5491
|
-
type:
|
|
5492
|
-
id:
|
|
5493
|
-
arguments:
|
|
5494
|
-
name:
|
|
5495
|
-
server_name:
|
|
5496
|
-
search_type:
|
|
5497
|
-
signature:
|
|
5541
|
+
const stepDeltaBuiltinToolCall = import_v418.z.object({
|
|
5542
|
+
type: import_v418.z.enum(BUILTIN_TOOL_CALL_STEP_TYPES),
|
|
5543
|
+
id: import_v418.z.string().nullish(),
|
|
5544
|
+
arguments: import_v418.z.record(import_v418.z.string(), import_v418.z.unknown()).nullish(),
|
|
5545
|
+
name: import_v418.z.string().nullish(),
|
|
5546
|
+
server_name: import_v418.z.string().nullish(),
|
|
5547
|
+
search_type: import_v418.z.string().nullish(),
|
|
5548
|
+
signature: import_v418.z.string().nullish()
|
|
5498
5549
|
}).loose();
|
|
5499
|
-
const stepDeltaBuiltinToolResult =
|
|
5500
|
-
type:
|
|
5501
|
-
call_id:
|
|
5502
|
-
result:
|
|
5503
|
-
is_error:
|
|
5504
|
-
name:
|
|
5505
|
-
server_name:
|
|
5506
|
-
signature:
|
|
5550
|
+
const stepDeltaBuiltinToolResult = import_v418.z.object({
|
|
5551
|
+
type: import_v418.z.enum(BUILTIN_TOOL_RESULT_STEP_TYPES),
|
|
5552
|
+
call_id: import_v418.z.string().nullish(),
|
|
5553
|
+
result: import_v418.z.unknown().nullish(),
|
|
5554
|
+
is_error: import_v418.z.boolean().nullish(),
|
|
5555
|
+
name: import_v418.z.string().nullish(),
|
|
5556
|
+
server_name: import_v418.z.string().nullish(),
|
|
5557
|
+
signature: import_v418.z.string().nullish()
|
|
5507
5558
|
}).loose();
|
|
5508
|
-
const stepDeltaUnknown =
|
|
5509
|
-
const stepDeltaUnion =
|
|
5559
|
+
const stepDeltaUnknown = import_v418.z.object({ type: import_v418.z.string() }).loose();
|
|
5560
|
+
const stepDeltaUnion = import_v418.z.union([
|
|
5510
5561
|
stepDeltaText,
|
|
5511
5562
|
stepDeltaImage,
|
|
5512
5563
|
stepDeltaVideo,
|
|
@@ -5518,55 +5569,55 @@ var googleInteractionsEventSchema = (0, import_provider_utils20.lazySchema)(
|
|
|
5518
5569
|
stepDeltaBuiltinToolResult,
|
|
5519
5570
|
stepDeltaUnknown
|
|
5520
5571
|
]);
|
|
5521
|
-
const stepDeltaEvent =
|
|
5522
|
-
event_type:
|
|
5523
|
-
event_id:
|
|
5524
|
-
index:
|
|
5572
|
+
const stepDeltaEvent = import_v418.z.object({
|
|
5573
|
+
event_type: import_v418.z.literal("step.delta"),
|
|
5574
|
+
event_id: import_v418.z.string().nullish(),
|
|
5575
|
+
index: import_v418.z.number(),
|
|
5525
5576
|
delta: stepDeltaUnion
|
|
5526
5577
|
}).loose();
|
|
5527
|
-
const stepStopEvent =
|
|
5528
|
-
event_type:
|
|
5529
|
-
event_id:
|
|
5530
|
-
index:
|
|
5578
|
+
const stepStopEvent = import_v418.z.object({
|
|
5579
|
+
event_type: import_v418.z.literal("step.stop"),
|
|
5580
|
+
event_id: import_v418.z.string().nullish(),
|
|
5581
|
+
index: import_v418.z.number()
|
|
5531
5582
|
}).loose();
|
|
5532
|
-
const interactionStatusUpdateEvent =
|
|
5533
|
-
event_type:
|
|
5534
|
-
event_id:
|
|
5535
|
-
interaction_id:
|
|
5583
|
+
const interactionStatusUpdateEvent = import_v418.z.object({
|
|
5584
|
+
event_type: import_v418.z.literal("interaction.status_update"),
|
|
5585
|
+
event_id: import_v418.z.string().nullish(),
|
|
5586
|
+
interaction_id: import_v418.z.string().nullish(),
|
|
5536
5587
|
status: status.nullish()
|
|
5537
5588
|
}).loose();
|
|
5538
|
-
const interactionInProgressEvent =
|
|
5539
|
-
event_type:
|
|
5540
|
-
event_id:
|
|
5541
|
-
interaction_id:
|
|
5589
|
+
const interactionInProgressEvent = import_v418.z.object({
|
|
5590
|
+
event_type: import_v418.z.literal("interaction.in_progress"),
|
|
5591
|
+
event_id: import_v418.z.string().nullish(),
|
|
5592
|
+
interaction_id: import_v418.z.string().nullish(),
|
|
5542
5593
|
status: status.nullish()
|
|
5543
5594
|
}).loose();
|
|
5544
|
-
const interactionRequiresActionEvent =
|
|
5545
|
-
event_type:
|
|
5546
|
-
event_id:
|
|
5547
|
-
interaction_id:
|
|
5595
|
+
const interactionRequiresActionEvent = import_v418.z.object({
|
|
5596
|
+
event_type: import_v418.z.literal("interaction.requires_action"),
|
|
5597
|
+
event_id: import_v418.z.string().nullish(),
|
|
5598
|
+
interaction_id: import_v418.z.string().nullish(),
|
|
5548
5599
|
status: status.nullish()
|
|
5549
5600
|
}).loose();
|
|
5550
|
-
const interactionCompletedEvent =
|
|
5551
|
-
event_type:
|
|
5552
|
-
event_id:
|
|
5553
|
-
interaction:
|
|
5554
|
-
id:
|
|
5601
|
+
const interactionCompletedEvent = import_v418.z.object({
|
|
5602
|
+
event_type: import_v418.z.literal("interaction.completed"),
|
|
5603
|
+
event_id: import_v418.z.string().nullish(),
|
|
5604
|
+
interaction: import_v418.z.object({
|
|
5605
|
+
id: import_v418.z.string().nullish(),
|
|
5555
5606
|
status: status.nullish(),
|
|
5556
5607
|
usage: usageSchema2().nullish(),
|
|
5557
|
-
service_tier:
|
|
5608
|
+
service_tier: import_v418.z.string().nullish()
|
|
5558
5609
|
}).loose()
|
|
5559
5610
|
}).loose();
|
|
5560
|
-
const errorEvent =
|
|
5561
|
-
event_type:
|
|
5562
|
-
event_id:
|
|
5563
|
-
error:
|
|
5564
|
-
code:
|
|
5565
|
-
message:
|
|
5611
|
+
const errorEvent = import_v418.z.object({
|
|
5612
|
+
event_type: import_v418.z.literal("error"),
|
|
5613
|
+
event_id: import_v418.z.string().nullish(),
|
|
5614
|
+
error: import_v418.z.object({
|
|
5615
|
+
code: import_v418.z.string().nullish(),
|
|
5616
|
+
message: import_v418.z.string().nullish()
|
|
5566
5617
|
}).loose().nullish()
|
|
5567
5618
|
}).loose();
|
|
5568
|
-
const unknownEvent =
|
|
5569
|
-
return
|
|
5619
|
+
const unknownEvent = import_v418.z.object({ event_type: import_v418.z.string() }).loose();
|
|
5620
|
+
return import_v418.z.union([
|
|
5570
5621
|
interactionCreatedEvent,
|
|
5571
5622
|
stepStartEvent,
|
|
5572
5623
|
stepDeltaEvent,
|
|
@@ -5584,26 +5635,26 @@ var googleInteractionsEventSchema = (0, import_provider_utils20.lazySchema)(
|
|
|
5584
5635
|
|
|
5585
5636
|
// src/interactions/google-interactions-language-model-options.ts
|
|
5586
5637
|
var import_provider_utils21 = require("@ai-sdk/provider-utils");
|
|
5587
|
-
var
|
|
5638
|
+
var import_v419 = require("zod/v4");
|
|
5588
5639
|
var googleInteractionsLanguageModelOptions = (0, import_provider_utils21.lazySchema)(
|
|
5589
5640
|
() => (0, import_provider_utils21.zodSchema)(
|
|
5590
|
-
|
|
5591
|
-
previousInteractionId:
|
|
5592
|
-
store:
|
|
5593
|
-
agent:
|
|
5594
|
-
agentConfig:
|
|
5595
|
-
|
|
5596
|
-
type:
|
|
5641
|
+
import_v419.z.object({
|
|
5642
|
+
previousInteractionId: import_v419.z.string().nullish(),
|
|
5643
|
+
store: import_v419.z.boolean().nullish(),
|
|
5644
|
+
agent: import_v419.z.string().nullish(),
|
|
5645
|
+
agentConfig: import_v419.z.union([
|
|
5646
|
+
import_v419.z.object({
|
|
5647
|
+
type: import_v419.z.literal("dynamic")
|
|
5597
5648
|
}).loose(),
|
|
5598
|
-
|
|
5599
|
-
type:
|
|
5600
|
-
thinkingSummaries:
|
|
5601
|
-
visualization:
|
|
5602
|
-
collaborativePlanning:
|
|
5649
|
+
import_v419.z.object({
|
|
5650
|
+
type: import_v419.z.literal("deep-research"),
|
|
5651
|
+
thinkingSummaries: import_v419.z.enum(["auto", "none"]).nullish(),
|
|
5652
|
+
visualization: import_v419.z.enum(["off", "auto"]).nullish(),
|
|
5653
|
+
collaborativePlanning: import_v419.z.boolean().nullish()
|
|
5603
5654
|
})
|
|
5604
5655
|
]).nullish(),
|
|
5605
|
-
thinkingLevel:
|
|
5606
|
-
thinkingSummaries:
|
|
5656
|
+
thinkingLevel: import_v419.z.enum(["minimal", "low", "medium", "high"]).nullish(),
|
|
5657
|
+
thinkingSummaries: import_v419.z.enum(["auto", "none"]).nullish(),
|
|
5607
5658
|
/**
|
|
5608
5659
|
* Output-format entries that map directly to the API's `response_format`
|
|
5609
5660
|
* array. Use this to request image, audio, video, or non-JSON text
|
|
@@ -5613,17 +5664,17 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils21.lazySch
|
|
|
5613
5664
|
* type: 'json', schema }` still drives JSON-mode and adds a matching
|
|
5614
5665
|
* text entry automatically; entries listed here are appended.
|
|
5615
5666
|
*/
|
|
5616
|
-
responseFormat:
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
type:
|
|
5620
|
-
mimeType:
|
|
5621
|
-
schema:
|
|
5667
|
+
responseFormat: import_v419.z.array(
|
|
5668
|
+
import_v419.z.union([
|
|
5669
|
+
import_v419.z.object({
|
|
5670
|
+
type: import_v419.z.literal("text"),
|
|
5671
|
+
mimeType: import_v419.z.string().nullish(),
|
|
5672
|
+
schema: import_v419.z.unknown().nullish()
|
|
5622
5673
|
}).loose(),
|
|
5623
|
-
|
|
5624
|
-
type:
|
|
5625
|
-
mimeType:
|
|
5626
|
-
aspectRatio:
|
|
5674
|
+
import_v419.z.object({
|
|
5675
|
+
type: import_v419.z.literal("image"),
|
|
5676
|
+
mimeType: import_v419.z.string().nullish(),
|
|
5677
|
+
aspectRatio: import_v419.z.enum([
|
|
5627
5678
|
"1:1",
|
|
5628
5679
|
"2:3",
|
|
5629
5680
|
"3:2",
|
|
@@ -5639,19 +5690,19 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils21.lazySch
|
|
|
5639
5690
|
"1:4",
|
|
5640
5691
|
"4:1"
|
|
5641
5692
|
]).nullish(),
|
|
5642
|
-
imageSize:
|
|
5693
|
+
imageSize: import_v419.z.enum(["1K", "2K", "4K", "512"]).nullish()
|
|
5643
5694
|
}).loose(),
|
|
5644
|
-
|
|
5645
|
-
type:
|
|
5646
|
-
mimeType:
|
|
5695
|
+
import_v419.z.object({
|
|
5696
|
+
type: import_v419.z.literal("audio"),
|
|
5697
|
+
mimeType: import_v419.z.string().nullish()
|
|
5647
5698
|
}).loose(),
|
|
5648
|
-
|
|
5649
|
-
type:
|
|
5650
|
-
aspectRatio:
|
|
5651
|
-
resolution:
|
|
5652
|
-
duration:
|
|
5653
|
-
delivery:
|
|
5654
|
-
gcsUri:
|
|
5699
|
+
import_v419.z.object({
|
|
5700
|
+
type: import_v419.z.literal("video"),
|
|
5701
|
+
aspectRatio: import_v419.z.enum(["16:9", "9:16"]).nullish(),
|
|
5702
|
+
resolution: import_v419.z.enum(["360p", "720p", "1080p", "4k"]).nullish(),
|
|
5703
|
+
duration: import_v419.z.string().nullish(),
|
|
5704
|
+
delivery: import_v419.z.enum(["inline", "uri"]).nullish(),
|
|
5705
|
+
gcsUri: import_v419.z.string().nullish()
|
|
5655
5706
|
}).loose()
|
|
5656
5707
|
])
|
|
5657
5708
|
).nullish(),
|
|
@@ -5661,8 +5712,8 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils21.lazySch
|
|
|
5661
5712
|
* translates it into a matching `response_format` image entry and
|
|
5662
5713
|
* emits a warning when set.
|
|
5663
5714
|
*/
|
|
5664
|
-
imageConfig:
|
|
5665
|
-
aspectRatio:
|
|
5715
|
+
imageConfig: import_v419.z.object({
|
|
5716
|
+
aspectRatio: import_v419.z.enum([
|
|
5666
5717
|
"1:1",
|
|
5667
5718
|
"2:3",
|
|
5668
5719
|
"3:2",
|
|
@@ -5678,35 +5729,35 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils21.lazySch
|
|
|
5678
5729
|
"1:4",
|
|
5679
5730
|
"4:1"
|
|
5680
5731
|
]).nullish(),
|
|
5681
|
-
imageSize:
|
|
5732
|
+
imageSize: import_v419.z.enum(["1K", "2K", "4K", "512"]).nullish()
|
|
5682
5733
|
}).nullish(),
|
|
5683
|
-
mediaResolution:
|
|
5684
|
-
responseModalities:
|
|
5685
|
-
serviceTier:
|
|
5734
|
+
mediaResolution: import_v419.z.enum(["low", "medium", "high", "ultra_high"]).nullish(),
|
|
5735
|
+
responseModalities: import_v419.z.array(import_v419.z.enum(["text", "image", "audio", "video", "document"])).nullish(),
|
|
5736
|
+
serviceTier: import_v419.z.enum(["flex", "standard", "priority"]).nullish(),
|
|
5686
5737
|
/**
|
|
5687
5738
|
* Alternative to AI SDK `system` message. If both are set, the AI SDK
|
|
5688
5739
|
* `system` message wins and a warning is emitted.
|
|
5689
5740
|
*/
|
|
5690
|
-
systemInstruction:
|
|
5741
|
+
systemInstruction: import_v419.z.string().nullish(),
|
|
5691
5742
|
/**
|
|
5692
5743
|
* Per-block signature for round-tripping `thought.signature` and
|
|
5693
5744
|
* `function_call.signature` blocks. Set by the SDK on output reasoning /
|
|
5694
5745
|
* tool-call parts; passed back unchanged on input parts so the API
|
|
5695
5746
|
* accepts the prior turn.
|
|
5696
5747
|
*/
|
|
5697
|
-
signature:
|
|
5748
|
+
signature: import_v419.z.string().nullish(),
|
|
5698
5749
|
/**
|
|
5699
5750
|
* Set by the SDK on output assistant messages. The converter uses it to
|
|
5700
5751
|
* decide which messages to drop when compacting under
|
|
5701
5752
|
* `previousInteractionId`.
|
|
5702
5753
|
*/
|
|
5703
|
-
interactionId:
|
|
5754
|
+
interactionId: import_v419.z.string().nullish(),
|
|
5704
5755
|
/**
|
|
5705
5756
|
* Maximum time, in milliseconds, to poll a background interaction (agent
|
|
5706
5757
|
* call) before giving up. Defaults to 30 minutes. Long-running agents
|
|
5707
5758
|
* such as deep research can take tens of minutes — increase if needed.
|
|
5708
5759
|
*/
|
|
5709
|
-
pollingTimeoutMs:
|
|
5760
|
+
pollingTimeoutMs: import_v419.z.number().int().positive().nullish(),
|
|
5710
5761
|
/**
|
|
5711
5762
|
* Run the interaction in the background. Required for agents whose
|
|
5712
5763
|
* server-side workflow cannot complete within a single request/response.
|
|
@@ -5715,7 +5766,7 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils21.lazySch
|
|
|
5715
5766
|
* reject `true`; see the agent's documentation for which mode it
|
|
5716
5767
|
* requires.
|
|
5717
5768
|
*/
|
|
5718
|
-
background:
|
|
5769
|
+
background: import_v419.z.boolean().nullish(),
|
|
5719
5770
|
/**
|
|
5720
5771
|
* Environment configuration for the agent sandbox. Only applies to agent
|
|
5721
5772
|
* calls (`google.interactions({ agent })`); ignored on model-id calls.
|
|
@@ -5725,36 +5776,36 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils21.lazySch
|
|
|
5725
5776
|
* - object: provision a fresh sandbox and optionally preload `sources`
|
|
5726
5777
|
* and/or constrain outbound traffic via `network`.
|
|
5727
5778
|
*/
|
|
5728
|
-
environment:
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
type:
|
|
5732
|
-
sources:
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
type:
|
|
5736
|
-
source:
|
|
5737
|
-
target:
|
|
5779
|
+
environment: import_v419.z.union([
|
|
5780
|
+
import_v419.z.string(),
|
|
5781
|
+
import_v419.z.object({
|
|
5782
|
+
type: import_v419.z.literal("remote"),
|
|
5783
|
+
sources: import_v419.z.array(
|
|
5784
|
+
import_v419.z.union([
|
|
5785
|
+
import_v419.z.object({
|
|
5786
|
+
type: import_v419.z.literal("gcs"),
|
|
5787
|
+
source: import_v419.z.string(),
|
|
5788
|
+
target: import_v419.z.string().nullish()
|
|
5738
5789
|
}),
|
|
5739
|
-
|
|
5740
|
-
type:
|
|
5741
|
-
source:
|
|
5742
|
-
target:
|
|
5790
|
+
import_v419.z.object({
|
|
5791
|
+
type: import_v419.z.literal("repository"),
|
|
5792
|
+
source: import_v419.z.string(),
|
|
5793
|
+
target: import_v419.z.string().nullish()
|
|
5743
5794
|
}),
|
|
5744
|
-
|
|
5745
|
-
type:
|
|
5746
|
-
content:
|
|
5747
|
-
target:
|
|
5795
|
+
import_v419.z.object({
|
|
5796
|
+
type: import_v419.z.literal("inline"),
|
|
5797
|
+
content: import_v419.z.string(),
|
|
5798
|
+
target: import_v419.z.string()
|
|
5748
5799
|
})
|
|
5749
5800
|
])
|
|
5750
5801
|
).nullish(),
|
|
5751
|
-
network:
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
allowlist:
|
|
5755
|
-
|
|
5756
|
-
domain:
|
|
5757
|
-
transform:
|
|
5802
|
+
network: import_v419.z.union([
|
|
5803
|
+
import_v419.z.literal("disabled"),
|
|
5804
|
+
import_v419.z.object({
|
|
5805
|
+
allowlist: import_v419.z.array(
|
|
5806
|
+
import_v419.z.object({
|
|
5807
|
+
domain: import_v419.z.string(),
|
|
5808
|
+
transform: import_v419.z.array(import_v419.z.record(import_v419.z.string(), import_v419.z.string())).nullish()
|
|
5758
5809
|
})
|
|
5759
5810
|
)
|
|
5760
5811
|
})
|