@ai-sdk/provider
An abstract package in the Vercel AI SDK ecosystem that defines a unified interface for model providers. It specifies the standard method signatures that language models, embedding models, and others should implement, enabling upper-layer SDK code to call models from different vendors using the same codebase.
Core Facts
@ai-sdk/provider-utils is responsible for the general-purpose utility functions in the AI SDK for interacting with model providers, including low-level logic such as streaming response parsing, tool call formatting, and error handling.
@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/vue is the official adapter layer of the Vercel AI SDK for the Vue.js framework, providing Vue developers with a declarative API for integrating large language model capabilities, including scenarios such as streaming response handling, chat interface state management, and tool calling.
Timeline (last 90 days)
For projects using `@ai-sdk/typesafe-ai`, it is recommended to run the existing type checks and integration tests after upgrading to confirm that the compatibility of the provider interfaces has not drifted unexpectedly.
When upgrading, it is recommended to check whether provider and provider-utils are locked to old versions by other dependencies, and if necessary use the overrides or resolutions fields to unify the version, avoiding loading multiple copies of provider-utils within the same process.
When a provider's major version changes, custom providers or code that directly depends on underlying types may need adaptation.
Updates to @ai-sdk/provider and @ai-sdk/provider-utils usually include adjustments to the underlying protocol, optimizations of utility functions, or security patches.
@ai-sdk/vue released version 4.0.149.
Mixing old versions of @ai-sdk/provider or @ai-sdk/provider-utils across packages may cause inconsistent finish part parsing.
There is a strict dependency chain among the three packages: the adapter depends on openai-compatible, and openai-compatible in turn depends on provider and provider-utils.
In the npm ecosystem, @ai-sdk/voyage does not itself directly implement HTTP requests and parameter validation; instead it relies on the interface conventions provided by @ai-sdk/provider and the shared utilities provided by @ai-sdk/provider-utils.
If multiple copies of @ai-sdk/provider exist in a project at the same time, it may cause problems such as inconsistent type definitions, failed instanceof checks, or duplicate bundling.
To troubleshoot dependency version issues, you can use npm ls @ai-sdk/provider to inspect the dependency tree and use the package manager's overrides/resolutions fields to unify versions.
40 more timeline events
All Facts (20)
@ai-sdk/provider-utils is responsible for the general-purpose utility functions in the AI SDK for interacting with model providers, including low-level logic such as streaming response parsing, tool call formatting, and error handling.
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/vue is the official adapter layer of the Vercel AI SDK for the Vue.js framework, providing Vue developers with a declarative API for integrating large language model capabilities, including scenarios such as streaming response handling, chat interface state management, and tool calling.
90%VerifiedWhen upgrading @ai-sdk/voyage, it is recommended to simultaneously update @ai-sdk/provider and @ai-sdk/provider-utils to ensure dependency tree version alignment
90%Verified@ai-sdk/zai@3.0.8 synchronously updated upstream dependencies: @ai-sdk/provider@4.0.12, @ai-sdk/openai-compatible@3.0.46, and @ai-sdk/provider-utils@5.0.38.
90%VerifiedThe AI SDK adopts a Provider architecture in which each Provider package implements standardized interfaces such as LanguageModelV1, which is an engineering practice of the strategy pattern.
90%VerifiedVercel AI SDK provides unified abstract interfaces (such as generateText and streamText), allowing developers to maintain a consistent coding style when calling different model providers.
90%VerifiedThe Vercel AI SDK adopts a Monorepo single-repository management model, with the core package ai and various framework adapter packages (such as @ai-sdk/vue, @ai-sdk/react, and @ai-sdk/svelte) released in coordination.
90%VerifiedVercel AI SDK provides a unified abstraction layer for streaming responses, tool calling, and multi-model adaptation.
90%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%VerifiedBecause large model APIs iterate frequently, @ai-sdk/provider and @ai-sdk/provider-utils have a relatively high release cadence within the AI SDK toolchain.
80%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%VerifiedThe Vercel AI SDK's unified multi-vendor abstraction layer is implemented based on a Provider plugin mechanism, where each vendor adapter is responsible for converting that vendor's raw HTTP API into the SDK's internal standard LanguageModelV1 interface.
80%VerifiedThis update upgrades the dependency ai to 7.0.102 and @ai-sdk/provider-utils to 5.0.41.
80%VerifiedThe @ai-sdk/zai module depends on foundational modules such as provider, openai-compatible, and provider-utils.
80%VerifiedIf the versions of @ai-sdk/vue and ai in a project are not aligned, type mismatches or runtime behavior differences may occur.
75%VerifiedIn a monorepo structure, if adapter packages do not update their dependency declarations in sync, it may lead to two copies of provider-utils appearing in the dependency tree or to type definition mismatches.
75%Verified@ai-sdk/provider defines unified TypeScript interfaces such as LanguageModelV1 and EmbeddingModelV1, allowing upper-layer applications to remain unaware of the underlying vendor implementation details.
75%VerifiedWhen a foundational package such as @ai-sdk/provider-utils that is depended upon by multiple packages is updated, Changeset automatically marks the packages that depend on it for a patch version bump, which is why @ai-sdk/valibot publishes a new version even though its own code has not changed.
75%VerifiedIt is recommended to upgrade related @ai-sdk/* packages as a group, since provider-utils has been synchronized to 5.0.49.
75%