npm / @ai-sdk/groq
@ai-sdk/groq
What changed in @ai-sdk/groq 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 security1 new APIs and options1 behavior and defaults8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@ai-sdk/groq 410 changes
Security 1
@ai-sdk/provider-utils has an Uncontrolled Resource Consumption issue
New APIs and options 1
The reasoning level type now includes max. Third-party providers and consumers with exhaustive mappings must handle the new value; existing reasoning levels remain accepted.
Behavior and default changes 1
Browser search tools are kept for unknown model IDs instead of being dropped with a warning; known models without browser search remain excluded.
Fixes and other changes 7
Uses the JSON response tool for structured outputs when tool calling is enabled.
The User-Agent header is now standards-compliant.
Fixes streamed tool calls with missing, blank, or repeated IDs.
Non-streaming responses with no choices now return a typed error.
Disables reasoning for supported Groq models when top-level reasoning is set to none.
Prevents negative text output token counts when providers report reasoning tokens; Perplexity reasoning tokens are treated separately from completion tokens.
Fixes handling of empty string tool call IDs.
@ai-sdk/groq 31 changes
Fixes and other changes 1
Reasoning streams are preserved across empty tool-call deltas.