Skip to content

fix(js/plugins/vercel-ai): drop misleading @ai-sdk/react peer dependency#5732

Open
ATKasem wants to merge 1 commit into
genkit-ai:mainfrom
ATKasem:fix/vercel-ai-drop-react-peer
Open

fix(js/plugins/vercel-ai): drop misleading @ai-sdk/react peer dependency#5732
ATKasem wants to merge 1 commit into
genkit-ai:mainfrom
ATKasem:fix/vercel-ai-drop-react-peer

Conversation

@ATKasem

@ATKasem ATKasem commented Jul 14, 2026

Copy link
Copy Markdown

Summary

@genkit-ai/vercel-ai declares @ai-sdk/react as an (optional) peer dependency, which implies React-only support. But GenkitChatTransport (from @genkit-ai/vercel-ai/client) implements the framework-agnostic ChatTransport from the ai core package and works with any Vercel AI SDK UI binding — Vue, Svelte, Angular, or none.

The package's shipped source imports only from ai:

// js/plugins/vercel-ai/src/client.ts
import type { ChatTransport, UIMessage, UIMessageChunk } from 'ai';

@ai-sdk/react appears only inside a JSDoc @example comment, never as a runtime import. This removes it from peerDependencies and peerDependenciesMeta so the metadata reflects the actual (binding-agnostic) dependency surface. It stays in devDependencies, which the package's own examples/tests use.

Fixes #5616
ISSUE: #5616

Verification

  • Confirmed no file under src/ imports @ai-sdk/react (only the JSDoc example references it).
  • package.json remains valid; @ai-sdk/react is retained as a devDependency.

GenkitChatTransport imports only from the framework-agnostic `ai` core
package; @ai-sdk/react appears only in a JSDoc example, not as a runtime
import. Declaring it as a peer dependency implies React-only support even
though the transport works with any Vercel AI SDK UI binding (Vue, Svelte,
Angular, or none). Remove it from peerDependencies/peerDependenciesMeta; it
stays in devDependencies for the package's own examples and tests.

ISSUE: genkit-ai#5616

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes @ai-sdk/react from the peerDependencies and peerDependenciesMeta sections of the js/plugins/vercel-ai/package.json file, while keeping it as a development dependency. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@genkit-ai/vercel-ai: peerDependenciesMeta lists only @ai-sdk/react, but GenkitChatTransport is binding-agnostic (Vue/Svelte/Angular)

1 participant