Vercel AI SDK: produce the system string to pass to generateText/streamText,
and an onFinish callback that persists the turn. Frameworks stay optional,
this returns plain values you spread into the SDK call.
onFinish is a streamText option; generateText has none, so call the callback yourself
with the result, or the turn is never saved.
Vercel AI SDK: produce the
systemstring to pass togenerateText/streamText, and anonFinishcallback that persists the turn. Frameworks stay optional, this returns plain values you spread into the SDK call.onFinishis astreamTextoption;generateTexthas none, so call the callback yourself with the result, or the turn is never saved.