@ai-sdk/google 3.0.0-beta.57 → 3.0.0-beta.59

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.57" : "0.0.0-test";
10
+ var VERSION = true ? "3.0.0-beta.59" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -613,11 +613,9 @@ function prepareTools({
613
613
  (tool) => tool.type === "provider-defined"
614
614
  );
615
615
  if (hasFunctionTools && hasProviderDefinedTools) {
616
- const functionTools = tools.filter((tool) => tool.type === "function");
617
616
  toolWarnings.push({
618
- type: "unsupported-tool",
619
- tool: tools.find((tool) => tool.type === "function"),
620
- details: `Cannot mix function tools with provider-defined tools in the same request. Falling back to provider-defined tools only. The following function tools will be ignored: ${functionTools.map((t) => t.name).join(", ")}. Please use either function tools or provider-defined tools, but not both.`
617
+ type: "unsupported",
618
+ feature: `combination of function and provider-defined tools`
621
619
  });
622
620
  }
623
621
  if (hasProviderDefinedTools) {
@@ -648,8 +646,8 @@ function prepareTools({
648
646
  googleTools2.push({ urlContext: {} });
649
647
  } else {
650
648
  toolWarnings.push({
651
- type: "unsupported-tool",
652
- tool,
649
+ type: "unsupported",
650
+ feature: `provider-defined tool ${tool.id}`,
653
651
  details: "The URL context tool is not supported with other Gemini models than Gemini 2."
654
652
  });
655
653
  }
@@ -659,8 +657,8 @@ function prepareTools({
659
657
  googleTools2.push({ codeExecution: {} });
660
658
  } else {
661
659
  toolWarnings.push({
662
- type: "unsupported-tool",
663
- tool,
660
+ type: "unsupported",
661
+ feature: `provider-defined tool ${tool.id}`,
664
662
  details: "The code execution tools is not supported with other Gemini models than Gemini 2."
665
663
  });
666
664
  }
@@ -670,8 +668,8 @@ function prepareTools({
670
668
  googleTools2.push({ fileSearch: { ...tool.args } });
671
669
  } else {
672
670
  toolWarnings.push({
673
- type: "unsupported-tool",
674
- tool,
671
+ type: "unsupported",
672
+ feature: `provider-defined tool ${tool.id}`,
675
673
  details: "The file search tool is only supported with Gemini 2.5 models."
676
674
  });
677
675
  }
@@ -690,14 +688,17 @@ function prepareTools({
690
688
  });
691
689
  } else {
692
690
  toolWarnings.push({
693
- type: "unsupported-tool",
694
- tool,
691
+ type: "unsupported",
692
+ feature: `provider-defined tool ${tool.id}`,
695
693
  details: "The RAG store tool is not supported with other Gemini models than Gemini 2."
696
694
  });
697
695
  }
698
696
  break;
699
697
  default:
700
- toolWarnings.push({ type: "unsupported-tool", tool });
698
+ toolWarnings.push({
699
+ type: "unsupported",
700
+ feature: `provider-defined tool ${tool.id}`
701
+ });
701
702
  break;
702
703
  }
703
704
  });
@@ -718,7 +719,10 @@ function prepareTools({
718
719
  });
719
720
  break;
720
721
  default:
721
- toolWarnings.push({ type: "unsupported-tool", tool });
722
+ toolWarnings.push({
723
+ type: "unsupported",
724
+ feature: `function tool ${tool.name}`
725
+ });
722
726
  break;
723
727
  }
724
728
  }
@@ -1655,15 +1659,15 @@ var GoogleGenerativeAIImageModel = class {
1655
1659
  const warnings = [];
1656
1660
  if (size != null) {
1657
1661
  warnings.push({
1658
- type: "unsupported-setting",
1659
- setting: "size",
1662
+ type: "unsupported",
1663
+ feature: "size",
1660
1664
  details: "This model does not support the `size` option. Use `aspectRatio` instead."
1661
1665
  });
1662
1666
  }
1663
1667
  if (seed != null) {
1664
1668
  warnings.push({
1665
- type: "unsupported-setting",
1666
- setting: "seed",
1669
+ type: "unsupported",
1670
+ feature: "seed",
1667
1671
  details: "This model does not support the `seed` option through this provider."
1668
1672
  });
1669
1673
  }
@@ -1796,8 +1800,7 @@ function createGoogleGenerativeAI(options = {}) {
1796
1800
  provider.chat = createChatModel;
1797
1801
  provider.generativeAI = createChatModel;
1798
1802
  provider.embedding = createEmbeddingModel;
1799
- provider.textEmbedding = createEmbeddingModel;
1800
- provider.textEmbeddingModel = createEmbeddingModel;
1803
+ provider.embeddingModel = createEmbeddingModel;
1801
1804
  provider.image = createImageModel;
1802
1805
  provider.imageModel = createImageModel;
1803
1806
  provider.tools = googleTools;