Packages

@ai-sdk/provider

4.0.39 · 17 Nov 2026Apache-2.0107.4M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.0

major25 Jun 2026Where it was published

4.0.39 is the newest release of 4.x.

In short

10 breaking4 new7 fixed2 internal

  • Breaking

    provider: Add support for reasoning-file type for files that are part of reasoning

  • Breaking

    provider: Adding new 'custom' content type

  • Breaking

    ai: Add support for uploading provider skills using the provider references abstraction

  • Breaking

    Remove CommonJS exports from all packages. All packages are now ESM-only ("type": "module"). Consumers using require() must switch to ESM import syntax.

  • Breaking

    provider: Add support for provider references and uploading files as supported per provider

  • Breaking

    provider: Add new top-level reasoning parameter to spec and support it in generateText and streamText

  • Breaking

    provider: Change file part data property to be tagged with a type and remove the image part type

  • Breaking

    Start v7 pre-release

Release note

Major Changes

  • Breaking

    provider: Add support for reasoning-file type for files that are part of reasoning

  • Breaking

    provider: Adding new 'custom' content type

  • Breaking

    ai: Add support for uploading provider skills using the provider references abstraction

  • Breaking

    Remove CommonJS exports from all packages. All packages are now ESM-only ("type": "module"). Consumers using require() must switch to ESM import syntax.

  • Breaking

    provider: Add support for provider references and uploading files as supported per provider

  • Breaking

    provider: Add new top-level reasoning parameter to spec and support it in generateText and streamText

  • Breaking

    provider: Change file part data property to be tagged with a type and remove the image part type

  • Breaking

    Start v7 pre-release

  • Breaking

    provider: Align tool result output content file part types with top-level message file part types

Patch Changes

  • ai: Force template check on 'kind' param

  • provider: Fix v4 spec to not use shared v3 types

  • Trigger release for all packages after provenance setup

  • openai-compatible: Emit warning when using kebab-case instead of camelCase

  • Breaking

    Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.

  • Trigger initial canary release

  • provider: Preserve error type prefix in getErrorMessage

  • provider: Add experimental Realtime API support for voice conversations

    Adds first-class support for realtime (speech-to-speech) APIs:

    • Experimental_RealtimeModelV4 spec in @ai-sdk/provider with normalized event types and factory

    • OpenAI, Google, and xAI realtime provider implementations

    • openai.experimental_realtime() / google.experimental_realtime() / xai.experimental_realtime() work in both server and browser

    • .getToken() static method on each provider for server-side ephemeral token creation

    • experimental_getRealtimeToolDefinitions helper for provider session tool definitions

    • experimental_useRealtime hook in @ai-sdk/react returning UIMessage (aligned with useChat), with onToolCall and addToolOutput for client-driven tool execution

    • inputAudioTranscription session config for showing transcribed user audio messages when supported by the provider

  • ai: Allow passing provider instance to uploadFile and uploadSkill as shorthand

  • Trigger initial beta release

  • Feat (video): add first-class generateAudio call option

  • Roll image-* tool output types into their equivalent file-* types

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.