Skip to content

fix(core): install AI SDK v6 providers by default - #53287

Merged
rekram1-node merged 2 commits into
v2from
aisdk-v6-only
Oct 5, 2026
Merged

rekram1-node merged 2 commits into
v2from
aisdk-v6-only

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Refs #50960

What

The AI SDK bridge only supports AI SDK v6 providers (the LanguageModelV3 interface). Official @ai-sdk/* packages now publish AI SDK v7 under npm latest and keep the v6 line under the ai-v6 dist-tag, so an unversioned aisdk:@ai-sdk/<name> silently installed a v7 provider.

The v7 providers expect a different prompt format. In #50960, @ai-sdk/openai-compatible@3.x reads part.data.type on a v6-shaped file part, matches no case, and serializes the image as null, which breaks the session on every later turn.

loadSDKFactory now installs an unversioned official package (@ai-sdk/<name> with no version, range, or tag) from @ai-sdk/<name>@ai-v6. Explicit specs, non-@ai-sdk packages, and file:// packages are unchanged.

This doesn't add AI SDK v7 support or any spec-version gate.

Verification

  • Every official @ai-sdk/* provider package in the AI SDK repo has an ai-v6 tag that depends on @ai-sdk/provider 3.x.
  • I checked every npm package in models.dev, at both provider and model level. Native routes or bundled plugins handle all official @ai-sdk/* packages there, so none reach loadSDKFactory. The rewrite applies only to user-configured aisdk:@ai-sdk/<name> packages that have no native mapping.
  • I ran real installs through loadSDKFactory in an isolated cache. @ai-sdk/openai-compatible, @ai-sdk/deepseek, and @ai-sdk/fireworks resolved to their ai-v6 versions, and each reported specificationVersion: "v3". Third-party models.dev packages still install as written.
  • bun test test/plugin/provider-dynamic.test.ts and bun typecheck in packages/core pass.

Requested by: @rekram1-node (Aiden Cline via Slack)

@rekram1-node
rekram1-node merged commit fa99202 into v2 Oct 5, 2026
9 of 11 checks passed
@rekram1-node
rekram1-node deleted the aisdk-v6-only branch October 5, 2026 22:42
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.

1 participant