@ai-sdk/amazon-bedrock 4.0.119 → 4.0.121

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,20 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.121
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [6086c60]
8
+ - @ai-sdk/anthropic@3.0.86
9
+
10
+ ## 4.0.120
11
+
12
+ ### Patch Changes
13
+
14
+ - 817bbcf: Omit `strict` from tool specs for Claude Opus 4.7/4.8 on Bedrock, which reject the field on the Messages API
15
+ - Updated dependencies [466544d]
16
+ - @ai-sdk/openai@3.0.74
17
+
3
18
  ## 4.0.119
4
19
 
5
20
  ### 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.119" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.121" : "0.0.0-test";
39
39
 
40
40
  // src/bedrock-sigv4-fetch.ts
41
41
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
@@ -24,7 +24,7 @@ import {
24
24
  import { AwsV4Signer } from "aws4fetch";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "4.0.119" : "0.0.0-test";
27
+ var VERSION = true ? "4.0.121" : "0.0.0-test";
28
28
 
29
29
  // src/bedrock-sigv4-fetch.ts
30
30
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
package/dist/index.js CHANGED
@@ -292,12 +292,13 @@ async function prepareTools({
292
292
  }
293
293
  }
294
294
  const filteredFunctionTools = (toolChoice == null ? void 0 : toolChoice.type) === "tool" ? functionTools.filter((t) => t.name === toolChoice.toolName) : functionTools;
295
+ const supportsStrictOnTools = !modelId.includes("claude-opus-4-7") && !modelId.includes("claude-opus-4-8");
295
296
  for (const tool of filteredFunctionTools) {
296
297
  bedrockTools.push({
297
298
  toolSpec: {
298
299
  name: tool.name,
299
300
  ...((_a = tool.description) == null ? void 0 : _a.trim()) !== "" ? { description: tool.description } : {},
300
- ...tool.strict != null ? { strict: tool.strict } : {},
301
+ ...tool.strict != null && supportsStrictOnTools ? { strict: tool.strict } : {},
301
302
  inputSchema: {
302
303
  json: tool.inputSchema
303
304
  }
@@ -2014,7 +2015,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
2014
2015
  var import_aws4fetch = require("aws4fetch");
2015
2016
 
2016
2017
  // src/version.ts
2017
- var VERSION = true ? "4.0.119" : "0.0.0-test";
2018
+ var VERSION = true ? "4.0.121" : "0.0.0-test";
2018
2019
 
2019
2020
  // src/bedrock-sigv4-fetch.ts
2020
2021
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {