@ai-sdk/google 3.0.141 → 3.0.142

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.
@@ -1241,6 +1241,9 @@ function prepareTools({
1241
1241
  modelId,
1242
1242
  isVertexProvider = false
1243
1243
  }) {
1244
+ if ((toolChoice == null ? void 0 : toolChoice.type) === "none") {
1245
+ tools = tools == null ? void 0 : tools.filter((tool) => tool.type === "function");
1246
+ }
1244
1247
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
1245
1248
  const toolWarnings = [];
1246
1249
  const { supportsGemini2Tools, supportsFileSearch, usesGemini3Features } = getGoogleModelCapabilities(modelId);