@ai-sdk/provider-utils
A utility library for providers within the Vercel AI SDK ecosystem. It supplies shared logic such as parameter validation, streaming response handling, and error normalization, reducing duplicated implementation across individual provider packages.
Core Facts
This release aligns the toolchain versions to [email protected], @ai-sdk/[email protected], and @ai-sdk/[email protected].
@ai-sdk/provider defines the standard interface, @ai-sdk/provider-utils provides common utility functions, and each specific vendor package implements its own adapter logic
@ai-sdk/[email protected] depends on the [email protected] core package.
Timeline (last 90 days)
The schema conversion, JSON parsing fault tolerance (for example, stripping Markdown code fences), and error wrapping logic provided by @ai-sdk/provider-utils are shared across all provider adapters, and its version changes may simultaneously affect the structured output behavior of multiple providers such as OpenAI, Anthropic, and Google
AI SDK insists that the three—the main package ai + framework adapter packages + provider-utils—have aligned minor versions, and only when the three versions match is the behavioral contract consistent.
Version 3.0.305 updates the dependency @ai-sdk/provider-utils to 4.0.58, corresponding to commit 604b4d3.
It is recommended to check the output of npm ls @ai-sdk/provider-utils to confirm there is no unexpected version splitting
When multiple provider packages in a project depend on different versions of provider-utils, npm may install multiple copies, leading to type mismatches or inconsistent runtime behavior
若项目中精确锁定(exact pin)了 provider 和 provider-utils 的版本,升级后需手动检查是否放开版本范围,否则可能出现依赖冲突。
面对纯依赖同步的补丁版本,使用 lockfile 严格锁定的项目可以按需升级,不必追赶每一个补丁号;使用范围版本号(如 ^3.0.0)的项目已自动拿到更新,需关注核心包行为是否变化。
4.0.138 版本同步更新了底层依赖,明确包含 [email protected] 与 @ai-sdk/[email protected]。
使用 @ai-sdk/xai 调用 Grok 模型的项目建议跟随升级,锁死旧版 provider-utils 的风险通常不在 xAI 调用本身,而在与其他 @ai-sdk/* 包共存时出现的依赖版本漂移。
@ai-sdk/xai 5.0.21 的价值在于使 @ai-sdk/xai 与生态内其他 Provider 保持在同一批依赖版本上,避免混用旧 provider-utils 带来的类型不兼容或流式行为差异。
40 more timeline events
All Facts (20)
This release aligns the toolchain versions to [email protected], @ai-sdk/[email protected], and @ai-sdk/[email protected].
90%Verified@ai-sdk/provider defines the standard interface, @ai-sdk/provider-utils provides common utility functions, and each specific vendor package implements its own adapter logic
90%Verified@ai-sdk/[email protected] depends on the [email protected] core package.
90%Verified@ai-sdk/[email protected] synchronously updated upstream dependencies: @ai-sdk/[email protected], @ai-sdk/[email protected], and @ai-sdk/[email protected].
90%Verified@ai-sdk/provider-utils is a companion utility library containing common logic such as stream parsing, error handling, and request retrying.
85%VerifiedThe @ai-sdk/provider package defines the core interface contracts that all providers must implement, including standardized definitions for capabilities such as text generation, streaming output, and tool calling.
85%VerifiedWithin the AI SDK ecosystem, there exists an adapter package @ai-sdk/zod similar to @ai-sdk/valibot, with both providing the same public interface.
80%Verified@ai-sdk/vue is the AI SDK's binding layer for the Vue framework, responsible for exposing the capabilities of the core ai package (such as streaming responses, message state management, and the useChat composable API) to Vue components.
80%VerifiedThis update upgrades the dependency ai to 7.0.102 and @ai-sdk/provider-utils to 5.0.41.
80%VerifiedThe core change in version 2.0.44 is following the upgrade of its underlying dependency @ai-sdk/provider-utils to version 5.0.44.
75%Verified@ai-sdk/provider defines the interface contracts that all providers must implement, while @ai-sdk/provider-utils provides reusable utility functions.
75%Partially Verified@ai-sdk/provider-utils, as the underlying shared utility package, is jointly depended upon by multiple upper-layer adapter packages such as @ai-sdk/valibot and @ai-sdk/zod.
90%UnverifiedSince provider-utils sits at the bottom of the dependency chain, once a new version is released, the upper-layer framework adapter packages (vue, react, svelte) often need to follow suit simultaneously.
70%Unverified@ai-sdk/provider-utils serves as an adapter layer that smooths out the API differences among vendors such as OpenAI, Anthropic, and Google Gemini, exposing a unified interface to the upper layers.
70%Unverified4.0.138 版本同步更新了底层依赖,明确包含 [email protected] 与 @ai-sdk/[email protected]。
70%UnverifiedThe schema conversion, JSON parsing fault tolerance (for example, stripping Markdown code fences), and error wrapping logic provided by @ai-sdk/provider-utils are shared across all provider adapters, and its version changes may simultaneously affect the structured output behavior of multiple providers such as OpenAI, Anthropic, and Google
50%UnverifiedAI SDK insists that the three—the main package ai + framework adapter packages + provider-utils—have aligned minor versions, and only when the three versions match is the behavioral contract consistent.
50%UnverifiedIt is recommended to check the output of npm ls @ai-sdk/provider-utils to confirm there is no unexpected version splitting
50%UnverifiedWhen multiple provider packages in a project depend on different versions of provider-utils, npm may install multiple copies, leading to type mismatches or inconsistent runtime behavior
50%Unverified若项目中精确锁定(exact pin)了 provider 和 provider-utils 的版本,升级后需手动检查是否放开版本范围,否则可能出现依赖冲突。
50%