@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.
package/dist/index.mjs CHANGED
@@ -272,7 +272,7 @@ import {
272
272
  } from "@ai-sdk/provider-utils";
273
273
 
274
274
  // src/version.ts
275
- var VERSION = true ? "3.0.141" : "0.0.0-test";
275
+ var VERSION = true ? "3.0.142" : "0.0.0-test";
276
276
 
277
277
  // src/google-generative-ai-embedding-model.ts
278
278
  import {
@@ -1696,6 +1696,9 @@ function prepareTools({
1696
1696
  modelId,
1697
1697
  isVertexProvider = false
1698
1698
  }) {
1699
+ if ((toolChoice == null ? void 0 : toolChoice.type) === "none") {
1700
+ tools = tools == null ? void 0 : tools.filter((tool) => tool.type === "function");
1701
+ }
1699
1702
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
1700
1703
  const toolWarnings = [];
1701
1704
  const { supportsGemini2Tools, supportsFileSearch, usesGemini3Features } = getGoogleModelCapabilities(modelId);