You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Heartbeat Vercel AI SDK streamed model calls only on the timer #515
Is your feature request related to a problem? Please describe.
invokeModelStreaming heartbeats on every stream part, on top of its heartbeat timer. The SDK sends the first heartbeat at once, so every streamed call sends one, however short it is. In Temporal Cloud, that heartbeat is an Action.
It also means heartbeatTimeout: 0 doesn't turn heartbeats off for streamed calls. They still heartbeat on each part.
This breaks the rule from #491: heartbeats come only from the timer, every half of the timeout, starting half the timeout into the call.
Describe the solution you'd like
Remove the per-part heartbeat. The timer already beats every half of the timeout while the call runs, so a slow stream still heartbeats in time. A call shorter than 5 seconds (half the 10-second default) then sends no heartbeat, and heartbeatTimeout: 0 sends none at all.
Additional context
The other two model Activities, invokeModel and invokeEmbeddingModel, already heartbeat only on the timer.
Activity
Heartbeat Vercel AI SDK streamed model calls only on the timer (tempo…