@ai-sdk/amazon-bedrock 4.0.68 → 4.0.70
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 +15 -0
- package/dist/anthropic/index.js +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/08-amazon-bedrock.mdx +6 -13
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/amazon-bedrock
|
|
2
2
|
|
|
3
|
+
## 4.0.70
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [64a8fae]
|
|
8
|
+
- @ai-sdk/anthropic@3.0.51
|
|
9
|
+
|
|
10
|
+
## 4.0.69
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [58bc42d]
|
|
15
|
+
- @ai-sdk/provider-utils@4.0.16
|
|
16
|
+
- @ai-sdk/anthropic@3.0.50
|
|
17
|
+
|
|
3
18
|
## 4.0.68
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/anthropic/index.js
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 ? "4.0.
|
|
38
|
+
var VERSION = true ? "4.0.70" : "0.0.0-test";
|
|
39
39
|
|
|
40
40
|
// src/bedrock-sigv4-fetch.ts
|
|
41
41
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
package/dist/anthropic/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { AwsV4Signer } from "aws4fetch";
|
|
25
25
|
|
|
26
26
|
// src/version.ts
|
|
27
|
-
var VERSION = true ? "4.0.
|
|
27
|
+
var VERSION = true ? "4.0.70" : "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
|
@@ -1948,7 +1948,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
|
|
|
1948
1948
|
var import_aws4fetch = require("aws4fetch");
|
|
1949
1949
|
|
|
1950
1950
|
// src/version.ts
|
|
1951
|
-
var VERSION = true ? "4.0.
|
|
1951
|
+
var VERSION = true ? "4.0.70" : "0.0.0-test";
|
|
1952
1952
|
|
|
1953
1953
|
// src/bedrock-sigv4-fetch.ts
|
|
1954
1954
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
package/dist/index.mjs
CHANGED
|
@@ -1965,7 +1965,7 @@ import {
|
|
|
1965
1965
|
import { AwsV4Signer } from "aws4fetch";
|
|
1966
1966
|
|
|
1967
1967
|
// src/version.ts
|
|
1968
|
-
var VERSION = true ? "4.0.
|
|
1968
|
+
var VERSION = true ? "4.0.70" : "0.0.0-test";
|
|
1969
1969
|
|
|
1970
1970
|
// src/bedrock-sigv4-fetch.ts
|
|
1971
1971
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
|
@@ -472,7 +472,7 @@ The following Bedrock-specific metadata may be returned in `providerMetadata.bed
|
|
|
472
472
|
|
|
473
473
|
Amazon Bedrock supports model creator-specific reasoning features:
|
|
474
474
|
|
|
475
|
-
- Anthropic (e.g. `claude-
|
|
475
|
+
- Anthropic (e.g. `claude-sonnet-4-5-20250929`): enable via the `reasoningConfig` provider option and specifying a thinking budget in tokens (minimum: `1024`, maximum: `64000`).
|
|
476
476
|
- Amazon (e.g. `us.amazon.nova-2-lite-v1:0`): enable via the `reasoningConfig` provider option and specifying a maximum reasoning effort level (`'low' | 'medium' | 'high'`).
|
|
477
477
|
|
|
478
478
|
```ts
|
|
@@ -484,7 +484,7 @@ import { generateText } from 'ai';
|
|
|
484
484
|
|
|
485
485
|
// Anthropic example
|
|
486
486
|
const anthropicResult = await generateText({
|
|
487
|
-
model: bedrock('us.
|
|
487
|
+
model: bedrock('us.anthropic.claude-sonnet-4-5-20250929-v1:0'),
|
|
488
488
|
prompt: 'How many people will live in the world in 2040?',
|
|
489
489
|
providerOptions: {
|
|
490
490
|
bedrock: {
|
|
@@ -713,10 +713,8 @@ These tools can be used in conjunction with the `anthropic.claude-3-5-sonnet-202
|
|
|
713
713
|
| `anthropic.claude-sonnet-4-5-20250929-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
714
714
|
| `anthropic.claude-opus-4-20250514-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
715
715
|
| `anthropic.claude-opus-4-1-20250805-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
716
|
-
| `anthropic.claude-3-7-sonnet-20250219-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
717
716
|
| `anthropic.claude-3-5-sonnet-20241022-v2:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
718
717
|
| `anthropic.claude-3-5-sonnet-20240620-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
719
|
-
| `anthropic.claude-3-5-haiku-20241022-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Cross size={18} /> |
|
|
720
718
|
| `anthropic.claude-3-opus-20240229-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
721
719
|
| `anthropic.claude-3-sonnet-20240229-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
722
720
|
| `anthropic.claude-3-haiku-20240307-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
@@ -724,10 +722,8 @@ These tools can be used in conjunction with the `anthropic.claude-3-5-sonnet-202
|
|
|
724
722
|
| `us.anthropic.claude-sonnet-4-5-20250929-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
725
723
|
| `us.anthropic.claude-opus-4-20250514-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
726
724
|
| `us.anthropic.claude-opus-4-1-20250805-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
727
|
-
| `us.anthropic.claude-3-7-sonnet-20250219-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
728
725
|
| `us.anthropic.claude-3-5-sonnet-20241022-v2:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
729
726
|
| `us.anthropic.claude-3-5-sonnet-20240620-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
730
|
-
| `us.anthropic.claude-3-5-haiku-20241022-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Cross size={18} /> |
|
|
731
727
|
| `us.anthropic.claude-3-sonnet-20240229-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
732
728
|
| `us.anthropic.claude-3-opus-20240229-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
733
729
|
| `us.anthropic.claude-3-haiku-20240307-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
@@ -1389,7 +1385,7 @@ import { bedrockAnthropic } from '@ai-sdk/amazon-bedrock/anthropic';
|
|
|
1389
1385
|
import { generateText } from 'ai';
|
|
1390
1386
|
|
|
1391
1387
|
const result = await generateText({
|
|
1392
|
-
model: bedrockAnthropic('us.anthropic.claude-
|
|
1388
|
+
model: bedrockAnthropic('us.anthropic.claude-sonnet-4-5-20250929-v1:0'),
|
|
1393
1389
|
messages: [
|
|
1394
1390
|
{
|
|
1395
1391
|
role: 'system',
|
|
@@ -1435,7 +1431,7 @@ import { bedrockAnthropic } from '@ai-sdk/amazon-bedrock/anthropic';
|
|
|
1435
1431
|
import { generateText, stepCountIs } from 'ai';
|
|
1436
1432
|
|
|
1437
1433
|
const result = await generateText({
|
|
1438
|
-
model: bedrockAnthropic('us.anthropic.claude-
|
|
1434
|
+
model: bedrockAnthropic('us.anthropic.claude-sonnet-4-5-20250929-v1:0'),
|
|
1439
1435
|
tools: {
|
|
1440
1436
|
bash: bedrockAnthropic.tools.bash_20241022({
|
|
1441
1437
|
execute: async ({ command }) => {
|
|
@@ -1456,7 +1452,7 @@ import { bedrockAnthropic } from '@ai-sdk/amazon-bedrock/anthropic';
|
|
|
1456
1452
|
import { generateText, stepCountIs } from 'ai';
|
|
1457
1453
|
|
|
1458
1454
|
const result = await generateText({
|
|
1459
|
-
model: bedrockAnthropic('us.anthropic.claude-
|
|
1455
|
+
model: bedrockAnthropic('us.anthropic.claude-sonnet-4-5-20250929-v1:0'),
|
|
1460
1456
|
tools: {
|
|
1461
1457
|
str_replace_editor: bedrockAnthropic.tools.textEditor_20241022({
|
|
1462
1458
|
execute: async ({ command, path, old_str, new_str, insert_text }) => {
|
|
@@ -1478,7 +1474,7 @@ import { generateText, stepCountIs } from 'ai';
|
|
|
1478
1474
|
import fs from 'fs';
|
|
1479
1475
|
|
|
1480
1476
|
const result = await generateText({
|
|
1481
|
-
model: bedrockAnthropic('us.anthropic.claude-
|
|
1477
|
+
model: bedrockAnthropic('us.anthropic.claude-sonnet-4-5-20250929-v1:0'),
|
|
1482
1478
|
tools: {
|
|
1483
1479
|
computer: bedrockAnthropic.tools.computer_20241022({
|
|
1484
1480
|
displayWidthPx: 1024,
|
|
@@ -1524,7 +1520,6 @@ Anthropic has reasoning support for Claude 3.7 and Claude 4 models on Bedrock, i
|
|
|
1524
1520
|
- `us.anthropic.claude-sonnet-4-20250514-v1:0`
|
|
1525
1521
|
- `us.anthropic.claude-opus-4-1-20250805-v1:0`
|
|
1526
1522
|
- `us.anthropic.claude-haiku-4-5-20251001-v1:0`
|
|
1527
|
-
- `us.anthropic.claude-3-7-sonnet-20250219-v1:0`
|
|
1528
1523
|
|
|
1529
1524
|
You can enable it using the `thinking` provider option and specifying a thinking budget in tokens.
|
|
1530
1525
|
|
|
@@ -1561,9 +1556,7 @@ on how to integrate reasoning into your chatbot.
|
|
|
1561
1556
|
| `us.anthropic.claude-sonnet-4-20250514-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
1562
1557
|
| `us.anthropic.claude-opus-4-1-20250805-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
1563
1558
|
| `us.anthropic.claude-haiku-4-5-20251001-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
1564
|
-
| `us.anthropic.claude-3-7-sonnet-20250219-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> |
|
|
1565
1559
|
| `us.anthropic.claude-3-5-sonnet-20241022-v2:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Cross size={18} /> | <Cross size={18} /> |
|
|
1566
|
-
| `us.anthropic.claude-3-5-haiku-20241022-v1:0` | <Check size={18} /> | <Check size={18} /> | <Check size={18} /> | <Cross size={18} /> | <Cross size={18} /> |
|
|
1567
1560
|
|
|
1568
1561
|
<Note>
|
|
1569
1562
|
The Bedrock Anthropic provider uses the native InvokeModel API and supports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/amazon-bedrock",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.70",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@smithy/eventstream-codec": "^4.0.1",
|
|
39
39
|
"@smithy/util-utf8": "^4.0.0",
|
|
40
40
|
"aws4fetch": "^1.0.20",
|
|
41
|
-
"@ai-sdk/anthropic": "3.0.
|
|
41
|
+
"@ai-sdk/anthropic": "3.0.51",
|
|
42
42
|
"@ai-sdk/provider": "3.0.8",
|
|
43
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
43
|
+
"@ai-sdk/provider-utils": "4.0.16"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "20.17.24",
|