@ai-sdk/google 2.0.108 → 2.0.109
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 +9 -0
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +6 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +6 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 2.0.109
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5eaea4b: Omit Google provider-defined tools, including File Search and Vertex RAG Store, when `toolChoice` is `none` so disabled tools cannot retrieve data or execute server-side. Preserve function declarations needed by conversation history while disabling function calling.
|
|
8
|
+
- Updated dependencies [49c554d]
|
|
9
|
+
- Updated dependencies [b753c03]
|
|
10
|
+
- @ai-sdk/provider-utils@3.0.45
|
|
11
|
+
|
|
3
12
|
## 2.0.108
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
30
|
var import_provider_utils15 = require("@ai-sdk/provider-utils");
|
|
31
31
|
|
|
32
32
|
// src/version.ts
|
|
33
|
-
var VERSION = true ? "2.0.
|
|
33
|
+
var VERSION = true ? "2.0.109" : "0.0.0-test";
|
|
34
34
|
|
|
35
35
|
// src/google-generative-ai-embedding-model.ts
|
|
36
36
|
var import_provider = require("@ai-sdk/provider");
|
|
@@ -1114,6 +1114,9 @@ function prepareTools({
|
|
|
1114
1114
|
modelId,
|
|
1115
1115
|
isVertexProvider = false
|
|
1116
1116
|
}) {
|
|
1117
|
+
if ((toolChoice == null ? void 0 : toolChoice.type) === "none") {
|
|
1118
|
+
tools = tools == null ? void 0 : tools.filter((tool) => tool.type === "function");
|
|
1119
|
+
}
|
|
1117
1120
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
1118
1121
|
const toolWarnings = [];
|
|
1119
1122
|
const { supportsGemini2Tools, supportsFileSearch, usesGemini3Features } = getGoogleModelCapabilities(modelId);
|
|
@@ -1129,7 +1132,9 @@ function prepareTools({
|
|
|
1129
1132
|
toolWarnings.push({
|
|
1130
1133
|
type: "unsupported-tool",
|
|
1131
1134
|
tool: tools.find((tool) => tool.type === "function"),
|
|
1132
|
-
details: `Cannot mix function tools with provider-defined tools in the same request. Falling back to provider-defined tools only. The following function tools will be ignored: ${functionTools.map((t) => t.name).join(
|
|
1135
|
+
details: `Cannot mix function tools with provider-defined tools in the same request. Falling back to provider-defined tools only. The following function tools will be ignored: ${functionTools.map((t) => t.name).join(
|
|
1136
|
+
", "
|
|
1137
|
+
)}. Please use either function tools or provider-defined tools, but not both.`
|
|
1133
1138
|
});
|
|
1134
1139
|
}
|
|
1135
1140
|
if (hasProviderDefinedTools) {
|