@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.
@@ -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") {
@@ -23,7 +23,7 @@ import {
23
23
  import { AwsV4Signer } from "aws4fetch";
24
24
 
25
25
  // src/version.ts
26
- var VERSION = true ? "4.0.139" : "0.0.0-test";
26
+ var VERSION = true ? "4.0.141" : "0.0.0-test";
27
27
 
28
28
  // src/bedrock-sigv4-fetch.ts
29
29
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/amazon-bedrock",
3
- "version": "4.0.139",
3
+ "version": "4.0.141",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -44,8 +44,8 @@
44
44
  "@smithy/eventstream-codec": "^4.0.1",
45
45
  "@smithy/util-utf8": "^4.0.0",
46
46
  "aws4fetch": "^1.0.20",
47
- "@ai-sdk/anthropic": "3.0.100",
48
- "@ai-sdk/openai": "3.0.87",
47
+ "@ai-sdk/anthropic": "3.0.102",
48
+ "@ai-sdk/openai": "3.0.88",
49
49
  "@ai-sdk/provider": "3.0.14",
50
50
  "@ai-sdk/provider-utils": "4.0.40"
51
51
  },
@@ -24,7 +24,10 @@ import {
24
24
  type ParseResult,
25
25
  type Resolvable,
26
26
  } from '@ai-sdk/provider-utils';
27
- import { sanitizeJsonSchema } from '@ai-sdk/anthropic/internal';
27
+ import {
28
+ getModelCapabilities,
29
+ sanitizeJsonSchema,
30
+ } from '@ai-sdk/anthropic/internal';
28
31
  import { z } from 'zod/v4';
29
32
  import {
30
33
  BEDROCK_STOP_REASONS,
@@ -154,8 +157,8 @@ export class BedrockChatLanguageModel implements LanguageModelV3 {
154
157
  this.modelId.includes('claude-fable-5') ||
155
158
  this.modelId.includes('claude-sonnet-5');
156
159
 
157
- const modelSupportsStructuredOutput =
158
- bedrockChatModelSupportsStructuredOutput(this.modelId);
160
+ const { supportsStructuredOutput: modelSupportsStructuredOutput } =
161
+ getModelCapabilities(this.modelId);
159
162
 
160
163
  const useNativeStructuredOutput =
161
164
  isAnthropicModel &&
@@ -1046,21 +1049,6 @@ export class BedrockChatLanguageModel implements LanguageModelV3 {
1046
1049
  }
1047
1050
  }
1048
1051
 
1049
- function bedrockChatModelSupportsStructuredOutput(modelId: string): boolean {
1050
- return (
1051
- modelId.includes('claude-opus-4-8') ||
1052
- modelId.includes('claude-opus-4-7') ||
1053
- modelId.includes('claude-fable-5') ||
1054
- modelId.includes('claude-sonnet-5') ||
1055
- modelId.includes('claude-sonnet-4-6') ||
1056
- modelId.includes('claude-opus-4-6') ||
1057
- modelId.includes('claude-sonnet-4-5') ||
1058
- modelId.includes('claude-opus-4-5') ||
1059
- modelId.includes('claude-haiku-4-5') ||
1060
- modelId.includes('claude-opus-4-1')
1061
- );
1062
- }
1063
-
1064
1052
  class JsonObjectTextExtractor {
1065
1053
  private started = false;
1066
1054
  private completed = false;