@ai-sdk/amazon-bedrock 4.0.12 → 4.0.13

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,11 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - e89fc99: Correct input token calculation logic
8
+
3
9
  ## 4.0.12
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -341,8 +341,8 @@ function convertBedrockUsage(usage) {
341
341
  const cacheWriteTokens = (_b = usage.cacheWriteInputTokens) != null ? _b : 0;
342
342
  return {
343
343
  inputTokens: {
344
- total: inputTokens,
345
- noCache: inputTokens - cacheReadTokens,
344
+ total: inputTokens + cacheReadTokens + cacheWriteTokens,
345
+ noCache: inputTokens,
346
346
  cacheRead: cacheReadTokens,
347
347
  cacheWrite: cacheWriteTokens
348
348
  },
@@ -1742,7 +1742,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1742
1742
  var import_aws4fetch = require("aws4fetch");
1743
1743
 
1744
1744
  // src/version.ts
1745
- var VERSION = true ? "4.0.12" : "0.0.0-test";
1745
+ var VERSION = true ? "4.0.13" : "0.0.0-test";
1746
1746
 
1747
1747
  // src/bedrock-sigv4-fetch.ts
1748
1748
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {