@ai-sdk/amazon-bedrock 4.0.105 → 4.0.106

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.106
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [6e28d25]
8
+ - @ai-sdk/anthropic@3.0.78
9
+
3
10
  ## 4.0.105
4
11
 
5
12
  ### Patch Changes
@@ -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.105" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.106" : "0.0.0-test";
39
39
 
40
40
  // src/bedrock-sigv4-fetch.ts
41
41
  function createSigV4FetchFunction(getCredentials, fetch) {
@@ -24,7 +24,7 @@ import {
24
24
  import { AwsV4Signer } from "aws4fetch";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "4.0.105" : "0.0.0-test";
27
+ var VERSION = true ? "4.0.106" : "0.0.0-test";
28
28
 
29
29
  // src/bedrock-sigv4-fetch.ts
30
30
  function createSigV4FetchFunction(getCredentials, fetch) {
package/dist/index.js CHANGED
@@ -1981,7 +1981,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1981
1981
  var import_aws4fetch = require("aws4fetch");
1982
1982
 
1983
1983
  // src/version.ts
1984
- var VERSION = true ? "4.0.105" : "0.0.0-test";
1984
+ var VERSION = true ? "4.0.106" : "0.0.0-test";
1985
1985
 
1986
1986
  // src/bedrock-sigv4-fetch.ts
1987
1987
  function createSigV4FetchFunction(getCredentials, fetch) {
package/dist/index.mjs CHANGED
@@ -2002,7 +2002,7 @@ import {
2002
2002
  import { AwsV4Signer } from "aws4fetch";
2003
2003
 
2004
2004
  // src/version.ts
2005
- var VERSION = true ? "4.0.105" : "0.0.0-test";
2005
+ var VERSION = true ? "4.0.106" : "0.0.0-test";
2006
2006
 
2007
2007
  // src/bedrock-sigv4-fetch.ts
2008
2008
  function createSigV4FetchFunction(getCredentials, fetch) {
@@ -35,6 +35,31 @@ See the [Model Access Docs](https://docs.aws.amazon.com/bedrock/latest/userguide
35
35
 
36
36
  ### Authentication
37
37
 
38
+ The Amazon Bedrock provider supports two authentication methods with automatic fallback: API key authentication (recommended) and AWS SigV4 authentication using IAM credentials or the AWS SDK credentials chain.
39
+
40
+ #### Using an API Key (Recommended)
41
+
42
+ API key authentication provides a simpler setup compared to AWS SigV4 authentication. When an API key is supplied, it takes precedence over any SigV4 credentials.
43
+
44
+ Generate a bedrock API key from the [AWS console](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html), then either set it as the `AWS_BEARER_TOKEN_BEDROCK` environment variable:
45
+
46
+ ```bash
47
+ AWS_BEARER_TOKEN_BEDROCK=your-api-key-here
48
+ ```
49
+
50
+ or pass it directly to `createAmazonBedrock`:
51
+
52
+ ```ts
53
+ import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock';
54
+
55
+ const amazonBedrock = createAmazonBedrock({
56
+ apiKey: 'your-api-key-here',
57
+ region: 'us-east-1',
58
+ });
59
+ ```
60
+
61
+ When `apiKey` is omitted, the provider falls back to `AWS_BEARER_TOKEN_BEDROCK`, and then to SigV4 authentication if neither is set.
62
+
38
63
  #### Using IAM Access Key and Secret Key
39
64
 
40
65
  **Step 1: Creating AWS Access Key and Secret Key**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/amazon-bedrock",
3
- "version": "4.0.105",
3
+ "version": "4.0.106",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -38,7 +38,7 @@
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.77",
41
+ "@ai-sdk/anthropic": "3.0.78",
42
42
  "@ai-sdk/provider": "3.0.10",
43
43
  "@ai-sdk/provider-utils": "4.0.27"
44
44
  },