Skip to content

Say how to upgrade the Vercel AI SDK plugin from 1.0.0 with its heartbeat timeout - #552

Merged
campoy merged 2 commits into
mainfrom
docs/vercel-heartbeat-upgrade
Nov 16, 2026
Merged

campoy merged 2 commits into
mainfrom
docs/vercel-heartbeat-upgrade

Conversation

@campoy

@campoy campoy commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

What was changed

The Vercel AI SDK README now says how to upgrade from 1.0.0, and how to roll back, now that the model and embedding Activities get a 10-second heartbeat timeout by default (#510).

Why?

1.0.0 schedules these Activities with no heartbeat timeout. Its invokeModel and invokeEmbeddingModel never heartbeat, and its invokeModelStreaming heartbeats only when a stream part arrives (the only heartbeat() call in 1.0.0). But the timeout is recorded when a Workflow schedules the Activity, so whichever Worker runs it has to heartbeat. During a rolling upgrade, a call that a Workflow on the next version schedules and a 1.0.0 Worker runs fails with a heartbeat timeout after 10 seconds, and so does each retry.

Does replay break? No: core only compares an Activity's ID and type. But a passing replay doesn't mean mixed versions work. So the README now gives the same steps that #520 and #551 give for Google ADK Python and google-genai:

  • Upgrade the Workers that run the model Activities first. If the same Workers run Workflows too, deploy with heartbeatTimeout: 0 and remove it in a later deploy.
  • Before a rollback, deploy with heartbeatTimeout: 0, and wait for the calls scheduled before that deploy to finish.
  • Runs pinned with Worker Versioning avoid both.

Checklist

  1. No issue: a docs follow-up to Give Vercel AI SDK model and embedding calls a 10-second default heartbeat timeout #510, part of [Feature Request] Default heartbeat timeout for every plugin's own activities #491.

  2. How was this tested:
    Docs only. The conventions check and git diff --check pass. To check the claims, I read 1.0.0's code: it sets no heartbeatTimeout default, and its only heartbeat() call is in invokeModelStreaming's stream loop. On main, TemporalProviderOptions.default takes the ActivityOptions the example sets. [python/google_adk] breaking: give model calls a 10-second default heartbeat timeout #520 measured the failure itself on a local dev server: an Activity that doesn't heartbeat failed 10.02 seconds in, and both attempts of a retried one failed the same way.

  3. Any docs updates needed?
    This is the docs update. The 2.0.0 release notes should carry the same upgrade step.

…beat timeout

1.0.0 schedules the model and embedding Activities with no heartbeat
timeout, and only invokeModelStreaming heartbeats, once per stream part.
The 10-second timeout is recorded when a Workflow schedules the Activity,
so during a rolling upgrade a 1.0.0 Worker fails calls longer than 10
seconds. The README now says in which order to upgrade, how to roll back,
and how heartbeatTimeout: 0 bridges a deploy.
@campoy
campoy marked this pull request as ready for review November 14, 2026 22:35
@campoy
campoy requested a review from a team as a code owner November 14, 2026 22:35
Same steps, fewer words: the section goes from 19 lines to 12.
@campoy
campoy merged commit e86fa8c into main Nov 16, 2026
15 checks passed
@campoy
campoy deleted the docs/vercel-heartbeat-upgrade branch November 16, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants