@ai-sdk/openai-compatible 2.0.65 → 2.0.67

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,21 @@
1
1
  # @ai-sdk/openai-compatible
2
2
 
3
+ ## 2.0.67
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [b2a4d5a]
8
+ - @ai-sdk/provider-utils@4.0.45
9
+
10
+ ## 2.0.66
11
+
12
+ ### Patch Changes
13
+
14
+ - de18066: fix(provider/openai-compatible): clamp `outputTokens.text` at 0 when a provider reports `completion_tokens_details.reasoning_tokens` greater than `completion_tokens` (observed with Baseten serving reasoning models that hit the length stop mid-reasoning). The text share of completion tokens can never be negative; `total` and `reasoning` remain as reported by the provider.
15
+ - Updated dependencies [2171d15]
16
+ - @ai-sdk/provider@3.0.15
17
+ - @ai-sdk/provider-utils@4.0.44
18
+
3
19
  ## 2.0.65
4
20
 
5
21
  ### Patch Changes
package/dist/index.js CHANGED
@@ -96,7 +96,7 @@ function convertOpenAICompatibleChatUsage(usage) {
96
96
  },
97
97
  outputTokens: {
98
98
  total: completionTokens,
99
- text: completionTokens - reasoningTokens,
99
+ text: Math.max(0, completionTokens - reasoningTokens),
100
100
  reasoning: reasoningTokens
101
101
  },
102
102
  raw: usage
@@ -1718,7 +1718,7 @@ async function fileToBlob(file) {
1718
1718
  var import_provider_utils6 = require("@ai-sdk/provider-utils");
1719
1719
 
1720
1720
  // src/version.ts
1721
- var VERSION = true ? "2.0.65" : "0.0.0-test";
1721
+ var VERSION = true ? "2.0.67" : "0.0.0-test";
1722
1722
 
1723
1723
  // src/openai-compatible-provider.ts
1724
1724
  function createOpenAICompatible(options) {