feat(ai-sdk): add AI SDK v6 / @ai-sdk/provider v3 peer dependency support#340
Open
matingathani wants to merge 1 commit intostripe:mainfrom
Open
feat(ai-sdk): add AI SDK v6 / @ai-sdk/provider v3 peer dependency support#340matingathani wants to merge 1 commit intostripe:mainfrom
matingathani wants to merge 1 commit intostripe:mainfrom
Conversation
…tripe#296) Users on ai@6.x receive a peer dependency conflict when installing @stripe/ai-sdk because the package only declared compatibility up to ai@^5.0.0 and provider packages up to v2. The implementation code already targets @ai-sdk/provider@^3 (LanguageModelV3, StripeLanguageModelV3, AISDKWrapperV3) so the only change needed is updating the peerDependencies ranges in package.json: ai: "^3.4.7 || ^4.0.0 || ^5.0.0 || ^6.0.0" @ai-sdk/anthropic: "^2.0.41 || ^3.0.0" @ai-sdk/google: "^2.0.27 || ^3.0.0" @ai-sdk/openai: "^2.0.59 || ^3.0.0" Fixes stripe#296
There was a problem hiding this comment.
Pull request overview
This PR updates @stripe/ai-sdk’s npm peer dependency ranges to explicitly declare compatibility with Vercel AI SDK ai@6 and AI SDK provider packages @ai-sdk/*@3, aligning the published metadata with already-existing implementation support.
Changes:
- Expand
aipeer dependency range to include^6.0.0. - Expand
@ai-sdk/anthropic,@ai-sdk/google, and@ai-sdk/openaipeer dependency ranges to include^3.0.0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #296
Users running
ai@6.x(e.g.6.0.84,6.0.101) cannot install@stripe/ai-sdkcleanly because the package only declares peer dependency compatibility up toai@^5.0.0, and provider packages (@ai-sdk/anthropic,@ai-sdk/google,@ai-sdk/openai) only up to^2.x:This forces users into unsafe casts or manual
--legacy-peer-depsoverrides to adopt the package.Root Cause
The
peerDependenciesranges inllm/ai-sdk/package.jsonwere not updated when v6 / provider v3 support was added to the implementation.What Was Already Working
The implementation code already fully supports
@ai-sdk/provider@^3:stripe-language-model-v3.tsimplementsLanguageModelV3wrapperV3.tswrapsLanguageModelV3modelsstripe-provider.tsexportscreateStripeV3()/stripeV3usingProviderV3package.jsonalready has"@ai-sdk/provider": "^3.0.0"as a dependencyThe only gap was the peer dependency metadata advertised to npm.
Fix
Updated
peerDependenciesinllm/ai-sdk/package.json:ai^3.4.7 || ^4.0.0 || ^5.0.0^3.4.7 || ^4.0.0 || ^5.0.0 || ^6.0.0@ai-sdk/anthropic^2.0.41^2.0.41 || ^3.0.0@ai-sdk/google^2.0.27^2.0.27 || ^3.0.0@ai-sdk/openai^2.0.59^2.0.59 || ^3.0.0No implementation code changes required.
Testing
ai@6.xcan now install without peer dependency warnings or--legacy-peer-deps.