
Workflow SDK now supports inflight cancellation
Quick Answer
The Workflow SDK 5 beta from Vercel AI introduces inflight cancellation support, allowing developers to manage operations across workflows and steps using AbortController and AbortSignal.
Quick Take
The Workflow SDK 5 beta from Vercel AI introduces inflight cancellation support, allowing developers to manage operations across workflows and steps using AbortController and AbortSignal. This feature enables cancellation of ongoing tasks, enhances cooperation between steps, and maintains signal durability across suspensions, improving overall workflow efficiency.
Key Points
- Supports inflight cancellation using AbortController and AbortSignal across workflows.
- Cancellation is cooperative; steps must check the signal for operations.
- Durable signals persist across suspensions and allow for deterministic replay.
- Can cancel slow steps or remaining requests based on external conditions.
- Enhances workflow efficiency by managing parallel tasks effectively.
Article Excerpt
From source RSS / original summaryThe Workflow SDK 5 beta now supports the standard and APIs across workflow and step boundaries. AbortControllerAbortSignalCreate a controller inside a workflow, pass its signal into one or more steps, and cancel in-flight operations using the same API already uses. fetchThat signal stays durable across suspensions and deterministic replay. When a step is running, it sees the cancellation, even when it's in a separate function invocation.
Cancellation is also cooperative; steps have to inspect the signal or pass it to an API that supports. AbortSignalUse it to stop a slow step when a durable timeout wins a race, cancel the remaining requests after the first successful response, thread one signal through a multi-step pipeline, or cancel parallel work when an external condition changes. Try it with and read the to learn more. workflow@betacancellation documentationRead more
Reader Mode unavailable (could not extract clean content).
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
Opus 4.8 on AI Gateway
Claude Opus 4.8, now available on Vercel AI Gateway, excels in long-horizon agentic execution and complex coding tasks, producing clearer prose for knowledge work. Users can access it via the .anthropic/claude-opus-4.8 model in the AI SDK, benefiting from a unified API with no markup on provider pricing.
