Skip to content

Conversation

@agcty
Copy link
Contributor

@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
  • All peer dependencies now require AI SDK v6+ (@ai-sdk/provider: ^3.0.0, @ai-sdk/provider-utils: ^4.0.0, ai: ^6.0.0)

Motivation

Users who have the AI SDK installed 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

@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: 5ee3b4d

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: 5ee3b4d

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 force-pushed the peer-dependencies branch from 680e9ed to e799f12 Compare December 23, 2025 07:33
@agcty
Copy link
Contributor Author

agcty commented Dec 23, 2025

@threepointone rebased the PR

@threepointone
Copy link
Collaborator

I'll try landing this today

@threepointone threepointone merged commit d3d35e7 into cloudflare:main Dec 23, 2025
3 checks passed
@github-actions github-actions bot mentioned this pull request Dec 23, 2025
@threepointone
Copy link
Collaborator

released in 3.0.1, thanks!

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