@ai-sdk/amazon-bedrock 5.0.91 → 5.0.92
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 +14 -0
- package/dist/anthropic/index.d.ts +1 -1
- package/dist/anthropic/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/mantle/index.cjs +1 -1
- package/dist/mantle/index.js +1 -1
- package/package.json +5 -5
- package/src/amazon-bedrock-chat-language-model-options.ts +4 -0
- package/src/amazon-bedrock-chat-language-model.ts +9 -6
- package/src/anthropic/amazon-bedrock-anthropic-options.ts +4 -0
package/dist/mantle/index.cjs
CHANGED
|
@@ -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 ? "5.0.
|
|
38
|
+
var VERSION = true ? "5.0.92" : "0.0.0-test";
|
|
39
39
|
|
|
40
40
|
// src/amazon-bedrock-sigv4-fetch.ts
|
|
41
41
|
function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
package/dist/mantle/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { AwsV4Signer } from "aws4fetch";
|
|
24
24
|
|
|
25
25
|
// src/version.ts
|
|
26
|
-
var VERSION = true ? "5.0.
|
|
26
|
+
var VERSION = true ? "5.0.92" : "0.0.0-test";
|
|
27
27
|
|
|
28
28
|
// src/amazon-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": "5.0.
|
|
3
|
+
"version": "5.0.92",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@ai-sdk/anthropic": "4.0.
|
|
45
|
-
"@ai-sdk/openai": "4.0.
|
|
46
|
-
"@ai-sdk/provider": "4.0.
|
|
47
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
44
|
+
"@ai-sdk/anthropic": "4.0.61",
|
|
45
|
+
"@ai-sdk/openai": "4.0.73",
|
|
46
|
+
"@ai-sdk/provider": "4.0.18",
|
|
47
|
+
"@ai-sdk/provider-utils": "5.0.46",
|
|
48
48
|
"@smithy/eventstream-codec": "^4.3.3",
|
|
49
49
|
"@smithy/util-utf8": "^4.3.3",
|
|
50
50
|
"aws4fetch": "^1.0.20"
|
|
@@ -10,6 +10,8 @@ export type AmazonBedrockChatModelId =
|
|
|
10
10
|
| 'anthropic.claude-sonnet-5'
|
|
11
11
|
| 'anthropic.claude-fable-5'
|
|
12
12
|
| 'anthropic.claude-fable-5-1'
|
|
13
|
+
| 'anthropic.claude-opus-5'
|
|
14
|
+
| 'anthropic.claude-opus-5-5'
|
|
13
15
|
| 'anthropic.claude-opus-4-8'
|
|
14
16
|
| 'anthropic.claude-opus-4-7'
|
|
15
17
|
| 'anthropic.claude-opus-4-6-v1'
|
|
@@ -62,6 +64,8 @@ export type AmazonBedrockChatModelId =
|
|
|
62
64
|
| 'us.anthropic.claude-sonnet-5'
|
|
63
65
|
| 'us.anthropic.claude-fable-5'
|
|
64
66
|
| 'us.anthropic.claude-fable-5-1'
|
|
67
|
+
| 'us.anthropic.claude-opus-5'
|
|
68
|
+
| 'us.anthropic.claude-opus-5-5'
|
|
65
69
|
| 'us.anthropic.claude-opus-4-8'
|
|
66
70
|
| 'us.anthropic.claude-opus-4-7'
|
|
67
71
|
| 'us.anthropic.claude-opus-4-6-v1'
|
|
@@ -245,8 +245,10 @@ export class AmazonBedrockChatLanguageModel implements LanguageModelV4 {
|
|
|
245
245
|
amazonBedrockOptions.reasoningConfig?.type === 'enabled' ||
|
|
246
246
|
amazonBedrockOptions.reasoningConfig?.type === 'adaptive';
|
|
247
247
|
|
|
248
|
-
const {
|
|
249
|
-
|
|
248
|
+
const {
|
|
249
|
+
supportsStructuredOutput: modelSupportsStructuredOutput,
|
|
250
|
+
rejectsForcedToolUse,
|
|
251
|
+
} = getModelCapabilities(this.modelId);
|
|
250
252
|
|
|
251
253
|
const structuredOutputMode =
|
|
252
254
|
amazonBedrockOptions.structuredOutputMode ??
|
|
@@ -297,13 +299,14 @@ export class AmazonBedrockChatLanguageModel implements LanguageModelV4 {
|
|
|
297
299
|
|
|
298
300
|
const useJsonInstructionForStructuredOutput =
|
|
299
301
|
!useNativeStructuredOutput &&
|
|
300
|
-
structuredOutputMode !== 'jsonTool' &&
|
|
301
302
|
isAnthropicModel &&
|
|
302
|
-
!supportsStrictTools(this.modelId) &&
|
|
303
303
|
responseFormat?.type === 'json' &&
|
|
304
304
|
responseFormat.schema != null &&
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
(rejectsForcedToolUse ||
|
|
306
|
+
(structuredOutputMode !== 'jsonTool' &&
|
|
307
|
+
!supportsStrictTools(this.modelId) &&
|
|
308
|
+
tools != null &&
|
|
309
|
+
tools.length > 0));
|
|
307
310
|
|
|
308
311
|
const jsonResponseTool: LanguageModelV4FunctionTool | undefined =
|
|
309
312
|
responseFormat?.type === 'json' &&
|
|
@@ -2,6 +2,8 @@ export type AmazonBedrockAnthropicModelId =
|
|
|
2
2
|
| 'anthropic.claude-sonnet-5'
|
|
3
3
|
| 'anthropic.claude-fable-5'
|
|
4
4
|
| 'anthropic.claude-fable-5-1'
|
|
5
|
+
| 'anthropic.claude-opus-5'
|
|
6
|
+
| 'anthropic.claude-opus-5-5'
|
|
5
7
|
| 'anthropic.claude-opus-4-8'
|
|
6
8
|
| 'anthropic.claude-opus-4-7'
|
|
7
9
|
| 'anthropic.claude-opus-4-6-v1'
|
|
@@ -22,6 +24,8 @@ export type AmazonBedrockAnthropicModelId =
|
|
|
22
24
|
| 'us.anthropic.claude-sonnet-5'
|
|
23
25
|
| 'us.anthropic.claude-fable-5'
|
|
24
26
|
| 'us.anthropic.claude-fable-5-1'
|
|
27
|
+
| 'us.anthropic.claude-opus-5'
|
|
28
|
+
| 'us.anthropic.claude-opus-5-5'
|
|
25
29
|
| 'us.anthropic.claude-opus-4-8'
|
|
26
30
|
| 'us.anthropic.claude-opus-4-7'
|
|
27
31
|
| 'us.anthropic.claude-opus-4-6-v1'
|