Skip to content

Conversation

@agcty
Copy link

@agcty agcty commented Dec 6, 2025

Summary

  • Move @ai-sdk/provider and @ai-sdk/provider-utils from dependencies to peerDependencies in both workers-ai-provider and ai-gateway-provider
  • Move ai to peerDependencies in ai-gateway-provider with support for both v5 and v6

Motivation

Users who have a different version of the AI SDK installed (e.g., v6) end up with duplicate packages, potential type conflicts, and increased bundle size. Converting to peer dependencies allows users to control the version and avoids duplication.

Fixes #314

🤖 Generated with Claude Code

Move @ai-sdk/provider and @ai-sdk/provider-utils from dependencies to
peerDependencies in both workers-ai-provider and ai-gateway-provider.
Also move ai to peerDependencies in ai-gateway-provider with support
for both v5 and v6.

This allows users to control the version and avoids duplicate packages
when these providers are used alongside the AI SDK.

Fixes cloudflare#314

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@agcty agcty requested a review from G4brym as a code owner December 6, 2025 09:59
@changeset-bot
Copy link

changeset-bot bot commented Dec 6, 2025

🦋 Changeset detected

Latest commit: 2866537

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
ai-gateway-provider Patch
workers-ai-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 9, 2025

Open in StackBlitz

npx https://pkg.pr.new/cloudflare/ai/ai-gateway-provider@315
npx https://pkg.pr.new/cloudflare/ai/workers-ai-provider@315

commit: 2866537

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert AI SDK dependencies to peer dependencies

2 participants