{"slug": "ai-sdk-7-1", "title": "AI SDK 7.1", "summary": "Vercel released AI SDK 7.1, adding controls for long-running agents across 9 categories, including 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. The release also introduces `experimental_decide` for typed choice, score, boolean and bounding-box questions, background batch text and image generation, and `WorkflowAgent.generate()` with one OpenTelemetry trace per durable run. AI SDK moves to a fixed cadence of monthly minor releases on the Monday closest to the 1st (except January) and one major release each June, with AI SDK 5 support ending at the end of 2026 and AI SDK 6 support ending June 1, 2027.", "body_md": "Today we are announcing the release of AI SDK 7.1.\n\nAI 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.\n\nAI SDK 7.1 adds control and durability across 9 categories:\n\n**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.\n\n**Typed decisions** with `experimental_decide` for choice, score, boolean, and bounding-box questions.\n\n**Batch processing** with background text and image generation.\n\n**Steering** with corrections and queued follow-ups for running agents.\n\n**Realtime and streaming audio** with streaming speech, transcription, and translation, continuous realtime sessions, and a WebSocket transport for `useChat`.\n\n**Code mode and tool search** with sandboxed tool orchestration and on-demand tool discovery.\n\n**Async video generation** with start and status functions, frame images, and reference inputs.\n\n**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.\n\n**Durable agents** with `WorkflowAgent.generate()` and one OpenTelemetry trace per durable run.\n\nAI SDK also moves to a fixed [release cadence](#release-cadence): monthly minor releases and one major release per year.\n\nAI SDK now follows a fixed release schedule:\n\n**Monthly minors** with new features, on the Monday closest to the 1st of each month, except January.\n\n**One major per year**, published in June in place of that month's minor release.\n\n**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.\n\nAI SDK 5 support ends at the end of 2026. AI SDK 6 support ends on June 1, 2027.\n\nAI 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.\n\nTeams standardize on different coding agents, and each agent has its own sessions, events, and tool formats.\n\nFive 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.\n\nLearn more about [harness adapters](https://ai-sdk.dev/docs/ai-sdk-harnesses/harness-adapters).\n\nThe 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.\n\nTo steer `generateText`, `streamText`, and `ToolLoopAgent`, see [Steering](#steering).\n\nLearn more about the [Codex harness adapter](https://ai-sdk.dev/providers/ai-sdk-harnesses/codex).\n\nAI 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.\n\n`@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.\n\nFor 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.\n\nLearn more about [tools](https://ai-sdk.dev/docs/ai-sdk-core/tools).\n\nAgents 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.\n\n`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.\n\nBoolean 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.\n\nLearn more about [decisions](https://ai-sdk.dev/docs/ai-sdk-core/decisions).\n\nJobs 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.\n\n`experimental_startBatch` submits text or image requests and returns a serializable batch reference. `experimental_getBatchStatus` and `experimental_getBatchResults` retrieve the status and results later.\n\nWhere 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.\n\nText 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.\n\nLearn more about [batch processing](https://ai-sdk.dev/docs/ai-sdk-core/batch).\n\nPreviously, 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.\n\nExperimental steering lets you correct `generateText`, `streamText`, and `ToolLoopAgent` while they run.\n\nCreate 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.\n\n`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.\n\nLearn more about [steering](https://ai-sdk.dev/docs/agents/loop-control#steering).\n\nExperimental 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.\n\nSpoken responses feel slow when listeners have to wait for the full text before any audio starts to play.\n\nTo 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.\n\nLearn more about [streaming speech](https://ai-sdk.dev/docs/ai-sdk-core/speech#streaming-speech).\n\nFor 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.\n\n`transcribe` now also returns separate word timings in `words`, and accepts `timestampGranularities` to request word or segment timestamps.\n\nLearn 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).\n\nIn 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:\n\n**Continuous OpenAI Live conversations** through an application-owned WebSocket relay or browser WebRTC.\n\n**Server-owned connections**, where a trusted server opens the WebSocket instead of creating a browser token.\n\n**Provider-managed transports**, where the provider handles the audio transport and your server creates and closes the sessions.\n\nLearn 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).\n\n`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.\n\nLearn more about [WebSocketChatTransport](https://ai-sdk.dev/docs/reference/ai-sdk-ui/websocket-chat-transport).\n\nAgents with many tools run into two problems:\n\nThe model orchestrates tools one step at a time and passes every intermediate result through its context.\n\nEvery tool definition takes up room in the prompt whether the model needs it or not.\n\nCode 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.\n\nWith `@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.\n\nUse `experimental_toolCallers` with `generateText`, `streamText`, or `ToolLoopAgent` to choose which tools code mode can call and which the model can still call directly.\n\nLearn more about [code mode](https://ai-sdk.dev/docs/ai-sdk-core/code-mode).\n\nGenerating a video can take several minutes, and AI SDK 7's `experimental_generateVideo` keeps the call open until it finishes. \n\n7.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.\n\n`experimental_startVideo` starts a video generation and returns a serializable operation reference immediately. \n\nStore the operation and check it later with `experimental_getVideoStatus`, or pass a `webhookUrl` to get notified where the provider supports it.\n\nPass first and last frame images through `frameImages`, and reference images or videos through `inputReferences`, to anchor a video to existing assets.\n\nLearn more about [video generation](https://ai-sdk.dev/docs/ai-sdk-core/video-generation).\n\nAgents 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.\n\nAI 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.\n\nBy 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.\n\nLearn more about [tool call concurrency](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling#tool-call-execution-concurrency).\n\n`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.\n\nLearn more about [loop control](https://ai-sdk.dev/docs/agents/loop-control#model-call-settings).\n\n`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.\n\nAlso, the `firstChunkMs` timeout aborts a step when its stream opens but no content arrives within the limit.\n\nLearn 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).\n\n`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.\n\nEach retry reruns only the failed model step, preserving earlier completed steps, their tool results, and any output already emitted to the stream.\n\nLearn more about [stream retries](https://ai-sdk.dev/docs/ai-sdk-core/error-handling#retrying-provider-errors-after-streaming-starts).\n\nBy 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.\n\nLearn more about [low-memory streaming](https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-text-low-memory).\n\nAI SDK 7.1 extends `WorkflowAgent` with two new features: \n\nNon-streaming execution via `generate()`.\n\nA durable OpenTelemetry bridge that stitches runs that suspend and resume across processes into a single trace.\n\n`WorkflowAgent.generate()`\n`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()`.\n\nLearn more about [WorkflowAgent](https://ai-sdk.dev/docs/agents/workflow-agent).\n\nBecause 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.\n\nLearn more about [durable tracing](https://ai-sdk.dev/docs/ai-sdk-core/telemetry#durable-workflowagent-runs).\n\nInstall AI SDK 7.1 with one command.", "url": "https://wpnews.pro/news/ai-sdk-7-1", "canonical_source": "https://vercel.com/blog/ai-sdk-7-1", "published_at": "2026-12-03 00:00:00+00:00", "updated_at": "2026-12-03 20:44:39.234851+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models"], "entities": ["AI SDK", "Vercel", "Cline", "Cursor", "fx", "GitHub Copilot", "Grok Build", "Codex"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/ai-sdk-7-1", "markdown": "https://wpnews.pro/news/ai-sdk-7-1.md", "text": "https://wpnews.pro/news/ai-sdk-7-1.txt", "jsonld": "https://wpnews.pro/news/ai-sdk-7-1.jsonld"}}