Skip to content

fix(core): preserve fullStream output after startup probe#1088

Merged
omeraplak merged 1 commit into
mainfrom
fix/stream-probe-preserve-fullstream
Feb 20, 2026
Merged

fix(core): preserve fullStream output after startup probe#1088
omeraplak merged 1 commit into
mainfrom
fix/stream-probe-preserve-fullstream

Conversation

@omeraplak

@omeraplak omeraplak commented Feb 20, 2026

Copy link
Copy Markdown
Member

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

For some ReadableStream-based providers, stream startup probing could consume/cancel the original fullStream.

In practice this could result in reasoning events being emitted but final answer text-delta chunks not reaching consumers before finish.

What is the new behavior?

Startup probing now uses a tee'd probe branch and preserves a passthrough stream for downstream consumption.

Agent.streamText() and Agent.streamObject() both now continue forwarding full stream output correctly after probing.

A regression test was added in packages/core/src/agent/agent.spec.ts to verify reasoning-delta, text-delta, and finish are all present after probe.

fixes (issue)

N/A

Notes for reviewers

  • Changeset: .changeset/green-lizards-wave.md
  • Validations run:
    • pnpm --filter @voltagent/core test:single src/agent/agent.spec.ts -t "Stream Text"
    • pnpm --filter @voltagent/core typecheck

Summary by cubic

Fixes stream startup probing to preserve fullStream on ReadableStream-based providers. Prevents early interruption so consumers receive reasoning, text, and finish events.

  • Bug Fixes
    • Probe uses ReadableStream.tee to read from a probe branch while passing through the main stream.
    • Added regression test to ensure reasoning-delta, text-delta, and finish are emitted after probing.

Written for commit e5cf231. Summary will update on new commits.

@changeset-bot

changeset-bot Bot commented Feb 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e5cf231

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@voltagent/core Patch

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

@ghost

This comment has been minimized.

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 3 files

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying voltagent with  Cloudflare Pages  Cloudflare Pages

Latest commit: e5cf231
Status: ✅  Deploy successful!
Preview URL: https://c1ca997b.voltagent.pages.dev
Branch Preview URL: https://fix-stream-probe-preserve-fu.voltagent.pages.dev

View logs

@omeraplak
omeraplak merged commit bb7f3f9 into main Feb 20, 2026
22 checks passed
@omeraplak
omeraplak deleted the fix/stream-probe-preserve-fullstream branch February 20, 2026 18:51
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.

1 participant