What's New
AI SDK v6 Support — Full ProviderV3 implementation with LanguageModelV3 and EmbeddingModelV3 interfaces.
Changes
- Migrate from
ProviderV2toProviderV3 - Migrate from
LanguageModelV2toLanguageModelV3 - Migrate from
EmbeddingModelV2toEmbeddingModelV3 - Update
specificationVersionto'v3' - Update usage structure to nested v6 format:
inputTokens: { total, noCache, cacheRead, cacheWrite } outputTokens: { total, text, reasoning } - Update all type imports (
SharedV2*→SharedV3*) - Fix
LanguageModelV3FinishReasonto return{ unified, raw }object format - Fix zod peer dependency (
^3.25.0 || ^4.0.0) - Add
file_idsupport for file content parts
Breaking Changes
- Requires
ai@^6.0.0(AI SDK v6) - Requires
zod@^3.25.0 || ^4.0.0
Migration
# Upgrade
npm install @openrouter/ai-sdk-provider@latest ai@^6.0.0
# For AI SDK v5, use the tagged version
npm install @openrouter/ai-sdk-provider@ai-sdk-v5Credits
Thanks to @pablof7z for the community contribution and @mattapperson for identifying the FinishReason type fix.
Full Changelog: #307
What's Changed
- Fix zod peer dependency by @robert-j-y in #324
- fix: make file content part fields optional and add file_id by @robert-j-y in #326
- feat: Add AI SDK v6 support by @pablof7z in #307
- Version Packages by @github-actions[bot] in #325
New Contributors
- @robert-j-y made their first contribution in #324
- @pablof7z made their first contribution in #307
Full Changelog: v1.5.4...2.0.0