unstale

npm / @ai-sdk/alibaba

@ai-sdk/alibaba

What changed in @ai-sdk/alibaba 0.0 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

60 breaking20 deprecations20 new APIs and options2 performance12 behavior and defaults1 tooling15 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@ai-sdk/alibaba 762 changes

Breaking changes 38

  • OpenTelemetry span collection is no longer built into ai; install this package and register an OpenTelemetry instance globally to continue receiving traces.

    7.0.0upgrade guide

  • The deprecated top-level LanguageModelUsage field was removed; use inputTokenDetails.cacheReadTokens instead.

    7.0.0upgrade guide

  • All packages are ESM-only; consumers using require() must switch to ESM import syntax.

    2.0.0, 7.0.0release notesupgrade guide

  • Top-level result properties including content, tool calls and results, files, sources, and warnings now accumulate values across every step; use finalStep for final-step values.

    7.0.0upgrade guide

  • Tool callbacks now use stable, tool-specific context inferred from contextSchema and supplied through toolsContext, replacing experimental_context.

    7.0.0upgrade guide

  • The deprecated option has been removed; replace usages with activeTools.

    7.0.0upgrade guide

  • The deprecated export was removed; use customProvider instead. Its options and behavior are unchanged.

    7.0.0upgrade guide

  • The deprecated export was removed; use generateImage instead.

    7.0.0upgrade guide

  • The deprecated result type export was removed; use GenerateImageResult instead.

    7.0.0upgrade guide

  • Rename the generation start callback for generateText, streamText, and agents to onStart.

    7.0.0upgrade guide

  • Rename the per-step start callback for generateText, streamText, and agents to onStepStart.

    7.0.0upgrade guide

  • The deprecated structured-output call option was removed; use output instead.

    7.0.0upgrade guide

  • The deprecated generateText result property was removed; read result.output instead.

    7.0.0upgrade guide

  • The deprecated option was removed; use prepareStep instead.

    7.0.0upgrade guide

  • The tracer property was removed from experimental_telemetry; pass a custom OpenTelemetry Tracer to the OpenTelemetry constructor instead.

    7.0.0upgrade guide

  • generateText and streamText no longer include request bodies in step results by default; opt in with include.requestBody when your application reads them.

    7.0.0upgrade guide

  • generateText no longer includes response bodies by default; opt in with include.responseBody when your application reads them.

    7.0.0upgrade guide

  • The deprecated function has been removed; use isToolUIPart instead.

    7.0.0upgrade guide

  • The redirect option now defaults to error rather than follow, rejecting HTTP redirects by default to prevent SSRF; explicitly set follow if the MCP server relies on redirects.

    7.0.0upgrade guide

  • The deprecated tool-result content part type has been removed; use the file content part for inline tool-result files.

    7.0.0upgrade guide

  • The minimum supported Node.js version is 22; supported versions are 22, 24, and 26.

    2.0.0, 7.0.0release notesupgrade guide

  • streamText now calls onChunk for every TextStreamPart, including lifecycle, boundary, and terminal parts; handlers should guard the chunk types they process.

    7.0.0upgrade guide

  • Telemetry integrations and tracing-channel subscribers receive onEmbedEnd instead of onEmbedFinish.

    7.0.0upgrade guide

  • The per-call callback for completed embed and embedMany operations is named onEnd instead of experimental_onFinish.

    7.0.0upgrade guide

  • The per-call callback for completed rerank operations is named onEnd instead of experimental_onFinish.

    7.0.0upgrade guide

  • The callback event follows the updated multi-step result shape: usage and several result properties cover all steps, while final-step-only properties are available on finalStep.

    7.0.0upgrade guide

  • Telemetry integrations and tracing-channel subscribers receive onRerankEnd instead of onRerankFinish.

    7.0.0upgrade guide

  • The per-step lifecycle callback is named onStepEnd across text and object generation, agents, workflow agents, and UI message stream helpers; telemetry integrations should implement it.

    7.0.0upgrade guide

  • Instructions returned from prepareStep now carry forward to future steps until another instructions or system override is returned.

    7.0.0upgrade guide

  • Messages returned from prepareStep now become the base for subsequent steps, combined with response messages from the previous step.

    7.0.0upgrade guide

  • System messages in prompt or messages are rejected by default; move system instructions to instructions or opt in with allowSystemInMessages for trusted messages.

    7.0.0upgrade guide

  • The deprecated top-level LanguageModelUsage field was removed; use outputTokenDetails.reasoningTokens instead.

    7.0.0upgrade guide

  • Shared generation or agent runtime data is now separate from tool-specific context; use runtimeContext for shared state visible in prepareStep, events, and step results.

    7.0.0upgrade guide

  • Each StepResult now contains only response messages produced by that step; use result.responseMessages for the full response message history.

    7.0.0upgrade guide

  • Rename the tool-loop stop-condition helper to isStepCount.

    7.0.0upgrade guide

  • The deprecated type has been removed; replace imports and type references with ToolExecutionOptions.

    7.0.0upgrade guide

  • Pass tool-specific context through toolsContext keyed by tool name; when a tool declares contextSchema, toolsContext becomes required and includes only tools declaring contextual data.

    7.0.0upgrade guide

  • generateText and streamText usage now totals tokens across all steps; use finalStep.usage for final-step-only usage, and replace deprecated totalUsage with usage.

    7.0.0upgrade guide

Deprecations 13

  • CallSettings is split into LanguageModelCallOptions and RequestOptions; replace usages with LanguageModelCallOptions & Omit<RequestOptions, 'timeout'>. The deprecated type remains available.

    7.0.0upgrade guide

  • The result type is renamed to SpeechResult; the old name remains available as a deprecated alias.

    7.0.0upgrade guide

  • The result type is renamed to TranscriptionResult; the old name remains available as a deprecated alias.

    7.0.0upgrade guide

  • Tool-result file content now has a canonical file variant with tagged data and a required mediaType; legacy image-* and file-* variants are runtime-migrated but deprecated.

    7.0.0upgrade guide

  • Final-step reasoning, request, response, and provider metadata are accessed through finalStep; the top-level aliases are deprecated and remain available for incremental migration.

    7.0.0upgrade guide

  • The user-message image content part is deprecated; use a file part with an image mediaType instead.

    7.0.0upgrade guide

  • The tool() and dynamicTool() property is deprecated; move approval logic to toolApproval on the call or agent so approval policy can vary by request.

    7.0.0upgrade guide

  • The final lifecycle callback for generateText, streamText, and agents is named onEnd; onFinish remains a deprecated alias, and onEnd takes precedence when both are provided.

    7.0.0upgrade guide

  • This generateText and streamText callback replaces experimental_onToolCallFinish; the old name remains a deprecated fallback.

    7.0.0upgrade guide

  • This generateText and streamText callback replaces experimental_onToolCallStart; the old name remains a deprecated fallback.

    7.0.0upgrade guide

  • The full event stream returned by streamText is now exposed as stream; fullStream remains a deprecated alias.

    7.0.0upgrade guide

  • Use instructions for top-level prompts, prepareStep results, repair-tool-call options, and lifecycle callback fields. system remains a deprecated fallback, and instructions takes precedence when both are provided.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the stateless top-level helper to transform any stream.

    7.0.0upgrade guide

New APIs and options 5

  • Declare each tool's contextual fields with contextSchema so tool callback context is typed and limited to the fields that tool declares.

    7.0.0upgrade guide

  • Move streamText's raw-chunk option from the top-level includeRawChunks option into include.rawChunks; the old option remains a deprecated alias.

    7.0.0upgrade guide

  • Models can return files in reasoning under a distinct reasoning-file type; update exhaustive part handling to support it.

    7.0.0upgrade guide

  • The top-level option is the provider-agnostic way to control reasoning effort; overlapping providerOptions settings take precedence and can bypass it.

    7.0.0upgrade guide

  • Use toolApproval on a call or agent to configure per-tool approval, including a callback in place of needsApproval logic.

    7.0.0upgrade guide

Behavior and default changes 5

  • The speech generation function graduated from experimental status under the stable name generateSpeech; the old name remains as a deprecated alias.

    7.0.0upgrade guide

  • The stable include option replaces experimental_include for generateText, streamText, and ToolLoopAgent; the old name remains a deprecated alias.

    7.0.0upgrade guide

  • After a telemetry integration is registered, AI SDK calls emit telemetry events by default; set isEnabled to false on a call to opt out.

    7.0.0upgrade guide

  • The telemetry option replaces experimental_telemetry; the old name remains a deprecated alias during the migration window.

    7.0.0upgrade guide

  • The transcription API graduated from experimental status under the stable name transcribe; the old name remains as a deprecated alias.

    7.0.0upgrade guide

Tooling 1

  • Adds the migration skill to guide an agent through migrating from AI SDK v6 to v7.

    7.0.0upgrade guide

@ai-sdk/alibaba 629 changes

Breaking changes 15

  • The Azure provider now uses the Responses API by default; use azure.chat() to retain Chat Completions API behavior.

    6.0.0upgrade guide

  • For the Responses API, providerOptions uses azure instead of openai, and providerMetadata output uses azure.

    6.0.0upgrade guide

  • Now asynchronous to support async Tool.toModelOutput(); callers must await it.

    6.0.0upgrade guide

  • The deprecated CoreMessage type and related functions have been removed; use ModelMessage and convertToModelMessages.

    6.0.0upgrade guide

  • Provider textEmbeddingModel methods are renamed to embeddingModel; generics are also removed from EmbeddingModel, embed, and embedMany.

    6.0.0upgrade guide

  • Replaces getToolName for retrieving the name from static tool parts only.

    6.0.0upgrade guide

  • Replaces isToolUIPart for checking static tool UI parts.

    6.0.0upgrade guide

  • V2 mock classes have been removed from ai/test; use the V3 mock classes instead.

    6.0.0upgrade guide

  • Function tool definitions no longer accept a name property; function tool names come from keys in the tools object.

    6.0.0upgrade guide

  • OpenAI JSON outputs and tool calls now use strict schema mode by default; schemas may need adjustment or strict mode can be disabled.

    6.0.0upgrade guide

  • Removed from OpenAI chat models; use strictJsonSchema instead.

    6.0.0upgrade guide

  • Receives a parameter object containing an output property instead of receiving output directly.

    6.0.0upgrade guide

  • Replaces Experimental_Agent; the system parameter is now instructions, and stopWhen defaults to isStepCount(20).

    6.0.0upgrade guide

  • The unknown finish reason is removed and is now returned as other.

    6.0.0upgrade guide

  • Separate generation-function warning types are consolidated into a single type exported from the ai package.

    6.0.0upgrade guide

Deprecations 7

  • Deprecated in LanguageModelUsage; replace it with inputTokenDetails.cacheReadTokens.

    6.0.0upgrade guide

  • Deprecated in favor of generateText with an output setting for generating structured data.

    6.0.0upgrade guide

  • Now retrieves a tool name from static or dynamic tool parts; the former getToolOrDynamicToolName name is deprecated but remains available.

    6.0.0upgrade guide

  • Now checks for static or dynamic tool UI parts; the former isToolOrDynamicToolUIPart name is deprecated but remains available.

    6.0.0upgrade guide

  • Deprecated in LanguageModelUsage; replace it with outputTokenDetails.reasoningTokens.

    6.0.0upgrade guide

  • Deprecated in favor of streamText with an output setting for streaming structured data.

    6.0.0upgrade guide

  • Renamed to ToolExecutionOptions; the old type is now deprecated.

    6.0.0upgrade guide

New APIs and options 5

  • Set this environment variable to false to disable warning logging for deprecation warnings and best-practice recommendations.

    6.0.0upgrade guide

  • Tool strict mode is now set on each tool, enabling fine-grained control based on each tool's input schema.

    6.0.0upgrade guide

  • Anthropic structured outputs can use outputFormat, jsonTool, or auto, which selects native output format when supported and otherwise falls back to jsonTool.

    6.0.0upgrade guide

  • The state union adds approval-requested, approval-responded, and output-denied states; exhaustive state handling should cover them.

    6.0.0upgrade guide

  • The system parameter now accepts SystemModelMessage as well as string, allowing provider-specific options such as caching.

    6.0.0upgrade guide

Behavior and default changes 2

  • Tool output and result content support is more flexible, enabling richer tool interactions and complex tool execution patterns.

    6.0.0upgrade guide

  • The Google Vertex provider now uses vertex instead of google for providerOptions and providerMetadata; google remains supported for providerOptions input.

    6.0.0upgrade guide

@ai-sdk/alibaba 230 changes

Breaking changes 5

  • The experimental OpenAI Live method can now resolve asynchronously; await its result before using the connection settings.

    2.0.80release notes

  • Top-level reasoning values map to the closest supported model level, rounding down when possible; unsupported none values map to the model's minimum level with a compatibility warning.

    2.0.79release notes

  • Reasoning is now placed before text in doGenerate.

    2.0.71release notes

  • Reasoning is preserved in multi-turn requests by default on supported models.

    2.0.49release notes

  • File part data is now tagged with a type, and the image part type is removed.

    2.0.0release notes

New APIs and options 9

  • Adds max as a portable reasoning level, widening LanguageModelV4CallOptions['reasoning'] and the derived ReasoningLevel type.

    2.0.62release notes

  • Adds support for wan3 all-in-one video generation.

    1.0.50, 2.0.35release notesrelease notes

  • Adds embedding model support for Alibaba.

    2.0.0release notes

  • File uploads are supported according to provider capabilities.

    2.0.0release notes

  • Adds a first-class generateAudio call option.

    2.0.0release notes

  • The provider adds support for provider references.

    2.0.0release notes

  • Adds the qwen3.7-max model ID to Alibaba and AI Gateway.

    2.0.0release notes

  • Providers now support a new top-level reasoning parameter.

    2.0.0release notes

  • Provider model classes can cross workflow step boundaries without serialization errors through WORKFLOW_SERIALIZE and WORKFLOW_DESERIALIZE static methods.

    2.0.0release notes

Performance 1

  • Provider validation schemas are constructed on first use instead of at import time, reducing package import time.

    2.0.73release notes

Behavior and default changes 5

  • Autocomplete suggestions are derived from each provider’s model catalog declarations, so catalog updates are reflected while existing suggestions, endpoint-specific lists, and custom model IDs remain supported.

    2.0.91release notes

  • These settings now support promises and synchronous or asynchronous callbacks, resolving credentials per authenticated request while preserving existing authentication behavior and synchronous credential serialization.

    2.0.80release notes

  • Wan video requests use the Wan 2.7 wire format for later Wan 2 minors; future majors and unknown IDs use the current all-in-one media protocol instead of legacy size and reference fields.

    1.0.63, 2.0.66release notesrelease notes

  • Top-level embedding dimensions are mapped to provider settings.

    2.0.65release notes

  • headers is optional in provider config types, allowing manually constructed model configs to omit it when auth is provided separately.

    2.0.0release notes

Fixes and other changes 10

  • Alibaba streams that end cleanly without a provider completion signal now report the interrupted finish reason, preserving partial output without emitting an error solely for the interruption.

    2.0.74release notes

  • Provider-returned identifiers are encoded in credentialed follow-up request paths.

    2.0.73release notes

  • The User-Agent header is now standards-compliant.

    2.0.58release notes

  • Fixes streamed tool calls with missing, blank, or repeated IDs.

    2.0.57release notes

  • Uses model-specific structured output modes.

    0.0.29, 1.0.57, 2.0.52release notesrelease notesrelease notes

  • Prevents negative text output token counts when providers report reasoning tokens; Perplexity reasoning tokens are treated separately from completion tokens.

    1.0.50, 2.0.35release notesrelease notes

  • Handle empty string tool call IDs.

    2.0.33release notes

  • Fixes cache control handling for a single-item content array.

    2.0.0release notes

  • Tool calls now finalize only after the stream is fully consumed, preventing execution with incomplete arguments when partial JSON happens to be parsable.

    2.0.0release notes

  • Alibaba's doGenerate path now uses generateId() as a fallback when toolCallId is missing.

    2.0.0release notes

@ai-sdk/alibaba 16 changes

Breaking changes 1

  • Reasoning is preserved by default in multi-turn requests on supported models.

    1.0.55release notes

New APIs and options 1

  • Introduces the Alibaba provider for use in applications.

    1.0.0release notes

Performance 1

  • Validation schema construction is deferred until first use to reduce provider import time.

    0.0.34, 1.0.69release notesrelease notes

Fixes and other changes 3

  • Provider-returned identifiers are encoded in follow-up request paths.

    1.0.69release notes

  • In doGenerate, reasoning is now placed before text.

    1.0.68release notes

  • Reasoning streams are preserved across empty tool-call deltas for DeepSeek.

    1.0.54release notes

@ai-sdk/alibaba 0.03 changes

Breaking changes 1

  • Reasoning is preserved by default in multi-turn requests on supported models.

    0.0.28release notes

Fixes and other changes 2

  • Tool calls are now finalized when the stream ends, preventing valid partial JSON from causing truncated arguments to run.

    0.0.39release notes

  • Reasoning streams are preserved across empty tool-call deltas.

    0.0.27release notes