@ai-sdk/google 3.0.0-beta.80 → 3.0.0-beta.81

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.
@@ -514,6 +514,17 @@ function prepareTools({
514
514
  googleTools2.push({ googleSearchRetrieval: {} });
515
515
  }
516
516
  break;
517
+ case "google.enterprise_web_search":
518
+ if (isGemini2orNewer) {
519
+ googleTools2.push({ enterpriseWebSearch: {} });
520
+ } else {
521
+ toolWarnings.push({
522
+ type: "unsupported",
523
+ feature: `provider-defined tool ${tool.id}`,
524
+ details: "Enterprise Web Search requires Gemini 2.0 or newer."
525
+ });
526
+ }
527
+ break;
517
528
  case "google.url_context":
518
529
  if (isGemini2orNewer) {
519
530
  googleTools2.push({ urlContext: {} });
@@ -1418,63 +1429,75 @@ var codeExecution = createProviderToolFactoryWithOutputSchema({
1418
1429
  })
1419
1430
  });
1420
1431
 
1421
- // src/tool/file-search.ts
1432
+ // src/tool/enterprise-web-search.ts
1422
1433
  import {
1423
1434
  createProviderToolFactory,
1424
1435
  lazySchema as lazySchema4,
1425
1436
  zodSchema as zodSchema4
1426
1437
  } from "@ai-sdk/provider-utils";
1427
1438
  import { z as z5 } from "zod/v4";
1428
- var fileSearchArgsBaseSchema = z5.object({
1439
+ var enterpriseWebSearch = createProviderToolFactory({
1440
+ id: "google.enterprise_web_search",
1441
+ inputSchema: lazySchema4(() => zodSchema4(z5.object({})))
1442
+ });
1443
+
1444
+ // src/tool/file-search.ts
1445
+ import {
1446
+ createProviderToolFactory as createProviderToolFactory2,
1447
+ lazySchema as lazySchema5,
1448
+ zodSchema as zodSchema5
1449
+ } from "@ai-sdk/provider-utils";
1450
+ import { z as z6 } from "zod/v4";
1451
+ var fileSearchArgsBaseSchema = z6.object({
1429
1452
  /** The names of the file_search_stores to retrieve from.
1430
1453
  * Example: `fileSearchStores/my-file-search-store-123`
1431
1454
  */
1432
- fileSearchStoreNames: z5.array(z5.string()).describe(
1455
+ fileSearchStoreNames: z6.array(z6.string()).describe(
1433
1456
  "The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`"
1434
1457
  ),
1435
1458
  /** The number of file search retrieval chunks to retrieve. */
1436
- topK: z5.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),
1459
+ topK: z6.number().int().positive().describe("The number of file search retrieval chunks to retrieve.").optional(),
1437
1460
  /** Metadata filter to apply to the file search retrieval documents.
1438
1461
  * See https://google.aip.dev/160 for the syntax of the filter expression.
1439
1462
  */
1440
- metadataFilter: z5.string().describe(
1463
+ metadataFilter: z6.string().describe(
1441
1464
  "Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression."
1442
1465
  ).optional()
1443
1466
  }).passthrough();
1444
- var fileSearchArgsSchema = lazySchema4(
1445
- () => zodSchema4(fileSearchArgsBaseSchema)
1467
+ var fileSearchArgsSchema = lazySchema5(
1468
+ () => zodSchema5(fileSearchArgsBaseSchema)
1446
1469
  );
1447
- var fileSearch = createProviderToolFactory({
1470
+ var fileSearch = createProviderToolFactory2({
1448
1471
  id: "google.file_search",
1449
1472
  inputSchema: fileSearchArgsSchema
1450
1473
  });
1451
1474
 
1452
1475
  // src/tool/google-maps.ts
1453
1476
  import {
1454
- createProviderToolFactory as createProviderToolFactory2,
1455
- lazySchema as lazySchema5,
1456
- zodSchema as zodSchema5
1477
+ createProviderToolFactory as createProviderToolFactory3,
1478
+ lazySchema as lazySchema6,
1479
+ zodSchema as zodSchema6
1457
1480
  } from "@ai-sdk/provider-utils";
1458
- import { z as z6 } from "zod/v4";
1459
- var googleMaps = createProviderToolFactory2({
1481
+ import { z as z7 } from "zod/v4";
1482
+ var googleMaps = createProviderToolFactory3({
1460
1483
  id: "google.google_maps",
1461
- inputSchema: lazySchema5(() => zodSchema5(z6.object({})))
1484
+ inputSchema: lazySchema6(() => zodSchema6(z7.object({})))
1462
1485
  });
1463
1486
 
1464
1487
  // src/tool/google-search.ts
1465
1488
  import {
1466
- createProviderToolFactory as createProviderToolFactory3,
1467
- lazySchema as lazySchema6,
1468
- zodSchema as zodSchema6
1489
+ createProviderToolFactory as createProviderToolFactory4,
1490
+ lazySchema as lazySchema7,
1491
+ zodSchema as zodSchema7
1469
1492
  } from "@ai-sdk/provider-utils";
1470
- import { z as z7 } from "zod/v4";
1471
- var googleSearch = createProviderToolFactory3({
1493
+ import { z as z8 } from "zod/v4";
1494
+ var googleSearch = createProviderToolFactory4({
1472
1495
  id: "google.google_search",
1473
- inputSchema: lazySchema6(
1474
- () => zodSchema6(
1475
- z7.object({
1476
- mode: z7.enum(["MODE_DYNAMIC", "MODE_UNSPECIFIED"]).default("MODE_UNSPECIFIED"),
1477
- dynamicThreshold: z7.number().default(1)
1496
+ inputSchema: lazySchema7(
1497
+ () => zodSchema7(
1498
+ z8.object({
1499
+ mode: z8.enum(["MODE_DYNAMIC", "MODE_UNSPECIFIED"]).default("MODE_UNSPECIFIED"),
1500
+ dynamicThreshold: z8.number().default(1)
1478
1501
  })
1479
1502
  )
1480
1503
  )
@@ -1482,24 +1505,24 @@ var googleSearch = createProviderToolFactory3({
1482
1505
 
1483
1506
  // src/tool/url-context.ts
1484
1507
  import {
1485
- createProviderToolFactory as createProviderToolFactory4,
1486
- lazySchema as lazySchema7,
1487
- zodSchema as zodSchema7
1508
+ createProviderToolFactory as createProviderToolFactory5,
1509
+ lazySchema as lazySchema8,
1510
+ zodSchema as zodSchema8
1488
1511
  } from "@ai-sdk/provider-utils";
1489
- import { z as z8 } from "zod/v4";
1490
- var urlContext = createProviderToolFactory4({
1512
+ import { z as z9 } from "zod/v4";
1513
+ var urlContext = createProviderToolFactory5({
1491
1514
  id: "google.url_context",
1492
- inputSchema: lazySchema7(() => zodSchema7(z8.object({})))
1515
+ inputSchema: lazySchema8(() => zodSchema8(z9.object({})))
1493
1516
  });
1494
1517
 
1495
1518
  // src/tool/vertex-rag-store.ts
1496
- import { createProviderToolFactory as createProviderToolFactory5 } from "@ai-sdk/provider-utils";
1497
- import { z as z9 } from "zod/v4";
1498
- var vertexRagStore = createProviderToolFactory5({
1519
+ import { createProviderToolFactory as createProviderToolFactory6 } from "@ai-sdk/provider-utils";
1520
+ import { z as z10 } from "zod/v4";
1521
+ var vertexRagStore = createProviderToolFactory6({
1499
1522
  id: "google.vertex_rag_store",
1500
- inputSchema: z9.object({
1501
- ragCorpus: z9.string(),
1502
- topK: z9.number().optional()
1523
+ inputSchema: z10.object({
1524
+ ragCorpus: z10.string(),
1525
+ topK: z10.number().optional()
1503
1526
  })
1504
1527
  });
1505
1528
 
@@ -1510,6 +1533,17 @@ var googleTools = {
1510
1533
  * Must have name "google_search".
1511
1534
  */
1512
1535
  googleSearch,
1536
+ /**
1537
+ * Creates an Enterprise Web Search tool for grounding responses using a compliance-focused web index.
1538
+ * Designed for highly-regulated industries (finance, healthcare, public sector).
1539
+ * Does not log customer data and supports VPC service controls.
1540
+ * Must have name "enterprise_web_search".
1541
+ *
1542
+ * @note Only available on Vertex AI. Requires Gemini 2.0 or newer.
1543
+ *
1544
+ * @see https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/web-grounding-enterprise
1545
+ */
1546
+ enterpriseWebSearch,
1513
1547
  /**
1514
1548
  * Creates a Google Maps grounding tool that gives the model access to Google Maps data.
1515
1549
  * Must have name "google_maps".