npm @openrouter/ai-sdk-provider 2.0.0
@openrouter/ai-sdk-provider@2.0.0

latest releases: 3.1.0, 3.0.0, 2.10.0...
10 months ago

What's New

AI SDK v6 Support — Full ProviderV3 implementation with LanguageModelV3 and EmbeddingModelV3 interfaces.

Changes

  • Migrate from ProviderV2 to ProviderV3
  • Migrate from LanguageModelV2 to LanguageModelV3
  • Migrate from EmbeddingModelV2 to EmbeddingModelV3
  • Update specificationVersion to 'v3'
  • Update usage structure to nested v6 format:
    inputTokens: { total, noCache, cacheRead, cacheWrite }
    outputTokens: { total, text, reasoning }
    
  • Update all type imports (SharedV2* → SharedV3*)
  • Fix LanguageModelV3FinishReason to return { unified, raw } object format
  • Fix zod peer dependency (^3.25.0 || ^4.0.0)
  • Add file_id support 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-v5

Credits

Thanks to @pablof7z for the community contribution and @mattapperson for identifying the FinishReason type fix.

Full Changelog: #307

What's Changed

New Contributors

Full Changelog: v1.5.4...2.0.0

Don't miss a new ai-sdk-provider release

NewReleases is sending notifications on new releases.