@ai-sdk/amazon-bedrock 4.0.139 → 4.0.141

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,24 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.141
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b4c4426]
8
+ - Updated dependencies [b4c4426]
9
+ - Updated dependencies [b4c4426]
10
+ - @ai-sdk/anthropic@3.0.102
11
+
12
+ ## 4.0.140
13
+
14
+ ### Patch Changes
15
+
16
+ - 0608dca: fix (provider/anthropic): use current-generation capability defaults for unrecognized Claude model IDs while retaining conservative defaults for legacy Claude and non-Claude models.
17
+ - Updated dependencies [8100830]
18
+ - Updated dependencies [0608dca]
19
+ - @ai-sdk/openai@3.0.88
20
+ - @ai-sdk/anthropic@3.0.101
21
+
3
22
  ## 4.0.139
4
23
 
5
24
  ### 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.139" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.141" : "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.139" : "0.0.0-test";
27
+ var VERSION = true ? "4.0.141" : "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
@@ -908,7 +908,7 @@ var BedrockChatLanguageModel = class {
908
908
  const isAnthropicModel = this.modelId.includes("anthropic");
909
909
  const isThinkingEnabled = ((_b = bedrockOptions.reasoningConfig) == null ? void 0 : _b.type) === "enabled" || ((_c = bedrockOptions.reasoningConfig) == null ? void 0 : _c.type) === "adaptive";
910
910
  const modelRejectsNativeStructuredOutput = this.modelId.includes("claude-opus-4-7") || this.modelId.includes("claude-opus-4-8") || this.modelId.includes("claude-fable-5") || this.modelId.includes("claude-sonnet-5");
911
- const modelSupportsStructuredOutput = bedrockChatModelSupportsStructuredOutput(this.modelId);
911
+ const { supportsStructuredOutput: modelSupportsStructuredOutput } = (0, import_internal2.getModelCapabilities)(this.modelId);
912
912
  const useNativeStructuredOutput = isAnthropicModel && !modelRejectsNativeStructuredOutput && (modelSupportsStructuredOutput || isThinkingEnabled) && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null;
913
913
  const useJsonInstructionForStructuredOutput = isAnthropicModel && (this.modelId.includes("claude-opus-4-7") || this.modelId.includes("claude-opus-4-8")) && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && tools != null && tools.length > 0;
914
914
  const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useNativeStructuredOutput && !useJsonInstructionForStructuredOutput ? {
@@ -1576,9 +1576,6 @@ var BedrockChatLanguageModel = class {
1576
1576
  return `${this.config.baseUrl()}/model/${encodeURIComponent(modelId)}`;
1577
1577
  }
1578
1578
  };
1579
- function bedrockChatModelSupportsStructuredOutput(modelId) {
1580
- return modelId.includes("claude-opus-4-8") || modelId.includes("claude-opus-4-7") || modelId.includes("claude-fable-5") || modelId.includes("claude-sonnet-5") || modelId.includes("claude-sonnet-4-6") || modelId.includes("claude-opus-4-6") || modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5") || modelId.includes("claude-haiku-4-5") || modelId.includes("claude-opus-4-1");
1581
- }
1582
1579
  var JsonObjectTextExtractor = class {
1583
1580
  constructor() {
1584
1581
  this.started = false;
@@ -2142,7 +2139,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
2142
2139
  var import_aws4fetch = require("aws4fetch");
2143
2140
 
2144
2141
  // src/version.ts
2145
- var VERSION = true ? "4.0.139" : "0.0.0-test";
2142
+ var VERSION = true ? "4.0.141" : "0.0.0-test";
2146
2143
 
2147
2144
  // src/bedrock-sigv4-fetch.ts
2148
2145
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {