← AI PulseAug 9, 2026

Wire · analysis · Single-source brief

Vercel AI SDK Updates OpenAI-Compatible Provider for Token Handling

Vercel has released a patch for its @ai-sdk/openai-compatible package, version 3.0.28, to address how output tokens are reported when reasoning tokens exceed total completion tokens.

By Illumora Editorial

Source · Aug 9, 2026, 6:03 PM · On Illumora · Aug 9, 2026, 6:08 PM

Media from the primary source — shown here so you can stay on Illumora.

Rewritten from one allowlisted primary — not independent enterprise reporting. Lanes →

Brief drafted by Illumora’s editorial model from the linked primary source. Ops desk reviews flagged pieces. How we write →

Read the source →Vercel AI SDK Changelog — Release @ai-sdk/openai-compatible@3.0.28 · vercel/ai
Save

Vercel's AI SDK, specifically the @ai-sdk/openai-compatible package, received an update to version 3.0.28 on August 9.

This patch addresses a specific scenario in which a provider might report completion_tokens_details.reasoning_tokens as greater than completion_tokens. This situation was observed with Baseten when serving reasoning models that reached a length stop during the reasoning phase.

Key Points

  • The @ai-sdk/openai-compatible package was updated to version 3.0.28.
  • The release occurred on August 9.
  • The update fixes an issue where outputTokens.text could be negative.
  • This occurs when completion_tokens_details.reasoning_tokens exceeds completion_tokens.
  • The fix clamps outputTokens.text at 0.
  • Baseten serving reasoning models was identified as a context where this issue appeared.
  • Total and reasoning token counts remain as reported by the provider.

Context

According to Vercel, the patch ensures that the text share of completion tokens is never reported as a negative value. The issue arose when certain providers, such as Baseten, reported reasoning_tokens that surpassed the completion_tokens total, particularly when models hit a length stop mid-reasoning.

Why It Matters

This update ensures consistent and accurate token reporting within the Vercel AI SDK, preventing potential miscalculations or errors in applications that rely on precise token usage metrics. Builders can expect more robust handling of token details, especially when integrating with diverse reasoning models.

What To Do

  • Developers using the Vercel AI SDK should update their @ai-sdk/openai-compatible package to version 3.0.28.
  • Review applications that process outputTokens.text to ensure they account for the new clamping behavior.
  • Note that total and reasoning token counts are still reported directly from the provider.
  • If using Baseten or similar reasoning model providers, observe how this patch affects token reporting in your specific use cases.