Release Notes
Major Changes
f7d4f01: feat(provider): add support for
reasoning-filetype for files that are part of reasoning776b617: feat(provider): adding new 'custom' content type
ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (
"type": "module"). Consumers usingrequire()must switch to ESMimportsyntax.c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
8359612: Start v7 pre-release
04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
f62681f: feat(provider/xai): make responses api the default
Patch Changes
38fc777: Add AI Gateway hint to provider READMEs
85735d8: fix(xai): stop emitting additionalProperties flag
74d520f: feat: migrate providers to support new top-level
reasoningparameter25f1837: feat(xai): add b64_json response format, usage cost tracking, and quality/user parameters for image models
a0b0a0c: expose costInUsdTicks in responses provider metadata
aa5a583: chore(provider/xai): remove obsolete Grok 2 models now that they are shut down in their API
e5bdc8d: fix (provider/xai): handle mid-stream error chunks
4799fa5: chore(provider/xai): update provider to use v4 types
813851f: fix (provider/xai): add response.incomplete and response.failed streaming event handling
2dc2a52: fix reasoning-start dedupe on multi-summary-part responses to prevent xai 400 on continuation requests
9f0e36c: trigger release for all packages after provenance setup
58a2ad7: fix: more precise default message for tool execution denial
d20829e: feat(provider/xai): add moderation error, and costInUsdTicks to video model
7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
0f11f10: add reasoningSummary to responses API provider options
23f9d72: deprecate searchParameters (xai live search) in favor of web_search/x_search agent tools
0c4c275: trigger initial canary release
1293885: surface full xai error detail in APICallError.message instead of falling back to http status text
8d87577: fix(xai): support encrypted reasoning round-trip for ZDR
9f20868: fix(provider/xai): correct finish reason for tool calls
4f91b5d: chore(provider/xai): update Grok 4.20 model IDs to their non-beta versions
ce769dd: feat(provider): add experimental Realtime API support for voice conversations
Adds first-class support for realtime (speech-to-speech) APIs:
Experimental_RealtimeModelV4spec in@ai-sdk/providerwith 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 creationexperimental_getRealtimeToolDefinitionshelper for provider session tool definitionsexperimental_useRealtimehook in@ai-sdk/reactreturningUIMessage[](aligned withuseChat), withonToolCallandaddToolOutputfor client-driven tool executioninputAudioTranscriptionsession config for showing transcribed user audio messages when supported by the provider
12115e9: fix reasoning text extraction from content in responses doGenerate
9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
b8396f0: trigger initial beta release
f51c95e: feat(provider/xai): add video extension and reference-to-video (R2V) support
90e2d8a: chore: fix unused vars not being flagged by our lint tooling
f5181ad: feat(provider/xai): support multiple input images for image editing
b3976a2: Add workflow serialization support to all provider models.
@ai-sdk/provider-utils: NewserializeModel()helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.All providers:
headersis now optional in provider config types. This is non-breaking — existing code that passesheaderscontinues to work. Custom provider implementations that construct model configs manually can now omitheaders, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.All provider model classes now include
WORKFLOW_SERIALIZEandWORKFLOW_DESERIALIZEstatic methods, enabling them to cross workflow step boundaries without serialization errors.1dbecd7: feat(provider/xai): add
enableImageSearchto the xAI Web Search toolThe xAI Responses API supports
enable_image_searchon Web Search tools.xai.tools.webSearch()now acceptsenableImageSearchand sends it through to the API asenable_image_search.80e1702: feat(xai): support
'none'and'medium'reasoning effort forgrok-4.3, and curate the model ID autocomplete listgrok-4.3acceptsreasoning_effortof"none" | "low" | "medium" | "high", where"none"disables reasoning entirely (no thinking tokens) and"medium"provides more thinking for less-latency-sensitive applications.- Adds
'none'to the allowed values forproviderOptions.xai.reasoningEfforton both the chat (xai()) and responses (xai.responses()) language models. - Adds
'medium'to the chat model'sreasoningEffortenum (the responses model already supported it). - Top-level
reasoning: 'medium'now maps toreasoning_effort: 'medium'for the chat model (previously it was coerced to'low'because'medium'was not a valid value).
In addition, the
XaiChatModelIdandXaiResponsesModelIdautocomplete unions have been trimmed to xAI's current model lineup (docs):grok-4.20-non-reasoninggrok-4.20-reasoninggrok-4.3grok-latest
Older entries (
grok-3*,grok-4,grok-4-0709,grok-4-latest,grok-4-1-fast-*,grok-4-fast-*,grok-code-fast-1, andgrok-4.20-multi-agent-0309) have been removed from the autocomplete list. This is not a runtime change — the model ID type is still open ((string & {})), so passing any model ID that the xAI API accepts continues to work; only IDE autocomplete is affected.import { xai } from "@ai-sdk/xai"; import { generateText } from "ai"; await generateText({ model: xai("grok-4.3"), prompt: "Hi", providerOptions: { xai: { reasoningEffort: "none" }, }, });- Adds
78b6433: feat(provider/xai): support non-image file parts (PDF, text, CSV) in the Responses API via
input_file+file_urlThe xAI Responses API accepts
{ type: 'input_file', file_url }for non-image documents (see https://docs.x.ai/docs/guides/chat-with-files), but the AI SDK xAI Responses provider previously threwUnsupportedFunctionalityErrorfor any file part whosemediaTypedid not start withimage/.When a file part is passed with
data: URLand a non-image media type, the provider now emits{ type: 'input_file', file_url }.application/pdfandtext/*are also added tosupportedUrlsso the SDK does not download them to bytes before reaching the converter.Inline-byte (base64) inputs for non-image media types continue to throw, since xAI's Responses API requires either a public URL or a pre-uploaded
file_idfor non-image documents.7486744: Add xAI speech-to-text transcription support.
7486744: feat(provider/xai): add text-to-speech support