Is onFinish called when stream is aborted?

HEAD
c123363Version Packages (#12611)
This post might have stale content, as HEAD is 1931 commits ahead.

When using streamText and toUIMessageStream with onFinish, is onFinish called when the stream is aborted (e.g. AbortController.abort()) before the model finishes generating? Or is onFinish only called when the stream completes normally?


END OF POST

Is onFinish called when stream is aborted? — vercel/ai