@ai-sdk/openai 3.0.99 → 3.0.101
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 +15 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +1 -1
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/chat/convert-openai-chat-usage.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ai-sdk/openai
|
|
2
2
|
|
|
3
|
+
## 3.0.101
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 313a441: Prevent negative text output token counts when providers report reasoning tokens. Perplexity reasoning tokens are now treated as separate from completion tokens.
|
|
8
|
+
- Updated dependencies [5642849]
|
|
9
|
+
- @ai-sdk/provider-utils@4.0.48
|
|
10
|
+
|
|
11
|
+
## 3.0.100
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [2d172fb]
|
|
16
|
+
- @ai-sdk/provider-utils@4.0.47
|
|
17
|
+
|
|
3
18
|
## 3.0.99
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -244,7 +244,7 @@ function convertOpenAIChatUsage(usage) {
|
|
|
244
244
|
},
|
|
245
245
|
outputTokens: {
|
|
246
246
|
total: completionTokens,
|
|
247
|
-
text: completionTokens - reasoningTokens,
|
|
247
|
+
text: Math.max(0, completionTokens - reasoningTokens),
|
|
248
248
|
reasoning: reasoningTokens
|
|
249
249
|
},
|
|
250
250
|
raw: usage
|
|
@@ -7817,7 +7817,7 @@ var OpenAITranscriptionModel = class {
|
|
|
7817
7817
|
};
|
|
7818
7818
|
|
|
7819
7819
|
// src/version.ts
|
|
7820
|
-
var VERSION = true ? "3.0.
|
|
7820
|
+
var VERSION = true ? "3.0.101" : "0.0.0-test";
|
|
7821
7821
|
|
|
7822
7822
|
// src/openai-provider.ts
|
|
7823
7823
|
function createOpenAI(options = {}) {
|