@ai-sdk/google 3.0.0-beta.60 → 3.0.0-beta.62

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
@@ -7,7 +7,7 @@ import {
7
7
  } from "@ai-sdk/provider-utils";
8
8
 
9
9
  // src/version.ts
10
- var VERSION = true ? "3.0.0-beta.60" : "0.0.0-test";
10
+ var VERSION = true ? "3.0.0-beta.62" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -609,21 +609,17 @@ function prepareTools({
609
609
  return { tools: void 0, toolConfig: void 0, toolWarnings };
610
610
  }
611
611
  const hasFunctionTools = tools.some((tool) => tool.type === "function");
612
- const hasProviderDefinedTools = tools.some(
613
- (tool) => tool.type === "provider-defined"
614
- );
615
- if (hasFunctionTools && hasProviderDefinedTools) {
612
+ const hasProviderTools = tools.some((tool) => tool.type === "provider");
613
+ if (hasFunctionTools && hasProviderTools) {
616
614
  toolWarnings.push({
617
615
  type: "unsupported",
618
616
  feature: `combination of function and provider-defined tools`
619
617
  });
620
618
  }
621
- if (hasProviderDefinedTools) {
619
+ if (hasProviderTools) {
622
620
  const googleTools2 = [];
623
- const providerDefinedTools = tools.filter(
624
- (tool) => tool.type === "provider-defined"
625
- );
626
- providerDefinedTools.forEach((tool) => {
621
+ const ProviderTools = tools.filter((tool) => tool.type === "provider");
622
+ ProviderTools.forEach((tool) => {
627
623
  switch (tool.id) {
628
624
  case "google.google_search":
629
625
  if (isGemini2orNewer) {
@@ -839,7 +835,7 @@ var GoogleGenerativeAILanguageModel = class {
839
835
  schema: googleGenerativeAIProviderOptions
840
836
  });
841
837
  if ((tools == null ? void 0 : tools.some(
842
- (tool) => tool.type === "provider-defined" && tool.id === "google.vertex_rag_store"
838
+ (tool) => tool.type === "provider" && tool.id === "google.vertex_rag_store"
843
839
  )) && !this.config.provider.startsWith("google.vertex.")) {
844
840
  warnings.push({
845
841
  type: "other",
@@ -1486,11 +1482,10 @@ var chunkSchema = lazySchema5(
1486
1482
  );
1487
1483
 
1488
1484
  // src/tool/code-execution.ts
1489
- import { createProviderDefinedToolFactoryWithOutputSchema } from "@ai-sdk/provider-utils";
1485
+ import { createProviderToolFactoryWithOutputSchema } from "@ai-sdk/provider-utils";
1490
1486
  import { z as z6 } from "zod/v4";
1491
- var codeExecution = createProviderDefinedToolFactoryWithOutputSchema({
1487
+ var codeExecution = createProviderToolFactoryWithOutputSchema({
1492
1488
  id: "google.code_execution",
1493
- name: "code_execution",
1494
1489
  inputSchema: z6.object({
1495
1490
  language: z6.string().describe("The programming language of the code."),
1496
1491
  code: z6.string().describe("The code to be executed.")
@@ -1503,7 +1498,7 @@ var codeExecution = createProviderDefinedToolFactoryWithOutputSchema({
1503
1498
 
1504
1499
  // src/tool/file-search.ts
1505
1500
  import {
1506
- createProviderDefinedToolFactory,
1501
+ createProviderToolFactory,
1507
1502
  lazySchema as lazySchema6,
1508
1503
  zodSchema as zodSchema6
1509
1504
  } from "@ai-sdk/provider-utils";
@@ -1527,22 +1522,20 @@ var fileSearchArgsBaseSchema = z7.object({
1527
1522
  var fileSearchArgsSchema = lazySchema6(
1528
1523
  () => zodSchema6(fileSearchArgsBaseSchema)
1529
1524
  );
1530
- var fileSearch = createProviderDefinedToolFactory({
1525
+ var fileSearch = createProviderToolFactory({
1531
1526
  id: "google.file_search",
1532
- name: "file_search",
1533
1527
  inputSchema: fileSearchArgsSchema
1534
1528
  });
1535
1529
 
1536
1530
  // src/tool/google-search.ts
1537
1531
  import {
1538
- createProviderDefinedToolFactory as createProviderDefinedToolFactory2,
1532
+ createProviderToolFactory as createProviderToolFactory2,
1539
1533
  lazySchema as lazySchema7,
1540
1534
  zodSchema as zodSchema7
1541
1535
  } from "@ai-sdk/provider-utils";
1542
1536
  import { z as z8 } from "zod/v4";
1543
- var googleSearch = createProviderDefinedToolFactory2({
1537
+ var googleSearch = createProviderToolFactory2({
1544
1538
  id: "google.google_search",
1545
- name: "google_search",
1546
1539
  inputSchema: lazySchema7(
1547
1540
  () => zodSchema7(
1548
1541
  z8.object({
@@ -1555,23 +1548,21 @@ var googleSearch = createProviderDefinedToolFactory2({
1555
1548
 
1556
1549
  // src/tool/url-context.ts
1557
1550
  import {
1558
- createProviderDefinedToolFactory as createProviderDefinedToolFactory3,
1551
+ createProviderToolFactory as createProviderToolFactory3,
1559
1552
  lazySchema as lazySchema8,
1560
1553
  zodSchema as zodSchema8
1561
1554
  } from "@ai-sdk/provider-utils";
1562
1555
  import { z as z9 } from "zod/v4";
1563
- var urlContext = createProviderDefinedToolFactory3({
1556
+ var urlContext = createProviderToolFactory3({
1564
1557
  id: "google.url_context",
1565
- name: "url_context",
1566
1558
  inputSchema: lazySchema8(() => zodSchema8(z9.object({})))
1567
1559
  });
1568
1560
 
1569
1561
  // src/tool/vertex-rag-store.ts
1570
- import { createProviderDefinedToolFactory as createProviderDefinedToolFactory4 } from "@ai-sdk/provider-utils";
1562
+ import { createProviderToolFactory as createProviderToolFactory4 } from "@ai-sdk/provider-utils";
1571
1563
  import { z as z10 } from "zod/v4";
1572
- var vertexRagStore = createProviderDefinedToolFactory4({
1564
+ var vertexRagStore = createProviderToolFactory4({
1573
1565
  id: "google.vertex_rag_store",
1574
- name: "vertex_rag_store",
1575
1566
  inputSchema: z10.object({
1576
1567
  ragCorpus: z10.string(),
1577
1568
  topK: z10.number().optional()