ai ai@7.0.173
- Source
- github.com
- Author
- github-actions[bot]Top Viber
- Date

Context
The notable change in this patch release of the Vercel AI SDK is that `WorkflowAgent` now accepts `toolApproval`, a set of rules that decides in code whether each tool call may run. `WorkflowAgent` is the SDK's for durable workflows: it runs inside Vercel's Workflow SDK, which records progress step by step so a run can survive process restarts and pause for human approval. Until this release it supported only `needsApproval`, a setting on an individual tool that pauses the run and asks a person. The pull request notes that TypeScript rejected `toolApproval` on `WorkflowAgent`, and when it was passed anyway, it was ignored.
`toolApproval` can be set on the or on a single `generate()` or `stream()` call, either as one function for all calls or as a per-tool table. The workflow agent reference lists four answers it can give for a tool call: `'approved'`, `'denied'`, `'user-approval'` or `'not-applicable'`. According to the release notes, an approved call runs in the same step, and a denied call gets an `execution-denied` tool result without pausing the workflow. `'user-approval'` pauses the run the way `needsApproval` does, and `'not-applicable'` leaves the call to the tool's own `needsApproval` setting. The configuration takes precedence over a tool's `needsApproval` setting, and its functions run in workflow , outside the durable model steps. `ToolLoopAgent`, the SDK's standard agent, already accepted `toolApproval`, so code that sets approval rules there can now carry them into a durable agent instead of reducing every decision to a pause for a person.
The pull request also tightens what happens when a paused run resumes. An approval response is accepted only if the configuration or `needsApproval` still requires approval, and the configuration is reapplied before the tool runs, so a forged approval for a call the configuration denies does not execute the tool. A separate fix in the same release stops in-place schema validation or input refinement from changing the arguments of an already-approved tool call when that approval is replayed.
- WorkflowAgent in AI SDK 7.0.173 accepts a toolApproval configuration that overrides a tool's needsApproval setting. Approved calls run in the same step, and denied calls get an execution-denied result without pausing the workflow.
- WorkflowAgent's generate() and stream() now take a timeout object with totalMs, stepMs, firstChunkMs and chunkMs. A timeout now also ends a model step when the provider stream ignores the abort signal.
- The release stops in-place schema validation or input refinement from changing tool arguments that were already approved when an approval is replayed.
- WorkflowAgent's prepareStep now behaves like ToolLoopAgent's: returned instructions replace the step's instructions and carry forward to later steps, providerOptions merge with the agent options, and headers merge over the call's headers.
- agentic loop — The cycle an agent runs in: decide, call a tool, read the result, decide again — repeating until the goal is met or a stop condition fires.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
Checking sign-in…
Loading comments…





