@ai-sdk/amazon-bedrock 5.0.98 → 5.0.99
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.d.ts +1 -1
- package/dist/anthropic/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mantle/index.cjs +1 -1
- package/dist/mantle/index.js +1 -1
- package/docs/08-amazon-bedrock.mdx +8 -6
- package/package.json +2 -2
- package/src/amazon-bedrock-chat-language-model-options.ts +2 -0
- package/src/anthropic/amazon-bedrock-anthropic-options.ts +2 -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.99" : "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.99" : "0.0.0-test";
|
|
27
27
|
|
|
28
28
|
// src/amazon-bedrock-sigv4-fetch.ts
|
|
29
29
|
function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
|
@@ -544,7 +544,7 @@ const cyberpunkAnalysis =
|
|
|
544
544
|
'... literary analysis of cyberpunk themes and concepts ...';
|
|
545
545
|
|
|
546
546
|
const result = await generateText({
|
|
547
|
-
model: amazonBedrock('us.anthropic.claude-sonnet-5'),
|
|
547
|
+
model: amazonBedrock('us.anthropic.claude-sonnet-5-5'),
|
|
548
548
|
messages: [
|
|
549
549
|
{
|
|
550
550
|
role: 'system',
|
|
@@ -580,7 +580,7 @@ const cyberpunkAnalysis =
|
|
|
580
580
|
'... literary analysis of cyberpunk themes and concepts ...';
|
|
581
581
|
|
|
582
582
|
const result = streamText({
|
|
583
|
-
model: amazonBedrock('us.anthropic.claude-sonnet-5'),
|
|
583
|
+
model: amazonBedrock('us.anthropic.claude-sonnet-5-5'),
|
|
584
584
|
messages: [
|
|
585
585
|
{
|
|
586
586
|
role: 'assistant',
|
|
@@ -1590,10 +1590,10 @@ You can use the following optional settings to customize the Bedrock Anthropic p
|
|
|
1590
1590
|
### Language Models
|
|
1591
1591
|
|
|
1592
1592
|
You can create models that call the [Anthropic Messages API](https://docs.anthropic.com/claude/reference/messages_post) using the provider instance.
|
|
1593
|
-
The first argument is the model id, e.g. `us.anthropic.claude-sonnet-5`.
|
|
1593
|
+
The first argument is the model id, e.g. `us.anthropic.claude-sonnet-5-5`.
|
|
1594
1594
|
|
|
1595
1595
|
```ts
|
|
1596
|
-
const model = bedrockAnthropic('us.anthropic.claude-sonnet-5');
|
|
1596
|
+
const model = bedrockAnthropic('us.anthropic.claude-sonnet-5-5');
|
|
1597
1597
|
```
|
|
1598
1598
|
|
|
1599
1599
|
You can use Bedrock Anthropic language models to generate text with the `generateText` function:
|
|
@@ -1603,7 +1603,7 @@ import { bedrockAnthropic } from '@ai-sdk/amazon-bedrock/anthropic';
|
|
|
1603
1603
|
import { generateText } from 'ai';
|
|
1604
1604
|
|
|
1605
1605
|
const { text } = await generateText({
|
|
1606
|
-
model: bedrockAnthropic('us.anthropic.claude-sonnet-5'),
|
|
1606
|
+
model: bedrockAnthropic('us.anthropic.claude-sonnet-5-5'),
|
|
1607
1607
|
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
|
|
1608
1608
|
});
|
|
1609
1609
|
```
|
|
@@ -1627,7 +1627,7 @@ import { bedrockAnthropic } from '@ai-sdk/amazon-bedrock/anthropic';
|
|
|
1627
1627
|
import { generateText } from 'ai';
|
|
1628
1628
|
|
|
1629
1629
|
const result = await generateText({
|
|
1630
|
-
model: bedrockAnthropic('us.anthropic.claude-sonnet-5'),
|
|
1630
|
+
model: bedrockAnthropic('us.anthropic.claude-sonnet-5-5'),
|
|
1631
1631
|
messages: [
|
|
1632
1632
|
{
|
|
1633
1633
|
role: 'system',
|
|
@@ -1756,6 +1756,7 @@ const result = await generateText({
|
|
|
1756
1756
|
Anthropic has reasoning support for Claude 3.7 and Claude 4 models on Bedrock, including:
|
|
1757
1757
|
|
|
1758
1758
|
- `us.anthropic.claude-fable-5-1`
|
|
1759
|
+
- `us.anthropic.claude-sonnet-5-5`
|
|
1759
1760
|
- `us.anthropic.claude-sonnet-5`
|
|
1760
1761
|
- `us.anthropic.claude-fable-5`
|
|
1761
1762
|
- `us.anthropic.claude-opus-4-8`
|
|
@@ -1802,6 +1803,7 @@ on how to integrate reasoning into your chatbot.
|
|
|
1802
1803
|
| Model | Image Input | Object Generation | Tool Usage | Computer Use | Reasoning |
|
|
1803
1804
|
| ---------------------------------------------- | ----------- | ----------------- | ---------- | ------------ | --------- |
|
|
1804
1805
|
| `us.anthropic.claude-fable-5-1` | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> |
|
|
1806
|
+
| `us.anthropic.claude-sonnet-5-5` | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> |
|
|
1805
1807
|
| `us.anthropic.claude-sonnet-5` | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> |
|
|
1806
1808
|
| `us.anthropic.claude-fable-5` | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> |
|
|
1807
1809
|
| `us.anthropic.claude-opus-4-8` | <Check /> | <Check /> | <Check /> | <Check /> | <Check /> |
|
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.99",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@ai-sdk/anthropic": "4.0.
|
|
44
|
+
"@ai-sdk/anthropic": "4.0.67",
|
|
45
45
|
"@ai-sdk/openai": "4.0.79",
|
|
46
46
|
"@ai-sdk/provider": "4.0.19",
|
|
47
47
|
"@ai-sdk/provider-utils": "5.0.50",
|
|
@@ -8,6 +8,7 @@ export type AmazonBedrockChatModelId =
|
|
|
8
8
|
| 'anthropic.claude-v2:1'
|
|
9
9
|
| 'anthropic.claude-instant-v1'
|
|
10
10
|
| 'anthropic.claude-sonnet-5'
|
|
11
|
+
| 'anthropic.claude-sonnet-5-5'
|
|
11
12
|
| 'anthropic.claude-fable-5'
|
|
12
13
|
| 'anthropic.claude-fable-5-1'
|
|
13
14
|
| 'anthropic.claude-opus-5'
|
|
@@ -62,6 +63,7 @@ export type AmazonBedrockChatModelId =
|
|
|
62
63
|
| 'us.anthropic.claude-3-5-sonnet-20241022-v2:0'
|
|
63
64
|
| 'us.anthropic.claude-3-7-sonnet-20250219-v1:0'
|
|
64
65
|
| 'us.anthropic.claude-sonnet-5'
|
|
66
|
+
| 'us.anthropic.claude-sonnet-5-5'
|
|
65
67
|
| 'us.anthropic.claude-fable-5'
|
|
66
68
|
| 'us.anthropic.claude-fable-5-1'
|
|
67
69
|
| 'us.anthropic.claude-opus-5'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type AmazonBedrockAnthropicModelId =
|
|
2
2
|
| 'anthropic.claude-sonnet-5'
|
|
3
|
+
| 'anthropic.claude-sonnet-5-5'
|
|
3
4
|
| 'anthropic.claude-fable-5'
|
|
4
5
|
| 'anthropic.claude-fable-5-1'
|
|
5
6
|
| 'anthropic.claude-opus-5'
|
|
@@ -22,6 +23,7 @@ export type AmazonBedrockAnthropicModelId =
|
|
|
22
23
|
| 'anthropic.claude-3-sonnet-20240229-v1:0'
|
|
23
24
|
| 'anthropic.claude-3-haiku-20240307-v1:0'
|
|
24
25
|
| 'us.anthropic.claude-sonnet-5'
|
|
26
|
+
| 'us.anthropic.claude-sonnet-5-5'
|
|
25
27
|
| 'us.anthropic.claude-fable-5'
|
|
26
28
|
| 'us.anthropic.claude-fable-5-1'
|
|
27
29
|
| 'us.anthropic.claude-opus-5'
|