AI SDK WorkflowAgent: prepareStep overrides now last one step, and tools no longer see the system prompt (November 13, 2026)
@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.
3 of 3 free copies left this month.Unlimited with Pro
What changed
On November 13, 2026 Vercel published @ai-sdk/workflow 2.0.104 and 2.0.105. Both are patch releases, but they change how WorkflowAgent behaves.
In 2.0.104:
model,toolChoice,activeToolsand generation settings returned fromprepareStepnow apply only to the current step. Before, they carried into all later steps.- Tools and tool callbacks no longer receive the system prompt or the assistant message holding the current tool call in
messages. onErrorandonAbortcan be set in the constructor, likeToolLoopAgent. Constructor callbacks run first.stream()adds uptotalUsagelikeToolLoopAgent, and counts the provider did not report stayundefinedinstead of0.
In 2.0.105:
- An abort during a model step now calls
onAbortinstead ofonError. - Instructions, provider options and headers from
prepareStepnow behave as they do inToolLoopAgent. - An async generator tool's result is the last value it yields. A generator that throws after yielding gives a tool error.
- New options:
toolApproval(overridesneedsApproval; denied calls get anexecution-deniedresult),toolOrder,experimental_refineToolInput, and atimeoutobject withtotalMs,stepMs,firstChunkMsandchunkMs. Invalid timeout values throwInvalidArgumentError. - Provider warnings from every model call go through the AI SDK warning logger, controlled by
AI_SDK_LOG_WARNINGS.
Prerequisites
- An app that uses
WorkflowAgentfrom@ai-sdk/workflow
Steps
- If your
prepareStepreturns amodel, , or settings and you relied on them staying in force, return them on every step where you need them.
