@ai-sdk/amazon-bedrock 3.0.131 → 3.0.133
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.js +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/index.d.mts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +116 -97
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +63 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/amazon-bedrock
|
|
2
2
|
|
|
3
|
+
## 3.0.133
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [79c34cc]
|
|
8
|
+
- @ai-sdk/anthropic@2.0.103
|
|
9
|
+
|
|
10
|
+
## 3.0.132
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- f6f8b61: fix(amazon-bedrock): enable Anthropic features for application inference profile chat models
|
|
15
|
+
- 8399d3e: fix(amazon-bedrock): preserve API error messages when the error type is omitted
|
|
16
|
+
|
|
3
17
|
## 3.0.131
|
|
4
18
|
|
|
5
19
|
### 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 ? "3.0.
|
|
38
|
+
var VERSION = true ? "3.0.133" : "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
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { AwsV4Signer } from "aws4fetch";
|
|
24
24
|
|
|
25
25
|
// src/version.ts
|
|
26
|
-
var VERSION = true ? "3.0.
|
|
26
|
+
var VERSION = true ? "3.0.133" : "0.0.0-test";
|
|
27
27
|
|
|
28
28
|
// src/bedrock-sigv4-fetch.ts
|
|
29
29
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,15 @@ import { anthropicTools } from '@ai-sdk/anthropic/internal';
|
|
|
4
4
|
import { z } from 'zod/v4';
|
|
5
5
|
|
|
6
6
|
type BedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-sonnet-5' | 'anthropic.claude-fable-5' | 'anthropic.claude-opus-4-8' | 'anthropic.claude-opus-4-7' | 'anthropic.claude-opus-4-6-v1' | 'anthropic.claude-sonnet-4-6-v1' | 'anthropic.claude-opus-4-5-20251101-v1:0' | 'anthropic.claude-haiku-4-5-20251001-v1:0' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-sonnet-4-5-20250929-v1:0' | 'anthropic.claude-opus-4-20250514-v1:0' | 'anthropic.claude-opus-4-1-20250805-v1:0' | 'anthropic.claude-3-7-sonnet-20250219-v1:0' | 'anthropic.claude-3-5-sonnet-20240620-v1:0' | 'anthropic.claude-3-5-sonnet-20241022-v2:0' | 'anthropic.claude-3-5-haiku-20241022-v1:0' | 'anthropic.claude-3-sonnet-20240229-v1:0' | 'anthropic.claude-3-haiku-20240307-v1:0' | 'anthropic.claude-3-opus-20240229-v1:0' | 'cohere.command-text-v14' | 'cohere.command-light-text-v14' | 'cohere.command-r-v1:0' | 'cohere.command-r-plus-v1:0' | 'meta.llama3-70b-instruct-v1:0' | 'meta.llama3-8b-instruct-v1:0' | 'meta.llama3-1-405b-instruct-v1:0' | 'meta.llama3-1-70b-instruct-v1:0' | 'meta.llama3-1-8b-instruct-v1:0' | 'meta.llama3-2-11b-instruct-v1:0' | 'meta.llama3-2-1b-instruct-v1:0' | 'meta.llama3-2-3b-instruct-v1:0' | 'meta.llama3-2-90b-instruct-v1:0' | 'mistral.mistral-7b-instruct-v0:2' | 'mistral.mixtral-8x7b-instruct-v0:1' | 'mistral.mistral-large-2402-v1:0' | 'mistral.mistral-small-2402-v1:0' | 'openai.gpt-oss-120b-1:0' | 'openai.gpt-oss-20b-1:0' | 'amazon.titan-text-express-v1' | 'amazon.titan-text-lite-v1' | 'us.amazon.nova-premier-v1:0' | 'us.amazon.nova-pro-v1:0' | 'us.amazon.nova-micro-v1:0' | 'us.amazon.nova-lite-v1:0' | 'us.anthropic.claude-3-sonnet-20240229-v1:0' | 'us.anthropic.claude-3-opus-20240229-v1:0' | 'us.anthropic.claude-3-haiku-20240307-v1:0' | 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' | 'us.anthropic.claude-3-5-haiku-20241022-v1:0' | 'us.anthropic.claude-3-5-sonnet-20241022-v2:0' | 'us.anthropic.claude-3-7-sonnet-20250219-v1:0' | 'us.anthropic.claude-sonnet-5' | 'us.anthropic.claude-fable-5' | 'us.anthropic.claude-opus-4-8' | 'us.anthropic.claude-opus-4-7' | 'us.anthropic.claude-opus-4-6-v1' | 'us.anthropic.claude-sonnet-4-6-v1' | 'us.anthropic.claude-opus-4-5-20251101-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-sonnet-4-20250514-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | 'us.meta.llama3-2-11b-instruct-v1:0' | 'us.meta.llama3-2-3b-instruct-v1:0' | 'us.meta.llama3-2-90b-instruct-v1:0' | 'us.meta.llama3-2-1b-instruct-v1:0' | 'us.meta.llama3-1-8b-instruct-v1:0' | 'us.meta.llama3-1-70b-instruct-v1:0' | 'us.meta.llama3-3-70b-instruct-v1:0' | 'us.deepseek.r1-v1:0' | 'us.mistral.pixtral-large-2502-v1:0' | 'us.meta.llama4-scout-17b-instruct-v1:0' | 'us.meta.llama4-maverick-17b-instruct-v1:0' | (string & {});
|
|
7
|
+
type AmazonBedrockChatModelSettings = {
|
|
8
|
+
/**
|
|
9
|
+
* The chat model family.
|
|
10
|
+
*
|
|
11
|
+
* Specify this when the model ID does not identify the underlying model,
|
|
12
|
+
* such as an application inference profile ARN.
|
|
13
|
+
*/
|
|
14
|
+
modelFamily?: 'anthropic';
|
|
15
|
+
};
|
|
7
16
|
declare const bedrockProviderOptions: z.ZodObject<{
|
|
8
17
|
structuredOutputMode: z.ZodOptional<z.ZodEnum<{
|
|
9
18
|
outputFormat: "outputFormat";
|
|
@@ -117,8 +126,8 @@ interface AmazonBedrockProviderSettings {
|
|
|
117
126
|
generateId?: () => string;
|
|
118
127
|
}
|
|
119
128
|
interface AmazonBedrockProvider extends ProviderV2 {
|
|
120
|
-
(modelId: BedrockChatModelId): LanguageModelV2;
|
|
121
|
-
languageModel(modelId: BedrockChatModelId): LanguageModelV2;
|
|
129
|
+
(modelId: BedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV2;
|
|
130
|
+
languageModel(modelId: BedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV2;
|
|
122
131
|
embedding(modelId: BedrockEmbeddingModelId): EmbeddingModelV2<string>;
|
|
123
132
|
/**
|
|
124
133
|
Creates a model for image generation.
|
|
@@ -144,4 +153,4 @@ declare const bedrock: AmazonBedrockProvider;
|
|
|
144
153
|
|
|
145
154
|
declare const VERSION: string;
|
|
146
155
|
|
|
147
|
-
export { type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, VERSION, bedrock, createAmazonBedrock };
|
|
156
|
+
export { type AmazonBedrockChatModelSettings, type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, VERSION, bedrock, createAmazonBedrock };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,15 @@ import { anthropicTools } from '@ai-sdk/anthropic/internal';
|
|
|
4
4
|
import { z } from 'zod/v4';
|
|
5
5
|
|
|
6
6
|
type BedrockChatModelId = 'amazon.titan-tg1-large' | 'amazon.titan-text-express-v1' | 'anthropic.claude-v2' | 'anthropic.claude-v2:1' | 'anthropic.claude-instant-v1' | 'anthropic.claude-sonnet-5' | 'anthropic.claude-fable-5' | 'anthropic.claude-opus-4-8' | 'anthropic.claude-opus-4-7' | 'anthropic.claude-opus-4-6-v1' | 'anthropic.claude-sonnet-4-6-v1' | 'anthropic.claude-opus-4-5-20251101-v1:0' | 'anthropic.claude-haiku-4-5-20251001-v1:0' | 'anthropic.claude-sonnet-4-20250514-v1:0' | 'anthropic.claude-sonnet-4-5-20250929-v1:0' | 'anthropic.claude-opus-4-20250514-v1:0' | 'anthropic.claude-opus-4-1-20250805-v1:0' | 'anthropic.claude-3-7-sonnet-20250219-v1:0' | 'anthropic.claude-3-5-sonnet-20240620-v1:0' | 'anthropic.claude-3-5-sonnet-20241022-v2:0' | 'anthropic.claude-3-5-haiku-20241022-v1:0' | 'anthropic.claude-3-sonnet-20240229-v1:0' | 'anthropic.claude-3-haiku-20240307-v1:0' | 'anthropic.claude-3-opus-20240229-v1:0' | 'cohere.command-text-v14' | 'cohere.command-light-text-v14' | 'cohere.command-r-v1:0' | 'cohere.command-r-plus-v1:0' | 'meta.llama3-70b-instruct-v1:0' | 'meta.llama3-8b-instruct-v1:0' | 'meta.llama3-1-405b-instruct-v1:0' | 'meta.llama3-1-70b-instruct-v1:0' | 'meta.llama3-1-8b-instruct-v1:0' | 'meta.llama3-2-11b-instruct-v1:0' | 'meta.llama3-2-1b-instruct-v1:0' | 'meta.llama3-2-3b-instruct-v1:0' | 'meta.llama3-2-90b-instruct-v1:0' | 'mistral.mistral-7b-instruct-v0:2' | 'mistral.mixtral-8x7b-instruct-v0:1' | 'mistral.mistral-large-2402-v1:0' | 'mistral.mistral-small-2402-v1:0' | 'openai.gpt-oss-120b-1:0' | 'openai.gpt-oss-20b-1:0' | 'amazon.titan-text-express-v1' | 'amazon.titan-text-lite-v1' | 'us.amazon.nova-premier-v1:0' | 'us.amazon.nova-pro-v1:0' | 'us.amazon.nova-micro-v1:0' | 'us.amazon.nova-lite-v1:0' | 'us.anthropic.claude-3-sonnet-20240229-v1:0' | 'us.anthropic.claude-3-opus-20240229-v1:0' | 'us.anthropic.claude-3-haiku-20240307-v1:0' | 'us.anthropic.claude-3-5-sonnet-20240620-v1:0' | 'us.anthropic.claude-3-5-haiku-20241022-v1:0' | 'us.anthropic.claude-3-5-sonnet-20241022-v2:0' | 'us.anthropic.claude-3-7-sonnet-20250219-v1:0' | 'us.anthropic.claude-sonnet-5' | 'us.anthropic.claude-fable-5' | 'us.anthropic.claude-opus-4-8' | 'us.anthropic.claude-opus-4-7' | 'us.anthropic.claude-opus-4-6-v1' | 'us.anthropic.claude-sonnet-4-6-v1' | 'us.anthropic.claude-opus-4-5-20251101-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-sonnet-4-20250514-v1:0' | 'us.anthropic.claude-sonnet-4-5-20250929-v1:0' | 'us.anthropic.claude-opus-4-20250514-v1:0' | 'us.anthropic.claude-opus-4-1-20250805-v1:0' | 'us.meta.llama3-2-11b-instruct-v1:0' | 'us.meta.llama3-2-3b-instruct-v1:0' | 'us.meta.llama3-2-90b-instruct-v1:0' | 'us.meta.llama3-2-1b-instruct-v1:0' | 'us.meta.llama3-1-8b-instruct-v1:0' | 'us.meta.llama3-1-70b-instruct-v1:0' | 'us.meta.llama3-3-70b-instruct-v1:0' | 'us.deepseek.r1-v1:0' | 'us.mistral.pixtral-large-2502-v1:0' | 'us.meta.llama4-scout-17b-instruct-v1:0' | 'us.meta.llama4-maverick-17b-instruct-v1:0' | (string & {});
|
|
7
|
+
type AmazonBedrockChatModelSettings = {
|
|
8
|
+
/**
|
|
9
|
+
* The chat model family.
|
|
10
|
+
*
|
|
11
|
+
* Specify this when the model ID does not identify the underlying model,
|
|
12
|
+
* such as an application inference profile ARN.
|
|
13
|
+
*/
|
|
14
|
+
modelFamily?: 'anthropic';
|
|
15
|
+
};
|
|
7
16
|
declare const bedrockProviderOptions: z.ZodObject<{
|
|
8
17
|
structuredOutputMode: z.ZodOptional<z.ZodEnum<{
|
|
9
18
|
outputFormat: "outputFormat";
|
|
@@ -117,8 +126,8 @@ interface AmazonBedrockProviderSettings {
|
|
|
117
126
|
generateId?: () => string;
|
|
118
127
|
}
|
|
119
128
|
interface AmazonBedrockProvider extends ProviderV2 {
|
|
120
|
-
(modelId: BedrockChatModelId): LanguageModelV2;
|
|
121
|
-
languageModel(modelId: BedrockChatModelId): LanguageModelV2;
|
|
129
|
+
(modelId: BedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV2;
|
|
130
|
+
languageModel(modelId: BedrockChatModelId, settings?: AmazonBedrockChatModelSettings): LanguageModelV2;
|
|
122
131
|
embedding(modelId: BedrockEmbeddingModelId): EmbeddingModelV2<string>;
|
|
123
132
|
/**
|
|
124
133
|
Creates a model for image generation.
|
|
@@ -144,4 +153,4 @@ declare const bedrock: AmazonBedrockProvider;
|
|
|
144
153
|
|
|
145
154
|
declare const VERSION: string;
|
|
146
155
|
|
|
147
|
-
export { type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, VERSION, bedrock, createAmazonBedrock };
|
|
156
|
+
export { type AmazonBedrockChatModelSettings, type AmazonBedrockProvider, type AmazonBedrockProviderSettings, type BedrockProviderOptions, VERSION, bedrock, createAmazonBedrock };
|