@ai-sdk/google 3.0.0-beta.48 → 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 +6 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +5 -5
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +5 -5
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
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.
|
|
10
|
+
var VERSION = true ? "3.0.0-beta.49" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -600,7 +600,7 @@ function prepareTools({
|
|
|
600
600
|
"gemini-flash-lite-latest",
|
|
601
601
|
"gemini-pro-latest"
|
|
602
602
|
].some((id) => id === modelId);
|
|
603
|
-
const
|
|
603
|
+
const isGemini2orNewer = modelId.includes("gemini-2") || modelId.includes("gemini-3") || isLatest;
|
|
604
604
|
const supportsDynamicRetrieval = modelId.includes("gemini-1.5-flash") && !modelId.includes("-8b");
|
|
605
605
|
const supportsFileSearch = modelId.includes("gemini-2.5");
|
|
606
606
|
if (tools == null) {
|
|
@@ -626,7 +626,7 @@ function prepareTools({
|
|
|
626
626
|
providerDefinedTools.forEach((tool) => {
|
|
627
627
|
switch (tool.id) {
|
|
628
628
|
case "google.google_search":
|
|
629
|
-
if (
|
|
629
|
+
if (isGemini2orNewer) {
|
|
630
630
|
googleTools2.push({ googleSearch: {} });
|
|
631
631
|
} else if (supportsDynamicRetrieval) {
|
|
632
632
|
googleTools2.push({
|
|
@@ -642,7 +642,7 @@ function prepareTools({
|
|
|
642
642
|
}
|
|
643
643
|
break;
|
|
644
644
|
case "google.url_context":
|
|
645
|
-
if (
|
|
645
|
+
if (isGemini2orNewer) {
|
|
646
646
|
googleTools2.push({ urlContext: {} });
|
|
647
647
|
} else {
|
|
648
648
|
toolWarnings.push({
|
|
@@ -653,7 +653,7 @@ function prepareTools({
|
|
|
653
653
|
}
|
|
654
654
|
break;
|
|
655
655
|
case "google.code_execution":
|
|
656
|
-
if (
|
|
656
|
+
if (isGemini2orNewer) {
|
|
657
657
|
googleTools2.push({ codeExecution: {} });
|
|
658
658
|
} else {
|
|
659
659
|
toolWarnings.push({
|
|
@@ -675,7 +675,7 @@ function prepareTools({
|
|
|
675
675
|
}
|
|
676
676
|
break;
|
|
677
677
|
case "google.vertex_rag_store":
|
|
678
|
-
if (
|
|
678
|
+
if (isGemini2orNewer) {
|
|
679
679
|
googleTools2.push({
|
|
680
680
|
retrieval: {
|
|
681
681
|
vertex_rag_store: {
|