@ai-sdk/openai 4.0.45 → 4.0.47

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.
@@ -261,7 +261,7 @@ function convertOpenAIChatUsage(usage) {
261
261
  },
262
262
  outputTokens: {
263
263
  total: completionTokens,
264
- text: completionTokens - reasoningTokens,
264
+ text: Math.max(0, completionTokens - reasoningTokens),
265
265
  reasoning: reasoningTokens
266
266
  },
267
267
  raw: usage