ai 6.0.322 → 6.0.324

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.324
4
+
5
+ ### Patch Changes
6
+
7
+ - ba3743f: Preserve `toolChoice: 'none'` when SDK tools are omitted or empty so providers can disable native tools configured through provider options.
8
+
9
+ For Perplexity native tools, also update `@ai-sdk/perplexity` to `3.1.10` or a later compatible version, which includes the provider-side guard.
10
+
11
+ - Updated dependencies [fbb8489]
12
+ - Updated dependencies [26b7351]
13
+ - @ai-sdk/gateway@3.0.230
14
+
15
+ ## 6.0.323
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [8b1acb6]
20
+ - Updated dependencies [cafcf53]
21
+ - @ai-sdk/gateway@3.0.229
22
+
3
23
  ## 6.0.322
4
24
 
5
25
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1335,7 +1335,7 @@ function detectMediaType({
1335
1335
  var import_provider_utils3 = require("@ai-sdk/provider-utils");
1336
1336
 
1337
1337
  // src/version.ts
1338
- var VERSION = true ? "6.0.322" : "0.0.0-test";
1338
+ var VERSION = true ? "6.0.324" : "0.0.0-test";
1339
1339
 
1340
1340
  // src/util/download/download.ts
1341
1341
  var download = async ({
@@ -2059,7 +2059,8 @@ async function prepareToolsAndToolChoice({
2059
2059
  if (!isNonEmptyObject(tools)) {
2060
2060
  return {
2061
2061
  tools: void 0,
2062
- toolChoice: void 0
2062
+ // Providers can configure native tools without SDK tools.
2063
+ toolChoice: toolChoice === "none" ? { type: "none" } : void 0
2063
2064
  };
2064
2065
  }
2065
2066
  const filteredTools = activeTools != null ? Object.entries(tools).filter(