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