StreamProcessor discards metadata from REASONING_MESSAGE_START
Maintainer thường phản hồi trong vòng 1 ngày
@tombeckenham đang làm issue này rồi.
Từ ngày 9/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
TanStack AI version
@tanstack/ai 0.66.0, installed from npm in an isolated directory.
The same behavior also occurs on main commit 96191eafee12040c78f849fe7d47220f64591684.
Framework/Library version
Node.js 26.6.0, with a bare StreamProcessor.
The reproduction does not need React, a provider, or an API key.
Describe the bug and the steps to reproduce it
Custom metadata on REASONING_MESSAGE_START does not survive conversion into a UIMessage.
The thinking text appears, but the resulting message has no metadata.
The reproduction uses one root run.
It compares the same metadata on two events:
- On
REASONING_MESSAGE_START: the metadata is lost. - On
REASONING_MESSAGE_CONTENT: the metadata is preserved.
Expected
The metadata remains available after processing the reasoning stream, consistently with the content-event case.
Actual
UIMessage.metadata is undefined when only the start event carries the metadata.
Steps
- Download the files from the reproduction gist.
- Run
npm install --ignore-scripts --no-audit --no-fund. - Run
npm run metadata.
The script first checks the content-event control.
That check passes.
The assertion for the start event then fails:
Metadata on START: undefined
Metadata on CONTENT: { source: 'reasoning', traceId: 'trace-1' }
AssertionError [ERR_ASSERTION]: Metadata on reasoning start is lost
Source
The dispatcher ignores REASONING_MESSAGE_START.
The content handler only merges metadata from the content event.
Please clarify the intended destination for reasoning-start metadata: the owning UIMessage or its ThinkingPart.
At present, neither exposes it.
Related issue
#1533 concerns reasoning ownership across different messages.
This report isolates metadata loss in one run.
Our local workaround copies the metadata onto reasoning content events.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
Complete runnable reproduction: metadata.mjs, package.json, and instructions
The package version is pinned to 0.66.0.
The second script in the gist provides an additional reproduction for #1533.
Screenshots or Videos (Optional)
No screenshot is needed for this framework-independent reproduction.
Do you intend to try to help solve this bug with your own PR?
Maybe, I'll investigate and start debugging.
No PR accompanies this report.
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct.
- I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.2k
- Fork
- 361
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 210
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/ai
-
summarize() sends temperature 0.3 to models that reject sampling parameters (e.g. claude-sonnet-5-5)Có thể đã có người làm @jherr đã nhận 2 ngày trước. Đang mởhas-pr waiting-on: maintainer
TanStack/ai#1703 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-openrouter: malformed Chat Completions tool arguments execute as an empty objectCó thể đã có người làm @tombeckenham đã nhận 3 ngày trước. Đang mởhas-pr waiting-on: maintainer
TanStack/ai#1689 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Async persistence restored before attach() never rejoins an in-flight runCó thể đã có người làm @tombeckenham đã nhận 6 ngày trước. Đang mởhas-pr waiting-on: maintainer
TanStack/ai#1639 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`ai-opencode`: `RUN_FINISHED` never arrives when an adapter teardown step does not settleCó thể đã có người làm @tombeckenham đã nhận 6 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1638 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-mcp: support publishing MCP list changes to subscribed clientsCó thể đã có người làm @jherr đã nhận 6 ngày trước. Đang mởwaiting-on: maintainer
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
TanStack/ai#1631 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
a2ui-project/a2ui#3158 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
hemilabs/ui-monorepo#2475 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
lingdojo/kana-dojo#32279 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
code-quality refactoring
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
github/gh-aw-firewall#9879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Arrow-key cursor movement in combined diff view doesn't scroll to keep the cursor visibleĐang mởos:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày