[KongchangAI]
· 2 min read· 1,115 words

@ai-sdk/workflow 2.0.73 Released: Tool Input Validation Aligned with streamText

@ai-sdk/workflow 2.0.73 Released: Tool Input Validation Aligned with streamText

Vercel AI SDK's @ai-sdk/workflow releases patch 2.0.73, aligning durable workflow tool input validation with streamText.

@ai-sdk/workflow 2.0.73 is a patch release centered on behavioral alignment, introducing no new APIs or breaking changes. The most critical fix makes WorkflowAgent use the original tool schema to validate and normalize inputs, aligning it with streamText across defaults, transforms, coercion, refinements, unknown-key handling, custom validators, and lifecycle callbacks. Another fix preserves pre-transform input in approval requests, preventing duplicate transform execution on resume that could cause state drift or compounding side effects. It also fixes propagation of runtime context for telemetry.includeRuntimeContext and bumps provider-utils and ai to 5.0.60 and 7.0.141. Durable agent teams using transforms, defaults, custom validators, or human approval flows should upgrade soon and run edge-case regression tests.

Vercel's AI SDK ecosystem continues to iterate at high frequency, and the workflow extension package @ai-sdk/workflow has rolled out version 2.0.73. This is a primarily fix-focused patch release, but its changes around tool input validation carry significant weight for developers building durable AI workflows.

rss source: @ai-sdk/workflow@2.0.73

What Changed in This Update

Version 2.0.73 is a patch-level release, listing two functional fixes in its release notes alongside a batch of dependency updates. It introduces no new APIs and no breaking changes, with its core goal being to bring workflow runtime behavior in line with ordinary streaming calls.

For teams using WorkflowAgent for resumable, durable agent orchestration, this kind of "behavioral consistency" fix is often more critical than a new feature—it directly determines whether the same tool definition produces different input parsing results across different execution paths.

What is a patch version? In Semantic Versioning (SemVer), version numbers take the form MAJOR.MINOR.PATCH. An increment to the patch position (73 in this case) indicates backward-compatible bug fixes without new features or breaking changes; a minor increment indicates backward-compatible new features; and a major increment signals changes that may break existing code. So going from 2.0.x to 2.0.73 for @ai-sdk/workflow is a low-risk follow-up—usually upgradeable without modifying application code—though regression testing on affected edge behaviors is still recommended.

Core Fix #1: Tool Input Validation Aligned with streamText

The most noteworthy commit in this release is 6ac1ee1, which makes WorkflowAgent use the original tool schema to validate and normalize tool inputs, keeping its behavior consistent with streamText.

The release notes explicitly enumerate the list of aligned behaviors: defaults, transforms, coercion, refinements, unknown-key handling, custom validators, repairToolCall, and various lifecycle callbacks. These now behave identically in durable runs as they do in streaming calls.

This change addresses an easy-to-trip-over problem: previously, durable workflows could deviate in edge cases from streamText due to different schema-processing logic—for instance, defaults not being filled in, unknown fields being allowed through or wrongly stripped, or transform execution timing being inconsistent. With alignment in place, developers can switch between the two execution modes with greater confidence.

The difference between streamText and WorkflowAgent. streamText is the most commonly used streaming text generation API in the AI SDK, where tool calls are validated and executed within its synchronous request-response lifecycle. WorkflowAgent, by contrast, targets durable, resumable orchestration scenarios: a single tool call may span process restarts, human interruptions, or long waits, and execution state must be serialized and stored. Precisely because the two paths handle inputs at different points in time, divergences in schema parsing have historically been easy to introduce. "Using the original tool schema" means no longer applying an extra layer of transformation on the workflow side, but instead directly parsing against the schema the developer defined (such as a Zod/JSON Schema-based definition), guaranteeing that validation, default-filling, and normalization results match streamText exactly.

Core Fix #2: Approval Requests Preserve Pre-Transform Input

The same commit also addresses a detail concerning human-in-the-loop approvals: approval requests now preserve the pre-transform input.

This means tool inputs are recorded in the approval request before being processed by transform, thereby preventing transform from being executed twice when resuming execution. For durable workflows involving human review that need to be interrupted and resumed, this is a genuine bug fix—duplicate transform execution could cause state drift, compounding side effects, or a mismatch between the input the approver sees and the input actually executed.

What is a tool call transform? A transform is a function attached to a tool definition that processes the raw parameters given by the model before they are ultimately used—for example, filling in fields, rewriting formats, or injecting context. It is a purely functional 'input-to-input' mapping. The problem arises when a workflow is interrupted for human approval and later resumed from a checkpoint: if the post-transform input was saved, the resume flow would run transform on it again, causing 'double transformation'—and if the transform is not idempotent (i.e., repeated execution yields different results), it leads to state drift or compounding side effects. Preserving the pre-transform raw input amounts to recording the transformation point before a replayable boundary, so that on resume it runs exactly once, keeping semantics consistent with a one-shot streaming call.

Other Changes: Runtime Context and Dependency Updates

Another fix comes from commit 88ea0d7, which makes workflows correctly propagate runtime context permitted by telemetry.includeRuntimeContext. For teams focused on observability, this makes runtime information in traces more complete.

On the dependency front, this update bumps @ai-sdk/provider-utils to 5.0.60 and ai to 7.0.141. Such synchronized updates typically indicate corresponding adjustments upstream in the provider tooling layer and core package, so it is advisable to check version compatibility as well.

telemetry.includeRuntimeContext and observability. Tracing in modern AI applications typically follows OpenTelemetry semantics, where spans and traces are used to link steps within a single request. includeRuntimeContext is a toggle that, when enabled, attaches runtime information (such as environment, request metadata, and workflow instance context) to telemetry data. Because durable workflows execute across multiple processes or even multiple days, their trace context can easily be truncated or lost; this fix ensures that such context is correctly propagated alongside the workflow, allowing distributed tracing to fully reconstruct the chain of a resumable execution and making it easier to pinpoint latency and failure points.

Who Should Upgrade

If you are using @ai-sdk/workflow to build durable agents—especially if any of the following apply—upgrading soon is recommended: your team uses transform, defaults, or custom validators on tool schemas; your workflows involve human approval and resumed execution; or you rely on telemetry to trace runtime context.

If your workflows only perform simple tool calls and do not use transforms or approval flows, upgrade risk is very low—this is a routine patch follow-up. Either way, since this is a patch release with changes concentrated in behavioral alignment, running a round of regression tests on edge cases of tool inputs after upgrading is recommended.

One-line Summary

Vercel AI SDK's @ai-sdk/workflow releases patch 2.0.73, aligning durable workflow tool input validation with streamText.

Paragraph Summary

@ai-sdk/workflow 2.0.73 is a patch release centered on behavioral alignment, introducing no new APIs or breaking changes. The most critical fix makes WorkflowAgent use the original tool schema to validate and normalize inputs, aligning it with streamText across defaults, transforms, coercion, refinements, unknown-key handling, custom validators, and lifecycle callbacks. Another fix preserves pre-transform input in approval requests, preventing duplicate transform execution on resume that could cause state drift or compounding side effects. It also fixes propagation of runtime context for telemetry.includeRuntimeContext and bumps provider-utils and ai to 5.0.60 and 7.0.141. Durable agent teams using transforms, defaults, custom validators, or human approval flows should upgrade soon and run edge-case regression tests.

#@ai-sdk/workflow#streamText#tool input validation#WorkflowAgent#Vercel AI SDK#durable workflows#SemVer patch release
Share:

Related articles