@ai-sdk/react
The React adapter layer of the Vercel AI SDK, providing hooks such as useChat and useCompletion to help developers build streaming conversation and AI completion interactions in React and Next.js applications.
Core Facts
Vercel AI SDK uses the changesets tool to manage version changes, and each patch to the core ai package is automatically propagated to all adapter layers such as @ai-sdk/svelte, @ai-sdk/react, and @ai-sdk/vue.
The 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.
Within the AI SDK ecosystem, there exists an adapter package @ai-sdk/zod similar to @ai-sdk/valibot, with both providing the same public interface.
Timeline (last 90 days)
For production environments, it is recommended to carefully evaluate the actual benefit of each upgrade in conjunction with the changelog, and to establish a reasonable dependency management strategy.
The ai core package has entered the 7.x stage, while the React adapter layer remains at 4.x.
@ai-sdk/react released version 4.0.139, which is a patch-level (Patch Changes) update.
React developers use @ai-sdk/react, while Vue developers depend on @ai-sdk/vue.
The React adapter package uses version 2.0.x and the core package ai uses version 5.0.x; the two are managed independently under semantic versioning and remain linked through the dependency relationship.
Both useChat and useCompletion support specifying a custom backend route via the api parameter, where the backend calls the model provider API, thereby avoiding exposure of keys on the frontend.
@ai-sdk/react released version 3.0.300.
Upgrading to 3.0.300 generally requires no modifications to existing code; the main benefit is obtaining stability improvements and potential bug fixes brought by the underlying core package.
@ai-sdk/react serves as the upper-level React binding layer, and its behavioral changes are driven by the underlying ai core package.
The dependency updates in version 3.0.300 ultimately point to the synchronization with the core package [email protected].
16 more timeline events
All Facts (20)
Vercel AI SDK uses the changesets tool to manage version changes, and each patch to the core ai package is automatically propagated to all adapter layers such as @ai-sdk/svelte, @ai-sdk/react, and @ai-sdk/vue.
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%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%Verified@ai-sdk/react released version 3.0.300.
75%UnverifiedFramework adaptation layers such as @ai-sdk/vue and @ai-sdk/react wrap core capabilities into the corresponding framework's composable APIs.
70%UnverifiedFor production environments, it is recommended to carefully evaluate the actual benefit of each upgrade in conjunction with the changelog, and to establish a reasonable dependency management strategy.
50%UnverifiedThe ai core package has entered the 7.x stage, while the React adapter layer remains at 4.x.
50%UnverifiedReact developers use @ai-sdk/react, while Vue developers depend on @ai-sdk/vue.
50%UnverifiedThe React adapter package uses version 2.0.x and the core package ai uses version 5.0.x; the two are managed independently under semantic versioning and remain linked through the dependency relationship.
50%UnverifiedBoth useChat and useCompletion support specifying a custom backend route via the api parameter, where the backend calls the model provider API, thereby avoiding exposure of keys on the frontend.
50%UnverifiedUpgrading to 3.0.300 generally requires no modifications to existing code; the main benefit is obtaining stability improvements and potential bug fixes brought by the underlying core package.
50%UnverifiedVersion 3.0.300 is a patch release whose main content is a series of dependency synchronization updates, rather than the introduction of new features or breaking changes.
50%UnverifiedThe dependency updates in version 3.0.300 ultimately point to the synchronization with the core package [email protected].
50%Unverified@ai-sdk/react serves as the upper-level React binding layer, and its behavioral changes are driven by the underlying ai core package.
50%Unverified@ai-sdk/svelte, @ai-sdk/react, @ai-sdk/vue, and others are adapter layer packages targeting different front-end frameworks.
50%UnverifiedThe core capabilities of @ai-sdk/vue are exposed in the form of Vue Composables, such as hooks like useChat and useCompletion, which are functionally symmetric with @ai-sdk/react.
50%Unverified@ai-sdk/react is the official adapter package for the React ecosystem, encapsulating Hooks such as useChat and useCompletion.
50%Unverified@ai-sdk/react's streaming response handling is based on the Web Streams API, enabling text generated by the model to be rendered character by character in real time on the interface.
50%UnverifiedWhen the core package ai publishes a patch, CI/CD automatically triggers all framework adapter packages that depend on it (@ai-sdk/react, @ai-sdk/svelte, @ai-sdk/vue, etc.) to simultaneously publish the same patch-level version, even if the adapter packages themselves have no code changes.
50%