npm / @ai-sdk/azure
@ai-sdk/azure
What changed in @ai-sdk/azure 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
3 breaking2 deprecations16 new APIs and options2 behavior and defaults3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@ai-sdk/azure 421 changes
Breaking changes 3
Azure Speech voice-reset errors from unknown voices or unsupported styles now report status 400 instead of 502, preventing retries for client input errors.
Unknown MAI voices or styles now produce descriptive, non-retryable errors.
Rejects resourceName values that are not single DNS labels, preventing malformed values from rewriting the request host.
Deprecations 2
Deprecated in favor of azure.tools.webSearch().
Deprecated or ineffective DeepSeek sampling options now produce warnings and are omitted, while penalty sampling remains supported for Azure-hosted DeepSeek models.
New APIs and options 12
Adds support for MAI-Image models through the MAI image API.
Adds streaming transcription support through the MAI realtime API.
Adds speech generation support for MAI-Voice-2.1 through the MAI realtime API.
Adds speech generation support for MAI-Voice-2.1-Flash through the MAI realtime API.
Adds the maiBaseURL setting for MAI realtime API integration.
Adds providerOptions.azure.api: 'mai' to select the MAI realtime API.
Adds the webSocket setting for MAI realtime API integration.
Adds MAI-Transcribe-2 file transcription through the Azure Speech API with diarization, timestamps, transcript styles, locale forcing, and phrase lists.
Adds azure.transcriptionModel as an alias of azure.transcription.
Adds an Azure API provider option that overrides model-based routing for speech generation.
Adds a setting for configuring the Azure Speech endpoint.
Exports OpenAIResponsesSystemMessageOptions for typed message-level reasoning effort updates in Azure Responses models.
Behavior and default changes 1
Azure AI Foundry Responses requests now include explicit message item types.
Fixes and other changes 3
Hostname parts are now validated using isValidHostnamePart, affecting hostname validation for configured Azure endpoints.
Uses a standards-compliant User-Agent header.
Constructs OpenAI v1 URLs for Azure AI Foundry and Cognitive Services hostnames while preserving complete v1 and Foundry project base URLs.
@ai-sdk/azure 35 changes
New APIs and options 4
Adds support for MAI-Voice-2.1 and MAI-Voice-2.1-Flash speech generation.
Adds MAI-Voice-2-Flash and MAI-Voice-2 speech generation through Azure Speech text to speech with voice, output format, speed, and style options.
Adds azure.speechModel() as an alias of azure.speech().
Adds an Azure provider option to override model-based API routing for transcription.
Behavior and default changes 1
Requests route to the Azure Speech API by default and no longer send rejected segment timestamp defaults.