Skip to content

fix(vercel-ai-sdk): improve duplicate Activity errors and streaming response metadata - #485

Merged
moetemp merged 2 commits into
mainfrom
fix/vercel-ai-sdk-review-followups
Nov 13, 2026
Merged

moetemp merged 2 commits into
mainfrom
fix/vercel-ai-sdk-review-followups

Conversation

@moetemp

@moetemp moetemp commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

This PR fixes the points from my reviews of #162, #445 and #386.

  • The duplicate Activity error says where the other Activity is from and how to fix it. For two AiSdkPlugins, it suggests one modelProvider built with customProvider.
  • The duplicate error still shows if nativeWorker.initiateShutdown is missing.
  • AiSdkPlugin checks its own createActivities result, not a cast of options.activities.
  • Two AiSdkPlugins with workflowsPath don't fail in webpack anymore.
  • doStream drops an invalid timestamp.

Fixes #AI-963

Why?

The duplicate error didn't tell a user with two providers how to keep both. The rest are small gaps next to that code.

The stream keeps the same parts as before, so Workflow history doesn't change.

How did you test it?

  • Unit tests. make lint and make test pass in typescript/vercel-ai-sdk.

@moetemp
moetemp marked this pull request as ready for review November 11, 2026 17:30
@moetemp
moetemp requested a review from a team as a code owner November 11, 2026 17:30
Comment thread typescript/vercel-ai-sdk/README.md Resolved

@brianstrauch brianstrauch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The streaming change can break replay for existing workflows that issue commands based on metadata parts.

@moetemp
moetemp force-pushed the fix/vercel-ai-sdk-review-followups branch 2 times, most recently from 184b8a3 to 04d9304 Compare November 13, 2026 20:02
@moetemp
moetemp enabled auto-merge (squash) November 13, 2026 20:03
The duplicate errors did not tell users how to keep two providers or where the other Activity came from, and two plugins with workflowsPath failed in the bundler. The streaming path could emit an Invalid Date and an empty response-metadata part.
A Workflow that schedules a command for each stream part would fail replay without the part. The heartbeat version note applies to all plugins, so it does not go in one README.
@moetemp
moetemp force-pushed the fix/vercel-ai-sdk-review-followups branch from 04d9304 to 2604179 Compare November 13, 2026 20:52
@moetemp
moetemp merged commit 045abe0 into main Nov 13, 2026
15 checks passed
@moetemp
moetemp deleted the fix/vercel-ai-sdk-review-followups branch November 13, 2026 20:55
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