AbortSignal
A standard Web platform API used to propagate cancellation signals through asynchronous operations. It allows termination of multiple coordinated asynchronous tasks, and supports timeout and composite signals.
Timeline (last 90 days)
When a provider's streaming response ignores abort signals, the timeout mechanism in @ai-sdk/workflow 2.0.105 can now also terminate that model step.
AbortSignal is a signal mechanism in the Web standard used to cancel asynchronous operations.
The handling of AbortSignal in provider-utils involves passing the cancellation signal down to the underlying fetch request, cleaning up the streaming reader after cancellation, and distinguishing active cancellation from network errors.
To propagate cancellation from the socket all the way to every costly call, an AbortSignal needs to be passed down.
Both the Anthropic TypeScript SDK and the OpenAI Node SDK accept signal as an AbortSignal in per-request options to cancel requests.
All Facts (5)
When a provider's streaming response ignores abort signals, the timeout mechanism in @ai-sdk/workflow 2.0.105 can now also terminate that model step.
50%UnverifiedAbortSignal is a signal mechanism in the Web standard used to cancel asynchronous operations.
50%UnverifiedThe handling of AbortSignal in provider-utils involves passing the cancellation signal down to the underlying fetch request, cleaning up the streaming reader after cancellation, and distinguishing active cancellation from network errors.
50%UnverifiedTo propagate cancellation from the socket all the way to every costly call, an AbortSignal needs to be passed down.
50%UnverifiedBoth the Anthropic TypeScript SDK and the OpenAI Node SDK accept signal as an AbortSignal in per-request options to cancel requests.
50%