Patch Changes
-
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.reasoningEffort
on 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, and
grok-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