@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/CHANGELOG.md
CHANGED
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.
|
|
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
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
670
|
+
if (isGemini2orNewer) {
|
|
671
671
|
googleTools2.push({
|
|
672
672
|
retrieval: {
|
|
673
673
|
vertex_rag_store: {
|