@ai-sdk/google 3.0.0-beta.47 → 3.0.0-beta.49

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 3.0.0-beta.49
4
+
5
+ ### Patch Changes
6
+
7
+ - 8ee8edc: Prepare search tool for gemini-3-pro-preview
8
+
9
+ ## 3.0.0-beta.48
10
+
11
+ ### Patch Changes
12
+
13
+ - 6078060: fix(provider/google): remove includethoughts warning
14
+
3
15
  ## 3.0.0-beta.47
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(src_exports);
30
30
  var import_provider_utils13 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "3.0.0-beta.47" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.0-beta.49" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -592,7 +592,7 @@ function prepareTools({
592
592
  "gemini-flash-lite-latest",
593
593
  "gemini-pro-latest"
594
594
  ].some((id) => id === modelId);
595
- const isGemini2 = modelId.includes("gemini-2") || isLatest;
595
+ const isGemini2orNewer = modelId.includes("gemini-2") || modelId.includes("gemini-3") || isLatest;
596
596
  const supportsDynamicRetrieval = modelId.includes("gemini-1.5-flash") && !modelId.includes("-8b");
597
597
  const supportsFileSearch = modelId.includes("gemini-2.5");
598
598
  if (tools == null) {
@@ -618,7 +618,7 @@ function prepareTools({
618
618
  providerDefinedTools.forEach((tool) => {
619
619
  switch (tool.id) {
620
620
  case "google.google_search":
621
- if (isGemini2) {
621
+ if (isGemini2orNewer) {
622
622
  googleTools2.push({ googleSearch: {} });
623
623
  } else if (supportsDynamicRetrieval) {
624
624
  googleTools2.push({
@@ -634,7 +634,7 @@ function prepareTools({
634
634
  }
635
635
  break;
636
636
  case "google.url_context":
637
- if (isGemini2) {
637
+ if (isGemini2orNewer) {
638
638
  googleTools2.push({ urlContext: {} });
639
639
  } else {
640
640
  toolWarnings.push({
@@ -645,7 +645,7 @@ function prepareTools({
645
645
  }
646
646
  break;
647
647
  case "google.code_execution":
648
- if (isGemini2) {
648
+ if (isGemini2orNewer) {
649
649
  googleTools2.push({ codeExecution: {} });
650
650
  } else {
651
651
  toolWarnings.push({
@@ -667,7 +667,7 @@ function prepareTools({
667
667
  }
668
668
  break;
669
669
  case "google.vertex_rag_store":
670
- if (isGemini2) {
670
+ if (isGemini2orNewer) {
671
671
  googleTools2.push({
672
672
  retrieval: {
673
673
  vertex_rag_store: {
@@ -817,19 +817,13 @@ var GoogleGenerativeAILanguageModel = class {
817
817
  toolChoice,
818
818
  providerOptions
819
819
  }) {
820
- var _a, _b;
820
+ var _a;
821
821
  const warnings = [];
822
822
  const googleOptions = await (0, import_provider_utils6.parseProviderOptions)({
823
823
  provider: "google",
824
824
  providerOptions,
825
825
  schema: googleGenerativeAIProviderOptions
826
826
  });
827
- if (((_a = googleOptions == null ? void 0 : googleOptions.thinkingConfig) == null ? void 0 : _a.includeThoughts) === true && !this.config.provider.startsWith("google.vertex.")) {
828
- warnings.push({
829
- type: "other",
830
- message: `The 'includeThoughts' option is only supported with the Google Vertex provider and might not be supported or could behave unexpectedly with the current Google provider (${this.config.provider}).`
831
- });
832
- }
833
827
  if ((tools == null ? void 0 : tools.some(
834
828
  (tool) => tool.type === "provider-defined" && tool.id === "google.vertex_rag_store"
835
829
  )) && !this.config.provider.startsWith("google.vertex.")) {
@@ -869,7 +863,7 @@ var GoogleGenerativeAILanguageModel = class {
869
863
  responseSchema: (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && // Google GenAI does not support all OpenAPI Schema features,
870
864
  // so this is needed as an escape hatch:
871
865
  // TODO convert into provider option
872
- ((_b = googleOptions == null ? void 0 : googleOptions.structuredOutputs) != null ? _b : true) ? convertJSONSchemaToOpenAPISchema(responseFormat.schema) : void 0,
866
+ ((_a = googleOptions == null ? void 0 : googleOptions.structuredOutputs) != null ? _a : true) ? convertJSONSchemaToOpenAPISchema(responseFormat.schema) : void 0,
873
867
  ...(googleOptions == null ? void 0 : googleOptions.audioTimestamp) && {
874
868
  audioTimestamp: googleOptions.audioTimestamp
875
869
  },