@ai-sdk/amazon-bedrock 5.0.38 → 5.0.39

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,16 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 5.0.39
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [dc0c28e]
8
+ - Updated dependencies [f7c4a38]
9
+ - Updated dependencies [fa95504]
10
+ - @ai-sdk/anthropic@4.0.26
11
+ - @ai-sdk/openai@4.0.26
12
+ - @ai-sdk/provider-utils@5.0.17
13
+
3
14
  ## 5.0.38
4
15
 
5
16
  ### Patch Changes
@@ -24,7 +24,7 @@ import {
24
24
  import { AwsV4Signer } from "aws4fetch";
25
25
 
26
26
  // src/version.ts
27
- var VERSION = true ? "5.0.38" : "0.0.0-test";
27
+ var VERSION = true ? "5.0.39" : "0.0.0-test";
28
28
 
29
29
  // src/amazon-bedrock-sigv4-fetch.ts
30
30
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
package/dist/index.js CHANGED
@@ -2493,7 +2493,7 @@ import {
2493
2493
  import { AwsV4Signer } from "aws4fetch";
2494
2494
 
2495
2495
  // src/version.ts
2496
- var VERSION = true ? "5.0.38" : "0.0.0-test";
2496
+ var VERSION = true ? "5.0.39" : "0.0.0-test";
2497
2497
 
2498
2498
  // src/amazon-bedrock-sigv4-fetch.ts
2499
2499
  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 ? "5.0.38" : "0.0.0-test";
38
+ var VERSION = true ? "5.0.39" : "0.0.0-test";
39
39
 
40
40
  // src/amazon-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 ? "5.0.38" : "0.0.0-test";
26
+ var VERSION = true ? "5.0.39" : "0.0.0-test";
27
27
 
28
28
  // src/amazon-bedrock-sigv4-fetch.ts
29
29
  function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
@@ -508,6 +508,11 @@ console.log(amazonResult.reasoningText); // reasoning text
508
508
  console.log(amazonResult.text); // text response
509
509
  ```
510
510
 
511
+ For Anthropic models, Bedrock's `maxTokens` limit includes both thinking and
512
+ final text. The provider therefore adds `budgetTokens` to `maxOutputTokens`
513
+ when setting `maxTokens`. When `maxOutputTokens` is omitted, the provider adds
514
+ `budgetTokens` to the default of `4096`.
515
+
511
516
  See [AI SDK UI: Chatbot](/docs/ai-sdk-ui/chatbot#reasoning) for more details
512
517
  on how to integrate reasoning into your chatbot.
513
518
 
@@ -1593,6 +1598,11 @@ console.log(reasoning); // reasoning details including redacted reasoning
1593
1598
  console.log(text); // text response
1594
1599
  ```
1595
1600
 
1601
+ Anthropic's `max_tokens` limit includes both thinking and final text. To reserve
1602
+ room for both, the provider adds `budgetTokens` to `maxOutputTokens` when
1603
+ setting `max_tokens`. For known models, the combined value is capped at the
1604
+ model's maximum output token limit.
1605
+
1596
1606
  See [AI SDK UI: Chatbot](/docs/ai-sdk-ui/chatbot#reasoning) for more details
1597
1607
  on how to integrate reasoning into your chatbot.
1598
1608
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/amazon-bedrock",
3
- "version": "5.0.38",
3
+ "version": "5.0.39",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -44,10 +44,10 @@
44
44
  "@smithy/eventstream-codec": "^4.3.3",
45
45
  "@smithy/util-utf8": "^4.3.3",
46
46
  "aws4fetch": "^1.0.20",
47
- "@ai-sdk/anthropic": "4.0.25",
48
- "@ai-sdk/openai": "4.0.25",
47
+ "@ai-sdk/anthropic": "4.0.26",
48
+ "@ai-sdk/openai": "4.0.26",
49
49
  "@ai-sdk/provider": "4.0.4",
50
- "@ai-sdk/provider-utils": "5.0.16"
50
+ "@ai-sdk/provider-utils": "5.0.17"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "22.19.19",