@ai-sdk/amazon-bedrock 4.0.145 → 4.0.146

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.146
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [0a295e3]
8
+ - @ai-sdk/anthropic@3.0.105
9
+
3
10
  ## 4.0.145
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.145" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.146" : "0.0.0-test";
39
39
 
40
40
  // src/bedrock-sigv4-fetch.ts
41
41
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
@@ -24,7 +24,7 @@ import {
24
24
  import { AwsV4Signer } from "aws4fetch";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "4.0.145" : "0.0.0-test";
27
+ var VERSION = true ? "4.0.146" : "0.0.0-test";
28
28
 
29
29
  // src/bedrock-sigv4-fetch.ts
30
30
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
package/dist/index.js CHANGED
@@ -2165,7 +2165,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
2165
2165
  var import_aws4fetch = require("aws4fetch");
2166
2166
 
2167
2167
  // src/version.ts
2168
- var VERSION = true ? "4.0.145" : "0.0.0-test";
2168
+ var VERSION = true ? "4.0.146" : "0.0.0-test";
2169
2169
 
2170
2170
  // src/bedrock-sigv4-fetch.ts
2171
2171
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
package/dist/index.mjs CHANGED
@@ -2190,7 +2190,7 @@ import {
2190
2190
  import { AwsV4Signer } from "aws4fetch";
2191
2191
 
2192
2192
  // src/version.ts
2193
- var VERSION = true ? "4.0.145" : "0.0.0-test";
2193
+ var VERSION = true ? "4.0.146" : "0.0.0-test";
2194
2194
 
2195
2195
  // src/bedrock-sigv4-fetch.ts
2196
2196
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
@@ -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.145" : "0.0.0-test";
38
+ var VERSION = true ? "4.0.146" : "0.0.0-test";
39
39
 
40
40
  // src/bedrock-sigv4-fetch.ts
41
41
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
@@ -23,7 +23,7 @@ import {
23
23
  import { AwsV4Signer } from "aws4fetch";
24
24
 
25
25
  // src/version.ts
26
- var VERSION = true ? "4.0.145" : "0.0.0-test";
26
+ var VERSION = true ? "4.0.146" : "0.0.0-test";
27
27
 
28
28
  // src/bedrock-sigv4-fetch.ts
29
29
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
@@ -536,6 +536,11 @@ console.log(amazonResult.reasoningText); // reasoning text
536
536
  console.log(amazonResult.text); // text response
537
537
  ```
538
538
 
539
+ For Anthropic models, Bedrock's `maxTokens` limit includes both thinking and
540
+ final text. The provider therefore adds `budgetTokens` to `maxOutputTokens`
541
+ when setting `maxTokens`. When `maxOutputTokens` is omitted, the provider adds
542
+ `budgetTokens` to the default of `4096`.
543
+
539
544
  See [AI SDK UI: Chatbot](/docs/ai-sdk-ui/chatbot#reasoning) for more details
540
545
  on how to integrate reasoning into your chatbot.
541
546
 
@@ -1619,6 +1624,11 @@ console.log(reasoning); // reasoning details including redacted reasoning
1619
1624
  console.log(text); // text response
1620
1625
  ```
1621
1626
 
1627
+ Anthropic's `max_tokens` limit includes both thinking and final text. To reserve
1628
+ room for both, the provider adds `budgetTokens` to `maxOutputTokens` when
1629
+ setting `max_tokens`. For known models, the combined value is capped at the
1630
+ model's maximum output token limit.
1631
+
1622
1632
  See [AI SDK UI: Chatbot](/docs/ai-sdk-ui/chatbot#reasoning) for more details
1623
1633
  on how to integrate reasoning into your chatbot.
1624
1634
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/amazon-bedrock",
3
- "version": "4.0.145",
3
+ "version": "4.0.146",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -44,18 +44,18 @@
44
44
  "@smithy/eventstream-codec": "^4.0.1",
45
45
  "@smithy/util-utf8": "^4.0.0",
46
46
  "aws4fetch": "^1.0.20",
47
+ "@ai-sdk/anthropic": "3.0.105",
48
+ "@ai-sdk/openai": "3.0.90",
47
49
  "@ai-sdk/provider": "3.0.14",
48
- "@ai-sdk/anthropic": "3.0.104",
49
- "@ai-sdk/provider-utils": "4.0.41",
50
- "@ai-sdk/openai": "3.0.90"
50
+ "@ai-sdk/provider-utils": "4.0.41"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "20.17.24",
54
54
  "tsup": "^8.3.0",
55
55
  "typescript": "5.8.3",
56
56
  "zod": "3.25.76",
57
- "@vercel/ai-tsconfig": "0.0.0",
58
- "@ai-sdk/test-server": "1.0.6"
57
+ "@ai-sdk/test-server": "1.0.6",
58
+ "@vercel/ai-tsconfig": "0.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "zod": "^3.25.76 || ^4.1.8"