fix(core): strip tool output provider metadata from direct UI stream#1339
fix(core): strip tool output provider metadata from direct UI stream#1339liuzemei wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 8e02def The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughThis PR strips ChangesProvider Metadata Stripping for Tool-Output Chunks
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
1 issue found across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Addressed the cancellation feedback in the latest commits: the direct UI stream sanitizer now uses a TransformStream pipeline so cancellation propagates to the source stream, and there is a regression test covering reader.cancel(). |
Summary
providerMetadatafrom directresult.toUIMessageStream()tool output chunks fortool-output-availableandtool-output-errorCloses #1290
Tests
pnpm install --frozen-lockfile --ignore-scriptspnpm --dir packages/internal buildpnpm --dir packages/core test:single src/agent/agent.spec.ts src/agent/streaming/guardrail-stream.spec.tspnpm --dir packages/core typecheckpnpm --dir packages/core lintSummary by cubic
Stop leaking provider metadata to console clients by stripping it from direct UI stream tool output chunks in
@voltagent/core. Guardrail and full-stream paths are unchanged for #1195. Closes #1290.providerMetadatafromtool-output-availableandtool-output-errorin directresult.toUIMessageStream().Written for commit 8e02def. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests