# AI SDK 7.1

> Source: <https://vercel.com/blog/ai-sdk-7-1>
> Published: 2026-12-03 00:00:00+00:00

**Key takeaway:** AI SDK 7.1 adds `deferLoading: true` so tools load only after `toolSearch()` finds them, plus a first-content timeout, stream retries and per-step call settings for controlling agent loops.

Today we are announcing the release of AI SDK 7.1.

AI SDK 7 gave you the primitives to build end-to-end production agents and frameworks, and 7.1 adds the controls you need to manage the long-running tasks and loops they run at scale. That includes steering in-flight turns, scaling to large toolsets, recovering from mid-stream errors, and tracing multi-process workflows as a single run.

AI SDK 7.1 adds control and durability across 9 categories:

**Harnesses and tools** with five new harness adapters (Cline, Cursor, fx, GitHub Copilot, and Grok Build), mid-turn steering for Codex, and provider-independent bash and web fetch tools.

**Typed decisions** with `experimental_decide` for choice, score, boolean, and bounding-box questions.

**Batch processing** with background text and image generation.

**Steering** with corrections and queued follow-ups for running agents.

**Realtime and streaming audio** with streaming speech, transcription, and translation, continuous realtime sessions, and a WebSocket transport for `useChat`.

**Code mode and tool search** with sandboxed tool orchestration and on-demand tool discovery.

**Async video generation** with start and status functions, frame images, and reference inputs.

**Agent and streaming controls** with tool call concurrency, per-step call settings, step error callbacks, a first-content timeout, stream retries, and low-memory streaming.

**Durable agents** with `WorkflowAgent.generate()` and one OpenTelemetry trace per durable run.

AI SDK also moves to a fixed [release cadence](#release-cadence): monthly minor releases and one major release per year.

AI SDK now follows a fixed release schedule:

**Monthly minors** with new features, on the Monday closest to the 1st of each month, except January.

**One major per year**, published in June in place of that month's minor release.

**One year of full support for prior majors**, with all applicable bug fixes backported. After that, only critical security fixes are backported for another six months.

AI SDK 5 support ends at the end of 2026. AI SDK 6 support ends on June 1, 2027.

AI SDK 7 introduced `HarnessAgent`, one API to run established agent harnesses such as Claude Code, Codex, and Pi. It gains five more harnesses and steering for Codex, alongside the first provider-independent tools.

Teams standardize on different coding agents, and each agent has its own sessions, events, and tool formats.

Five more runtimes plug into `HarnessAgent`: Cline, Cursor, fx, GitHub Copilot, and Grok Build. Like the existing adapters, each new adapter normalizes the runtime's sessions, stream events, tools, and usage into the harness contract, so you can swap harnesses without changing your integration layer.

Learn more about [harness adapters](https://ai-sdk.dev/docs/ai-sdk-harnesses/harness-adapters).

The Codex adapter now connects to the Codex app-server, which lets you steer a turn: you can send another user message while the turn is still running instead of waiting for it to finish.

To steer `generateText`, `streamText`, and `ToolLoopAgent`, see [Steering](#steering).

Learn more about the [Codex harness adapter](https://ai-sdk.dev/providers/ai-sdk-harnesses/codex).

AI SDK 7.1 includes first-party tools for running shell commands, reading web content, and discovering tools on demand. They work with any model that supports tool calling.

`@ai-sdk/tool-bash` runs commands in the sandbox session you pass as `experimental_sandbox`. `@ai-sdk/tool-web-fetch` reads web pages and documents by URL, with domain allowlists or blocklists.

For agents with many tools, `toolSearch()` lets the model find the tools it needs without loading every definition up front. Mark tools with `deferLoading: true`; matching tools become available on the next step after a search.

Learn more about [tools](https://ai-sdk.dev/docs/ai-sdk-core/tools).

Agents answer many small classification questions: which team owns a ticket, how severe it is, and whether the customer wants a refund. Writing a structured output call for each one is repetitive, and the answers have to be validated before you can branch on them.

`experimental_decide` answers a set of named choice, score, boolean, and bounding-box questions about one shared `state` in a single call. The state can be text, JSON, or a combination of text, files, and JSON. Answers are typed: a choice answer is a union of the option keys you defined.

Boolean answers include a `probability`, the model's estimate that the answer is true, so you can route on a threshold. Native decision models can also return probability distributions for choice and score answers. Use a native decision model where a provider offers one, and a language model adapter where it does not.

Learn more about [decisions](https://ai-sdk.dev/docs/ai-sdk-core/decisions).

Jobs like classifying a backlog, summarizing support tickets, or generating images for a catalog can now run in the background instead of keeping a request open.

`experimental_startBatch` submits text or image requests and returns a serializable batch reference. `experimental_getBatchStatus` and `experimental_getBatchResults` retrieve the status and results later.

Where the provider supports them, you can also cancel a batch with `experimental_cancelBatch`, list batches with `experimental_listBatches`, and pass a `webhookUrl` to be notified on completion.

Text requests can use different models and include tool definitions. Client tools are not executed in a batch: tool calls are returned to your application. Batch processing is available for AI Gateway, Anthropic, Google, OpenAI, and xAI.

Learn more about [batch processing](https://ai-sdk.dev/docs/ai-sdk-core/batch).

Previously, users who noticed a problem in the middle of a run had to wait until the end of the turn or abort the job and start over.

Experimental steering lets you correct `generateText`, `streamText`, and `ToolLoopAgent` while they run.

Create a steering object with `experimental_createSteering()` and pass it as `experimental_steering`. `steer()` adds a user message at the next step boundary without interrupting running tools. `queue()` holds a follow-up until the agent has finished its current task.

`steer()` and `queue()` resolve with an outcome that tells you whether the message was delivered. Pass an `id` to make retries safe: sending a message again with the same `id` returns the outcome of the first message. Steering messages are streamed as `steering-message` parts, added to the assistant message by `useChat`, and listed on each step so you can save the full conversation.

Learn more about [steering](https://ai-sdk.dev/docs/agents/loop-control#steering).

Experimental realtime support in AI SDK 7 covered direct, turn-based browser sessions. In 7.1, speech, transcription, and translation can stream as well, and realtime sessions can run continuously, connect through your server, or use provider-managed transports.

Spoken responses feel slow when listeners have to wait for the full text before any audio starts to play.

To make speech experiences feel naturally realtime, `experimental_streamSpeech` turns text into audio as it arrives. It accepts a complete string or a stream of text, including the `textStream` of `streamText`, so playback can start before the model has finished writing.

Learn more about [streaming speech](https://ai-sdk.dev/docs/ai-sdk-core/speech#streaming-speech).

For live audio input, `streamTranscription` produces transcript updates before the audio stream is complete, and `streamSpeechTranslation` translates live speech into audio and text in the target language.

`transcribe` now also returns separate word timings in `words`, and accepts `timestampGranularities` to request word or segment timestamps.

Learn more about [transcription](https://ai-sdk.dev/docs/ai-sdk-core/transcription#streaming-transcription), [word and segment timings](https://ai-sdk.dev/docs/ai-sdk-core/transcription#word-and-segment-timings), and [translation](https://ai-sdk.dev/docs/ai-sdk-core/translation).

In AI SDK 7, realtime sessions were turn-based and connected the browser directly to the provider with a short-lived token. In 7.1, three more connection types are available:

**Continuous OpenAI Live conversations** through an application-owned WebSocket relay or browser WebRTC.

**Server-owned connections**, where a trusted server opens the WebSocket instead of creating a browser token.

**Provider-managed transports**, where the provider handles the audio transport and your server creates and closes the sessions.

Learn more about [realtime](https://ai-sdk.dev/docs/ai-sdk-core/realtime) and [continuous conversations](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-realtime#continuous-conversations).

`WebSocketChatTransport` is a chat transport for `useChat` that sends chat requests and receives UI message streams over one persistent WebSocket connection. It supports cancellation and sequence-based resume.

Learn more about [WebSocketChatTransport](https://ai-sdk.dev/docs/reference/ai-sdk-ui/websocket-chat-transport).

Agents with many tools run into two problems:

The model orchestrates tools one step at a time and passes every intermediate result through its context.

Every tool definition takes up room in the prompt whether the model needs it or not.

Code mode and tool search address these problems by moving multi-tool orchestration into code outside the context window and loading tool definitions on demand instead of up front.

With `@ai-sdk/code-mode`, the model writes JavaScript or TypeScript that calls your tools inside an isolated QuickJS sandbox. That code can call tools concurrently, combine their results, and filter large responses before anything returns to the model's context.

Use `experimental_toolCallers` with `generateText`, `streamText`, or `ToolLoopAgent` to choose which tools code mode can call and which the model can still call directly.

Learn more about [code mode](https://ai-sdk.dev/docs/ai-sdk-core/code-mode).

Generating a video can take several minutes, and AI SDK 7's `experimental_generateVideo` keeps the call open until it finishes. 

7.1 lets you start a video generation and check its status later, or get notified via webhook, and adds first/last frame and reference inputs.

`experimental_startVideo` starts a video generation and returns a serializable operation reference immediately. 

Store the operation and check it later with `experimental_getVideoStatus`, or pass a `webhookUrl` to get notified where the provider supports it.

Pass first and last frame images through `frameImages`, and reference images or videos through `inputReferences`, to anchor a video to existing assets.

Learn more about [video generation](https://ai-sdk.dev/docs/ai-sdk-core/video-generation).

Agents in production need limits and recovery: bounded tool execution, different settings per step, and a way to survive a provider error in the middle of a stream.

AI SDK 7.1 introduces tool concurrency limits, per-step model settings, step error hooks, first-content timeouts, mid-stream retries, and low-memory streaming so long runs stay bounded and recoverable.

By default, AI SDK runs multiple tool calls in a step concurrently. When later calls depend on side effects from earlier ones, you can now use `toolCallConcurrency` in `generateText`, `streamText`, or `ToolLoopAgent` to cap parallel execution. Setting it to `1` runs calls sequentially in the order the model generated them.

Learn more about [tool call concurrency](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling#tool-call-execution-concurrency).

`prepareStep` can now override model call settings such as `temperature`, `maxOutputTokens`, and `reasoning` for an individual step. This is useful when tool-calling steps need more deterministic sampling than the final response.

Learn more about [loop control](https://ai-sdk.dev/docs/agents/loop-control#model-call-settings).

`onStepError` now runs instead of `onStepEnd` when a step fails without producing a result. For example, it runs if a provider request throws an error or a stream closes without output.

Also, the `firstChunkMs` timeout aborts a step when its stream opens but no content arrives within the limit.

Learn more about [lifecycle callbacks](https://ai-sdk.dev/docs/ai-sdk-core/lifecycle-callbacks) and [timeouts](https://ai-sdk.dev/docs/ai-sdk-core/settings#timeout).

`maxRetries` only catches failures before a response starts streaming. To recover from provider errors that arrive mid-stream, `streamText` now adds an opt-in `streamRetries` option.

Each retry reruns only the failed model step, preserving earlier completed steps, their tool results, and any output already emitted to the stream.

Learn more about [stream retries](https://ai-sdk.dev/docs/ai-sdk-core/error-handling#retrying-provider-errors-after-streaming-starts).

By default, `streamText` buffers a copy of the stream for replay and retains the final output. That overhead isn't necessary for long, single-pass streams. The new `experimental_streamTextLowMemory` function accepts the same options without the replay buffer, and for plain text streaming, skips holding the full generated text in memory.

Learn more about [low-memory streaming](https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-text-low-memory).

AI SDK 7.1 extends `WorkflowAgent` with two new features: 

Non-streaming execution via `generate()`.

A durable OpenTelemetry bridge that stitches runs that suspend and resume across processes into a single trace.

`WorkflowAgent.generate()`
`WorkflowAgent` previously only supported streaming. Use `generate()` for durable execution when you need the completed result without a stream. It uses the same durable tool loop as `stream()`.

Learn more about [WorkflowAgent](https://ai-sdk.dev/docs/agents/workflow-agent).

Because a `WorkflowAgent` run can suspend and resume across different processes, it's hard to view the full execution as a single trace. The new durable OpenTelemetry bridge stitches those steps into one agent operation, preserving the original timestamps on every model and tool span.

Learn more about [durable tracing](https://ai-sdk.dev/docs/ai-sdk-core/telemetry#durable-workflowagent-runs).

Install AI SDK 7.1 with one command.
