Repository navigation
fix(core): install AI SDK v6 providers by default - #53287
Merged
Merged
Conversation
3 of 6 tasks
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.
Refs #50960
What
The AI SDK bridge only supports AI SDK v6 providers (the
LanguageModelV3interface). Official@ai-sdk/*packages now publish AI SDK v7 under npmlatestand keep the v6 line under theai-v6dist-tag, so an unversionedaisdk:@ai-sdk/<name>silently installed a v7 provider.The v7 providers expect a different prompt format. In #50960,
@ai-sdk/openai-compatible@3.xreadspart.data.typeon a v6-shaped file part, matches no case, and serializes the image asnull, which breaks the session on every later turn.loadSDKFactorynow installs an unversioned official package (@ai-sdk/<name>with no version, range, or tag) from@ai-sdk/<name>@ai-v6. Explicit specs, non-@ai-sdkpackages, andfile://packages are unchanged.This doesn't add AI SDK v7 support or any spec-version gate.
Verification
@ai-sdk/*provider package in the AI SDK repo has anai-v6tag that depends on@ai-sdk/provider3.x.npmpackage in models.dev, at both provider and model level. Native routes or bundled plugins handle all official@ai-sdk/*packages there, so none reachloadSDKFactory. The rewrite applies only to user-configuredaisdk:@ai-sdk/<name>packages that have no native mapping.loadSDKFactoryin an isolated cache.@ai-sdk/openai-compatible,@ai-sdk/deepseek, and@ai-sdk/fireworksresolved to theirai-v6versions, and each reportedspecificationVersion: "v3". Third-party models.dev packages still install as written.bun test test/plugin/provider-dynamic.test.tsandbun typecheckinpackages/corepass.Requested by: @rekram1-node (Aiden Cline via Slack)