@ai-sdk/amazon-bedrock 4.0.64 → 4.0.66

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,17 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.66
4
+
5
+ ### Patch Changes
6
+
7
+ - 91f8777: fix(bedrock/groq): pass strict mode for tools
8
+
9
+ ## 4.0.65
10
+
11
+ ### Patch Changes
12
+
13
+ - a1a8091: fix(bedrock): ensure tool choice option is enforced
14
+
3
15
  ## 4.0.64
4
16
 
5
17
  ### Patch Changes
@@ -35,7 +35,7 @@ var import_provider_utils = require("@ai-sdk/provider-utils");
35
35
  var import_aws4fetch = require("aws4fetch");
36
36
 
37
37
  // src/version.ts
38
- var VERSION = true ? "4.0.64" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.66" : "0.0.0-test";
39
39
 
40
40
  // src/bedrock-sigv4-fetch.ts
41
41
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
@@ -24,7 +24,7 @@ import {
24
24
  import { AwsV4Signer } from "aws4fetch";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "4.0.64" : "0.0.0-test";
27
+ var VERSION = true ? "4.0.66" : "0.0.0-test";
28
28
 
29
29
  // src/bedrock-sigv4-fetch.ts
30
30
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
package/dist/index.js CHANGED
@@ -279,11 +279,13 @@ async function prepareTools({
279
279
  toolWarnings.push({ type: "unsupported", feature: `tool ${tool.id}` });
280
280
  }
281
281
  }
282
- for (const tool of functionTools) {
282
+ const filteredFunctionTools = (toolChoice == null ? void 0 : toolChoice.type) === "tool" ? functionTools.filter((t) => t.name === toolChoice.toolName) : functionTools;
283
+ for (const tool of filteredFunctionTools) {
283
284
  bedrockTools.push({
284
285
  toolSpec: {
285
286
  name: tool.name,
286
287
  ...((_a = tool.description) == null ? void 0 : _a.trim()) !== "" ? { description: tool.description } : {},
288
+ ...tool.strict != null ? { strict: tool.strict } : {},
287
289
  inputSchema: {
288
290
  json: tool.inputSchema
289
291
  }
@@ -1932,7 +1934,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1932
1934
  var import_aws4fetch = require("aws4fetch");
1933
1935
 
1934
1936
  // src/version.ts
1935
- var VERSION = true ? "4.0.64" : "0.0.0-test";
1937
+ var VERSION = true ? "4.0.66" : "0.0.0-test";
1936
1938
 
1937
1939
  // src/bedrock-sigv4-fetch.ts
1938
1940
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {