@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/internal/index.js
CHANGED
|
@@ -924,6 +924,9 @@ function prepareTools({
|
|
|
924
924
|
modelId,
|
|
925
925
|
isVertexProvider = false
|
|
926
926
|
}) {
|
|
927
|
+
if ((toolChoice == null ? void 0 : toolChoice.type) === "none") {
|
|
928
|
+
tools = tools == null ? void 0 : tools.filter((tool) => tool.type === "function");
|
|
929
|
+
}
|
|
927
930
|
tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
|
|
928
931
|
const toolWarnings = [];
|
|
929
932
|
const { supportsGemini2Tools, supportsFileSearch, usesGemini3Features } = getGoogleModelCapabilities(modelId);
|
|
@@ -939,7 +942,9 @@ function prepareTools({
|
|
|
939
942
|
toolWarnings.push({
|
|
940
943
|
type: "unsupported-tool",
|
|
941
944
|
tool: tools.find((tool) => tool.type === "function"),
|
|
942
|
-
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(
|
|
945
|
+
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(
|
|
946
|
+
", "
|
|
947
|
+
)}. Please use either function tools or provider-defined tools, but not both.`
|
|
943
948
|
});
|
|
944
949
|
}
|
|
945
950
|
if (hasProviderDefinedTools) {
|