AI SDK 7.1 adds steering of in-flight agent turns, mid-stream error recovery, on-demand tool discovery, and one trace per durable run. These address the control and durability problems of long-running agent loops.
Key takeaways · AI-distilled
A new opt-in streamRetries option recovers from provider errors after streamingSending a model's response token by token as it is generated, so the reader sees text immediately instead of waiting for the whole answer.Full definition → has started, rerunning only the failed model step and keeping earlier steps, ToolAn operation that the software around a model makes available for the model to request, with a name, expected inputs and a kind of result.Full definition → results and output already emitted. maxRetries only covers failures before streaming begins.
Code mode lets the model write JavaScript or TypeScript that calls tools in an isolated QuickJS SandboxAn enforced restriction that confines a process to specified files, network destinations and other resources, applied by the operating system, a container or a virtual machine.Full definition →, running calls concurrently and filtering large results before they reach the model's Context and context windowContext is the information available for a generation; the context window is the capacity available to hold it.Full definition →. toolSearch() with deferLoading loads tool definitions on demand.
HarnessAgent gains adapters for Cline, Cursor, fx, GitHub Copilot and Grok Build, each normalizing sessions, stream events, tools and usage into one contract, so teams can swap coding-agent harnesses without changing their integration layer.
AI SDK moves to a fixed cadence: monthly minor releases, one major each June, and a year of full support for prior majors followed by six months of critical security fixes. AI SDK 5 support ends at the end of 2026 and AI SDK 6 on June 1, 2027.
Terms in this piece · Glossary
Tool — An operation that the software around a model makes available for the model to request, with a name, expected inputs and a kind of result.
Sandbox — An enforced restriction that confines a process to specified files, network destinations and other resources, applied by the operating system, a container or a virtual machine.
streaming — Sending a model's response token by token as it is generated, so the reader sees text immediately instead of waiting for the whole answer.
Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.