
The AI SDK is an open-source TypeScript toolkit from Vercel for calling LLMs through one API across many providers. It covers text and structured generation, tool calling, agents, and UI hooks such as useChat for React, Next.js, Vue and Svelte.
Free open-source TypeScript library; Vercel AI Gateway adds a monthly free credit on select models.
Optional AI Gateway is pay-as-you-go at provider list price with no markup or platform fee.
AI Gateway free tier; buying credits moves to paid tier with no gateway rate limits.
Python version is in public beta: separate ai package, needs Python 3.12 or later.
ai@7.0.171, 6.0.331 and 5.0.290 stop small requests with many malformed message parts from exhausting server memory. Upgrade.
@ai-sdk/workflow 2.0.104 and 2.0.105: prepareStep overrides apply to one step only, and tools no longer get the system prompt.
ai@7.0.172: experimental_extract and experimental_decide throw DownloadError on remote file URLs unless you pass experimental_download.
@ai-sdk/provider-utils 5.0.80 no longer blocks hostnames that resolve to private IPs. Pass createGuardedFetch() for untrusted URLs.
ai@7.0.171, 6.0.331 and 5.0.290 send a failed tool call's real error text to the browser. Set redactToolErrors: true to mask it again.
The AI SDK can now stream audio to Deepgram Nova and get partial and final transcripts back, through experimental_streamTranscribe.
WorkflowAgent.stream() no longer takes experimental_transform, and the StreamTextTransform type export is gone. Code using it won't compile.
On the AI SDK 6 line, tools defined by value in mid-conversation toolChanges are not sent unless you set allowInlineToolDefinitions.
@ai-sdk/mcp 1.0.102 (AI SDK 6) and 0.0.44 (AI SDK 5) stop following redirects. Use the final URL, or redirect: 'follow' if trusted.
@ai-sdk/openai 4.0.109 supports gpt-image-2.6-flare and -sunburst, with complexity, markup edits and animated GIF output.
@ai-sdk/tool-bash and @ai-sdk/tool-web-fetch give agents ready-made, experimental tools to run sandboxed shell commands and read pages.
@ai-sdk/openai 4.0.96 and @ai-sdk/azure 4.0.104 deprecate webSearchPreview(). Use webSearch(), which takes the same options.