fix(deps): update dependency @ai-sdk/xai to v4 - #269
Merged
Conversation
renovate
Bot
force-pushed
the
renovate/ai-sdk-xai-4.x
branch
11 times, most recently
from
July 25, 2026 14:40
ef50b4b to
07314da
Compare
renovate
Bot
force-pushed
the
renovate/ai-sdk-xai-4.x
branch
5 times, most recently
from
July 27, 2026 08:51
0c374fb to
9adbb7f
Compare
renovate
Bot
force-pushed
the
renovate/ai-sdk-xai-4.x
branch
from
July 27, 2026 16:40
9adbb7f to
0a139d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.0.110→4.0.18Release Notes
vercel/ai (@ai-sdk/xai)
v4.0.18Compare Source
Patch Changes
02ffdcb]76cb673]v4.0.17Compare Source
Patch Changes
8b52503]v4.0.16Compare Source
Patch Changes
1e2ae1f: fix(xai): handle empty HTTP 202 responses while polling videos54e5498: fix(provider/xai): preserve images in Responses API tool resultscd06458]v4.0.15Compare Source
Patch Changes
91a3d6e: feat(provider/xai): support end-user identifiers for video generation and editingv4.0.14Compare Source
Patch Changes
0b61267]v4.0.13Compare Source
Patch Changes
31c7be8]v4.0.12Compare Source
Patch Changes
4be62c1: fix(provider-utils): validate provider-response URLs ingetFromApigetFromApinow has avalidateUrlflag. It is optional so existing callers keep compiling (omitting it behaves likefalse, i.e. no validation), but all AI SDK provider packages set it explicitly at every call site so each one makes a visible trust decision. Whentrue, the URL is routed throughfetchWithValidatedRedirects— the same guard used bydownloadBlob— which rejects private/loopback/link-local targets, re-validates every redirect hop, strips proxy/metadata/cookie request headers, and drops all caller headers except the user-agent on cross-origin redirects (custom API-key headers must not follow a redirect off-origin any more thanAuthorizationmay); blocked URLs throwDownloadError. It is enabled at the image/video/audio download and polling call sites where the URL comes from a provider response body; URLs built from developer-configured endpoints passvalidateUrl: falseand are unaffected.A new optional
credentialedOriginwithholds caller headers unless the URL is same-origin with it, so the API key is not sent to a response-supplied host on a different origin.A new optional
trustedOriginexempts URLs (and redirect hops) that are same-origin with the developer-configured provider endpoint from target validation, so self-hosted and localhost deployments whose response URLs point back at the configured host keep working; all other hops are still validated.Also closes range gaps in
validateDownloadUrl(IPv4224.0.0.0/4multicast and the TEST-NET documentation ranges192.0.2.0/24,198.51.100.0/24,203.0.113.0/24; IPv6 documentation ranges2001:db8::/32and3fff::/20), and follows only the fetch-spec redirect status codes (301/302/303/307/308) — aLocationheader on any other status is not followed. This guard performs string/literal checks only and does not resolve DNS; hostnames that resolve to private addresses and DNS rebinding remain out of scope and must be constrained at the network layer (or by injecting a Nodefetchthat pins the resolved IP at connect time) for server deployments handling untrusted URLs. Seecontributing/secure-url-handling.md.Updated dependencies [
4be62c1]Updated dependencies [
7805e4a]Updated dependencies [
cd12954]v4.0.10Compare Source
Patch Changes
0f93c57: feat (video): support video (not just image) reference inputs ininputReferencesfor reference-to-video generationd25a084: feat (provider/xai): add grok-4.5 model id0f93c57]v4.0.9Compare Source
Patch Changes
72eee24: feat: supportimageDetailprovider option on image file parts to control image processing resolutionac306ed]v4.0.8Compare Source
Patch Changes
8e006de: fix: send reasoning effortnoneto the xAI API when the top-levelreasoning: 'none'option is set8e006de: fix: omit the reasoning effort parameter and emit an unsupported warning when the top-levelreasoningoption is used with xAI models that reject it (grok-4.20-reasoning,grok-4.20-non-reasoning, and dated variants)v4.0.7Compare Source
Patch Changes
5520b8a: Emit provider-executed tool results for completed xAI Responses API streaming tool calls.v4.0.6Compare Source
Patch Changes
5c5c0f5: Add experimental streaming transcription support for transcription models, including OpenAIgpt-realtime-whisperand xAI WebSocket STT.5c5c0f5]v4.0.5Compare Source
Patch Changes
c6f5e62]v4.0.4Compare Source
Patch Changes
8c616f0]v4.0.3Compare Source
Patch Changes
0274f34: feat (video): add first-classframeImagesandinputReferencescall options for video generation0274f34]v4.0.2Compare Source
Patch Changes
6a436e3]v4.0.1Compare Source
Patch Changes
ba6d510: chore: fix deprecated use of zod.passthrough()v4.0.0Compare Source
Major Changes
f7d4f01: feat(provider): add support forreasoning-filetype for files that are part of reasoning776b617: feat(provider): adding new 'custom' content typeef992f8: 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 provider8359612: Start v7 pre-release04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbolsFor all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
f62681f: feat(provider/xai): make responses api the defaultPatch Changes
38fc777: Add AI Gateway hint to provider READMEs85735d8: fix(xai): stop emitting additionalProperties flag74d520f: feat: migrate providers to support new top-levelreasoningparameter25f1837: feat(xai): add b64_json response format, usage cost tracking, and quality/user parameters for image modelsa0b0a0c: expose costInUsdTicks in responses provider metadataaa5a583: chore(provider/xai): remove obsolete Grok 2 models now that they are shut down in their APIe5bdc8d: fix (provider/xai): handle mid-stream error chunks4799fa5: chore(provider/xai): update provider to use v4 types813851f: fix (provider/xai): add response.incomplete and response.failed streaming event handling2dc2a52: fix reasoning-start dedupe on multi-summary-part responses to prevent xai 400 on continuation requests9f0e36c: trigger release for all packages after provenance setup58a2ad7: fix: more precise default message for tool execution deniald20829e: feat(provider/xai): add moderation error, and costInUsdTicks to video model7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.0f11f10: add reasoningSummary to responses API provider options23f9d72: deprecate searchParameters (xai live search) in favor of web_search/x_search agent tools0c4c275: trigger initial canary release1293885: surface full xai error detail in APICallError.message instead of falling back to http status text8d87577: fix(xai): support encrypted reasoning round-trip for ZDR9f20868: fix(provider/xai): correct finish reason for tool calls4f91b5d: chore(provider/xai): update Grok 4.20 model IDs to their non-beta versionsce769dd: feat(provider): add experimental Realtime API support for voice conversationsAdds first-class support for realtime (speech-to-speech) APIs:
Experimental_RealtimeModelV4spec in@ai-sdk/providerwith normalized event types and factoryopenai.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 provider12115e9: fix reasoning text extraction from content in responses doGenerate9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type258c093: chore: ensure consistent import handling and avoid import duplicates or cyclesb8396f0: trigger initial beta releasef51c95e: feat(provider/xai): add video extension and reference-to-video (R2V) support90e2d8a: chore: fix unused vars not being flagged by our lint toolingf5181ad: feat(provider/xai): support multiple input images for image editingb3976a2: 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): addenableImageSearchto 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 list
grok-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.
'none'to the allowed values forproviderOptions.xai.reasoningEfforton both the chat (
xai()) and responses (xai.responses()) language models.'medium'to the chat model'sreasoningEffortenum (the responsesmodel already supported it).
reasoning: 'medium'now maps toreasoning_effort: 'medium'forthe chat model (previously it was coerced to
'low'because'medium'wasnot a valid value).
In addition, the
XaiChatModelIdandXaiResponsesModelIdautocomplete unionshave been trimmed to xAI's current model lineup
(docs):
grok-4.20-non-reasoninggrok-4.20-reasoninggrok-4.3grok-latestOlder 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 continuesto work; only IDE autocomplete is affected.
78b6433: feat(provider/xai): support non-image file parts (PDF, text, CSV) in the Responses API viainput_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 supportv3.0.111Compare Source
Patch Changes
05ce9c0: fix(provider/xai): preserve images in Responses API tool resultsConfiguration
📅 Schedule: (in timezone Asia/Tokyo)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.