@ai-sdk/google 3.0.4 → 3.0.6
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 +12 -0
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +6 -4
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 3.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2043612: fix(google): parse structured output when using google provider tools
|
|
8
|
+
|
|
9
|
+
## 3.0.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3be4d81: Add file support for Gemini 3 models
|
|
14
|
+
|
|
3
15
|
## 3.0.4
|
|
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_utils15 = require("@ai-sdk/provider-utils");
|
|
31
31
|
|
|
32
32
|
// src/version.ts
|
|
33
|
-
var VERSION = true ? "3.0.
|
|
33
|
+
var VERSION = true ? "3.0.6" : "0.0.0-test";
|
|
34
34
|
|
|
35
35
|
// src/google-generative-ai-embedding-model.ts
|
|
36
36
|
var import_provider = require("@ai-sdk/provider");
|
|
@@ -674,7 +674,7 @@ function prepareTools({
|
|
|
674
674
|
].some((id) => id === modelId);
|
|
675
675
|
const isGemini2orNewer = modelId.includes("gemini-2") || modelId.includes("gemini-3") || isLatest;
|
|
676
676
|
const supportsDynamicRetrieval = modelId.includes("gemini-1.5-flash") && !modelId.includes("-8b");
|
|
677
|
-
const supportsFileSearch = modelId.includes("gemini-2.5");
|
|
677
|
+
const supportsFileSearch = modelId.includes("gemini-2.5") || modelId.includes("gemini-3");
|
|
678
678
|
if (tools == null) {
|
|
679
679
|
return { tools: void 0, toolConfig: void 0, toolWarnings };
|
|
680
680
|
}
|
|
@@ -747,7 +747,7 @@ function prepareTools({
|
|
|
747
747
|
toolWarnings.push({
|
|
748
748
|
type: "unsupported",
|
|
749
749
|
feature: `provider-defined tool ${tool.id}`,
|
|
750
|
-
details: "The file search tool is only supported with Gemini 2.5 models."
|
|
750
|
+
details: "The file search tool is only supported with Gemini 2.5 models and Gemini 3 models."
|
|
751
751
|
});
|
|
752
752
|
}
|
|
753
753
|
break;
|
|
@@ -1098,7 +1098,10 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1098
1098
|
finishReason: {
|
|
1099
1099
|
unified: mapGoogleGenerativeAIFinishReason({
|
|
1100
1100
|
finishReason: candidate.finishReason,
|
|
1101
|
-
|
|
1101
|
+
// Only count client-executed tool calls for finish reason determination.
|
|
1102
|
+
hasToolCalls: content.some(
|
|
1103
|
+
(part) => part.type === "tool-call" && !part.providerExecuted
|
|
1104
|
+
)
|
|
1102
1105
|
}),
|
|
1103
1106
|
raw: (_e = candidate.finishReason) != null ? _e : void 0
|
|
1104
1107
|
},
|
|
@@ -1201,7 +1204,6 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1201
1204
|
input: JSON.stringify(part.executableCode),
|
|
1202
1205
|
providerExecuted: true
|
|
1203
1206
|
});
|
|
1204
|
-
hasToolCalls = true;
|
|
1205
1207
|
} else if ("codeExecutionResult" in part && part.codeExecutionResult) {
|
|
1206
1208
|
const toolCallId = lastCodeExecutionToolCallId;
|
|
1207
1209
|
if (toolCallId) {
|