@ai-sdk/google 2.0.108 → 2.0.110
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 +16 -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 +2 -2
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 ? "2.0.
|
|
10
|
+
var VERSION = true ? "2.0.110" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/google-generative-ai-embedding-model.ts
|
|
13
13
|
import {
|
|
@@ -1133,6 +1133,9 @@ function prepareTools({
|
|
|
1133
1133
|
modelId,
|
|
1134
1134
|
isVertexProvider = false
|
|
1135
1135
|
}) {
|
|
1136
|
+
if ((toolChoice == null ? void 0 : toolChoice.type) === "none") {
|
|
1137
|
+
tools = tools == null ? void 0 : tools.filter((tool) => tool.type === "function");
|
|
1138
|
+
}
|
|
1136
1139
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
1137
1140
|
const toolWarnings = [];
|
|
1138
1141
|
const { supportsGemini2Tools, supportsFileSearch, usesGemini3Features } = getGoogleModelCapabilities(modelId);
|
|
@@ -1148,7 +1151,9 @@ function prepareTools({
|
|
|
1148
1151
|
toolWarnings.push({
|
|
1149
1152
|
type: "unsupported-tool",
|
|
1150
1153
|
tool: tools.find((tool) => tool.type === "function"),
|
|
1151
|
-
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(
|
|
1154
|
+
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(
|
|
1155
|
+
", "
|
|
1156
|
+
)}. Please use either function tools or provider-defined tools, but not both.`
|
|
1152
1157
|
});
|
|
1153
1158
|
}
|
|
1154
1159
|
if (hasProviderDefinedTools) {
|