Skip to content

fix(ai): resume input-streaming tool calls#17025

Open
iroiro147 wants to merge 1 commit into
vercel:mainfrom
iroiro147:fix/ui-resume-static-tool-14027
Open

fix(ai): resume input-streaming tool calls#17025
iroiro147 wants to merge 1 commit into
vercel:mainfrom
iroiro147:fix/ui-resume-static-tool-14027

Conversation

@iroiro147

@iroiro147 iroiro147 commented Jul 9, 2026

Copy link
Copy Markdown

Summary

  • Seed resumed UI message stream state from existing input-streaming tool parts.
  • Continue tool-input-delta chunks for both static and dynamic tool calls after hydration.
  • Add regression coverage for resuming in-progress static and dynamic tool inputs.

Closes #14027.

Tests

  • pnpm -C packages/ai exec vitest --config vitest.node.config.js --run src/ui/process-ui-message-stream.test.ts
  • pnpm -C packages/ai exec vitest --config vitest.edge.config.js --run src/ui/process-ui-message-stream.test.ts
  • pnpm -C packages/ai type-check
  • pnpm --filter ai build
  • pnpm exec oxfmt --check packages/ai/src/ui/process-ui-message-stream.ts packages/ai/src/ui/process-ui-message-stream.test.ts .changeset/chat-resume-tool-input.md
  • pnpm exec oxlint packages/ai/src/ui/process-ui-message-stream.ts packages/ai/src/ui/process-ui-message-stream.test.ts --deny-warnings
  • pnpm changeset status --since origin/main
  • git diff --check

continue;
}

const rawInput = (part as { rawInput?: unknown }).rawInput;

@vercel vercel Bot Jul 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The resume input-streaming tool calls feature never works in a real flow because rawInput is never persisted on input-streaming tool parts during the initial stream (and would be stripped by validateUIMessages even if present), so the resumed partial JSON always starts from an empty string.

Fix on Vercel

Signed-off-by: iroiro147 <sarthak.singh@juspay.in>
@iroiro147 iroiro147 force-pushed the fix/ui-resume-static-tool-14027 branch from 148aaec to aad6915 Compare July 10, 2026 01:26
@iroiro147 iroiro147 changed the title fix(ui): resume input-streaming tool calls fix(ai): resume input-streaming tool calls Jul 10, 2026
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.

Resume of partial static tool calls crashes in createStreamingUIMessageState

1 participant