@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/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.48" : "0.0.0-test";
10
+ var VERSION = true ? "3.0.0-beta.50" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -489,7 +489,9 @@ var googleGenerativeAIProviderOptions = lazySchema4(
489
489
  responseModalities: z4.array(z4.enum(["TEXT", "IMAGE"])).optional(),
490
490
  thinkingConfig: z4.object({
491
491
  thinkingBudget: z4.number().optional(),
492
- includeThoughts: z4.boolean().optional()
492
+ includeThoughts: z4.boolean().optional(),
493
+ // https://ai.google.dev/gemini-api/docs/gemini-3?thinking=high#thinking_level
494
+ thinkingLevel: z4.enum(["low", "medium", "high"]).optional()
493
495
  }).optional(),
494
496
  /**
495
497
  * Optional.
@@ -600,7 +602,7 @@ function prepareTools({
600
602
  "gemini-flash-lite-latest",
601
603
  "gemini-pro-latest"
602
604
  ].some((id) => id === modelId);
603
- const isGemini2 = modelId.includes("gemini-2") || isLatest;
605
+ const isGemini2orNewer = modelId.includes("gemini-2") || modelId.includes("gemini-3") || isLatest;
604
606
  const supportsDynamicRetrieval = modelId.includes("gemini-1.5-flash") && !modelId.includes("-8b");
605
607
  const supportsFileSearch = modelId.includes("gemini-2.5");
606
608
  if (tools == null) {
@@ -626,7 +628,7 @@ function prepareTools({
626
628
  providerDefinedTools.forEach((tool) => {
627
629
  switch (tool.id) {
628
630
  case "google.google_search":
629
- if (isGemini2) {
631
+ if (isGemini2orNewer) {
630
632
  googleTools2.push({ googleSearch: {} });
631
633
  } else if (supportsDynamicRetrieval) {
632
634
  googleTools2.push({
@@ -642,7 +644,7 @@ function prepareTools({
642
644
  }
643
645
  break;
644
646
  case "google.url_context":
645
- if (isGemini2) {
647
+ if (isGemini2orNewer) {
646
648
  googleTools2.push({ urlContext: {} });
647
649
  } else {
648
650
  toolWarnings.push({
@@ -653,7 +655,7 @@ function prepareTools({
653
655
  }
654
656
  break;
655
657
  case "google.code_execution":
656
- if (isGemini2) {
658
+ if (isGemini2orNewer) {
657
659
  googleTools2.push({ codeExecution: {} });
658
660
  } else {
659
661
  toolWarnings.push({
@@ -675,7 +677,7 @@ function prepareTools({
675
677
  }
676
678
  break;
677
679
  case "google.vertex_rag_store":
678
- if (isGemini2) {
680
+ if (isGemini2orNewer) {
679
681
  googleTools2.push({
680
682
  retrieval: {
681
683
  vertex_rag_store: {