StreamProcessor discards metadata from REASONING_MESSAGE_START
I maintainer di solito rispondono entro 1 giorno
@tombeckenham ci sta già lavorando.
Dal 9/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 3.2k
- Fork
- 361
- Merge medio
- 1g 15h
- PR unite (30g)
- 210
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/ai
-
summarize() sends temperature 0.3 to models that reject sampling parameters (e.g. claude-sonnet-5-5)Forse già presa @jherr l’ha presa 1 giorno fa. Apertahas-pr waiting-on: maintainer
TanStack/ai#1703 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
ai-openrouter: malformed Chat Completions tool arguments execute as an empty objectForse già presa @tombeckenham l’ha presa 2 giorni fa. Apertahas-pr waiting-on: maintainer
TanStack/ai#1689 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Async persistence restored before attach() never rejoins an in-flight runForse già presa @tombeckenham l’ha presa 5 giorni fa. Apertahas-pr waiting-on: maintainer
TanStack/ai#1639 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
`ai-opencode`: `RUN_FINISHED` never arrives when an adapter teardown step does not settleForse già presa @tombeckenham l’ha presa 5 giorni fa. Apertawaiting-on: maintainer
TanStack/ai#1638 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
ai-mcp: support publishing MCP list changes to subscribed clientsForse già presa @jherr l’ha presa 5 giorni fa. Apertawaiting-on: maintainer
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
TanStack/ai#1631 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Bayern feature:Application ready web
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
digitalfabrik/entitlementcard#3176 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NanmiCoder/cc-haha#1533 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug: Calendar work items cannot be opened on mobileForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100