Packages

ai

7.0.176 · 17 Nov 2026Apache-2.048.6M / weekRepositoryHomepagenpmAtom feed

Your version

6.0.0

major22 Dec 2025Where it was published

6.0.333 is the newest release of 6.x.

In short

1 breaking1 deprecated67 new37 fixed29 internal

  • Breaking

    Ai SDK 6 beta

  • Deprecated

    ai: Deprecate generateObject and streamObject

Release note

Major Changes

  • Breaking

    Ai SDK 6 beta

Patch Changes

  • provider: Add specificationVersion to ProviderV3

  • ai: Do not drop custom headers in HttpChatTransport

  • agent: Change output generics

  • provider: Shared spec v3

  • anthropic: Add programmatic tool calling

  • agent: Configurable call options

  • provider: Speech model v3 spec

  • ai: Add Output.json()

  • Fixes an issue where providerMetadata and providerExecuted were lost when tool input validation failed

  • Improve ai gateway error message when api key is not present

  • ui: Add isDataUIPart helper

  • Tool input examples

  • feat(openai); update spec for mcp approval

  • This release introduces wrapEmbeddingModel, a new helper that brings embedding model customization capabilities similar to wrapLanguageModel.

  • gateway: Throw error with user-friendly message in non-production environments if AI_GATEWAY_API_KEY is not configured

  • ai: chat.addToolResult() is now chat.addToolOutput()

  • ai: Mcp errors to be jsonrpc 2.0 compliant

  • ai: onFinish callback for generateText

  • ai: Correct type field in arrayOutputStrategy from 'enum' to 'array'

  • openai: Allow custom names for provider-defined tools

  • agent: Export AgentCallParameters and AgentStreamParameters types

  • ai: Add OAuth for MCP clients + refactor to new package

    This change replaces

    import { experimental_createMCPClient } from 'ai';
    import { Experimental_StdioMCPTransport } from 'ai/mcp-stdio';

    with

    import { experimental_createMCPClient } from '@ai-sdk/mcp';
    import { Experimental_StdioMCPTransport } from '@ai-sdk/mcp/mcp-stdio';
  • agent: Use tool.toModelOutput when available

  • ai: Add missing export for LoadSettingError

  • ui: Do not submit automatically when server return with error

  • Deprecated

    ai: Deprecate generateObject and streamObject

  • EmbeddingModelV3

  • agent: Support UIMessageStreamOptions in createAgentStreamResponse

  • https://v6.ai-sdk.dev -> https://ai-sdk.dev

  • Export parseJsonEventStream and uiMessageChunkSchema from "ai" package

  • ai: Only parse experimental_output in generateText when finishReason is stop

  • ai: Add convertDataPart option to convertToModelMessages

    Add optional convertDataPart callback for converting custom data parts (URLs, code files, etc.) to text or file parts that models can process. Fully type-safe using existing UIMessage generics.

  • ai: Update uiMessageChunkSchema to satisfy the UIMessageChunk type

  • ai: Stable structured output on generateText, streamText, and ToolLoopAgent

  • ai: Tool.needsApproval can be a function

  • agent: Support context in onFinish callback

  • Tool execution approval

  • Move DelayedPromise into provider utils

  • Provider-V3

  • ai: Output.text() is default output mode

  • ai: Support SystemModelMessage in system and instructions properties

  • Extended token usage

  • Added a title to the tools

  • Fixed docs and exported NoSpeechGeneratedError

  • ai: Add support for v2 specs in transcription and speech models

  • Added experimental_rerank support

  • Tool execution approval for dynamic tools

  • Fix header loss when statusText is undefined in writeHead

  • core: Fix image download behavior when the initial model is swapped out during prepareStep

  • ai: Handle backpressure in writeToServerResponse

  • agent: Support experimental stream transforms

  • Support async Tool.toModelOutput

  • Extend addToolResult to support error results

  • ai: Send context into streamText / generateText onFinish callbacks

  • ai: Back version support for V2 providers

  • ai: Move Agent to stable

  • Fix not catching of empty arrays in validateUIMessage

  • agent: Add optional name property to agent

  • ai: Add Output.array()

  • ai: Add Output.choice()

  • LanguageModelV3

  • ai: Improve warnings with provider and model id

  • ai: Remove outdated jsdoc param descriptions

  • agent: Move provider options to main agent config

  • agent: Support abortSignal in createAgentUIStream

  • ai: Do not mutate middleware array argument when wrapping

  • Expose usage tokens for 'generateImage' function

  • ai: Add onFinish to Agent

  • google: Add thought signature to gemini 3 pro image parts

  • Image editing

  • Export GatewayModelId and use to type LanguageModel

  • Add toolCallId arg to toModelOutput

  • provider/google: Preserve thoughtSignature through tool execution

  • agent: Do not allow static tools when tools is empty

  • Added schema name and description for generateText and output

  • Add safeValidateUIMessages utility to validate UI messages without throwing, returning a success/failure result object like Zod’s safeParse

  • agent: Add message metadata support when inferring UI messages

  • ai: Bind functions for v2 -> v3 adapter

  • Add experimental_context parameter to prepareStep callback

  • ai: Add output to StreamTextResult

  • Added finishReason on useChat onFinish callbck

  • provider/gateway: Add support for image models

  • agent: Add abortSignal parameter to generate and stream

  • ai: Add pruneMessages helper function

  • provider-executed dynamic tools

  • ai: Align logic of text-end with reasoning-end

  • ai: Set default stopWhen on Agent to stepCountIs(20)

  • agent: Add experimental_download to ToolLoopAgent

  • agent: Introduce version property

  • ai: Print model warnings in embed and embedMany

  • ai: Download files when intermediate file cannot be downloaded

  • provider: Transcription model v3 spec

  • Add middleware for tool input examples

  • ai: Remove unused mode setting from generateObject and streamObject

  • ImageModelV3

  • ui: Don't resend messages for providerExecuted tools in lastAssistantMessageIsCompleteWithToolCalls and lastAssistantMessageIsCompleteWithApprovalResponses

  • ai: Allow modifying experimental context in prepareStep

  • ai: Prune messages properly when toolCalls set to 'before-last-message'

  • Standard JSON Schema support

  • agent: Extract createAgentUIStream, add pipeAgentUIStreamToResponse

  • Flexible tool output content support

  • Expose raw finish reason

  • Add support for v2 specs

  • Moved dependency @ai-sdk/test-server to devDependencies

  • ai: Support SystemModelMessage in system and instructions properties

  • tool-specific strict mode

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.