@ai-sdk/google 3.0.0-beta.48 → 3.0.0-beta.50

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.50
4
+
5
+ ### Patch Changes
6
+
7
+ - 9be07c8: feat(google): `thinking_level` option for Gemini 3
8
+
9
+ ## 3.0.0-beta.49
10
+
11
+ ### Patch Changes
12
+
13
+ - 8ee8edc: Prepare search tool for gemini-3-pro-preview
14
+
3
15
  ## 3.0.0-beta.48
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -17,6 +17,7 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
17
17
  thinkingConfig?: {
18
18
  thinkingBudget?: number | undefined;
19
19
  includeThoughts?: boolean | undefined;
20
+ thinkingLevel?: "low" | "medium" | "high" | undefined;
20
21
  } | undefined;
21
22
  cachedContent?: string | undefined;
22
23
  structuredOutputs?: boolean | undefined;
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
17
17
  thinkingConfig?: {
18
18
  thinkingBudget?: number | undefined;
19
19
  includeThoughts?: boolean | undefined;
20
+ thinkingLevel?: "low" | "medium" | "high" | undefined;
20
21
  } | undefined;
21
22
  cachedContent?: string | undefined;
22
23
  structuredOutputs?: boolean | undefined;
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.48" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.0-beta.50" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -483,7 +483,9 @@ var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
483
483
  responseModalities: import_v44.z.array(import_v44.z.enum(["TEXT", "IMAGE"])).optional(),
484
484
  thinkingConfig: import_v44.z.object({
485
485
  thinkingBudget: import_v44.z.number().optional(),
486
- includeThoughts: import_v44.z.boolean().optional()
486
+ includeThoughts: import_v44.z.boolean().optional(),
487
+ // https://ai.google.dev/gemini-api/docs/gemini-3?thinking=high#thinking_level
488
+ thinkingLevel: import_v44.z.enum(["low", "medium", "high"]).optional()
487
489
  }).optional(),
488
490
  /**
489
491
  * Optional.
@@ -592,7 +594,7 @@ function prepareTools({
592
594
  "gemini-flash-lite-latest",
593
595
  "gemini-pro-latest"
594
596
  ].some((id) => id === modelId);
595
- const isGemini2 = modelId.includes("gemini-2") || isLatest;
597
+ const isGemini2orNewer = modelId.includes("gemini-2") || modelId.includes("gemini-3") || isLatest;
596
598
  const supportsDynamicRetrieval = modelId.includes("gemini-1.5-flash") && !modelId.includes("-8b");
597
599
  const supportsFileSearch = modelId.includes("gemini-2.5");
598
600
  if (tools == null) {
@@ -618,7 +620,7 @@ function prepareTools({
618
620
  providerDefinedTools.forEach((tool) => {
619
621
  switch (tool.id) {
620
622
  case "google.google_search":
621
- if (isGemini2) {
623
+ if (isGemini2orNewer) {
622
624
  googleTools2.push({ googleSearch: {} });
623
625
  } else if (supportsDynamicRetrieval) {
624
626
  googleTools2.push({
@@ -634,7 +636,7 @@ function prepareTools({
634
636
  }
635
637
  break;
636
638
  case "google.url_context":
637
- if (isGemini2) {
639
+ if (isGemini2orNewer) {
638
640
  googleTools2.push({ urlContext: {} });
639
641
  } else {
640
642
  toolWarnings.push({
@@ -645,7 +647,7 @@ function prepareTools({
645
647
  }
646
648
  break;
647
649
  case "google.code_execution":
648
- if (isGemini2) {
650
+ if (isGemini2orNewer) {
649
651
  googleTools2.push({ codeExecution: {} });
650
652
  } else {
651
653
  toolWarnings.push({
@@ -667,7 +669,7 @@ function prepareTools({
667
669
  }
668
670
  break;
669
671
  case "google.vertex_rag_store":
670
- if (isGemini2) {
672
+ if (isGemini2orNewer) {
671
673
  googleTools2.push({
672
674
  retrieval: {
673
675
  vertex_rag_store: {