fix: separate content across streaming tool turns - #1861
Conversation
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
bcad081 to
8829434
Compare
|
@arnabnandy7 ... for thinking streaming mode, works as expected: abc....xyx bla bla bla NL ==> StreamEvent.Think ==xyx I may consider new interceptor in futurure to give developer both ==> getting stream with existing events AND aggregate, but this aggregation will be totally separately will not touch streaming logic. Thanks. |
Should I close the issue and PR/mark it as draft for now? |
@arnabnandy7 please keep as a draft this week, and I appreciate patience and cooperation. will resume streaming track after release. thanks |
Summary
Preserves native reasoning across streaming tool-call turns and prevents content from adjacent inference turns being merged into a single line.
This completes the native-thinking follow-up identified during #1826.
Fixes #1860.
Problem
The streaming tool loop flattened content from consecutive inference turns into a single
Flux<String>.This caused two related problems:
metadata["thinking"] = true, but the adapter converted every chunk into an ordinaryLlmInferenceStreamEvent.Content. The text remained visible, but its native-thinking identity was lost.Changes
LlmInferenceStreamEvent.Thinking.StreamingEvent.Thinkingstream.Flux<String>streaming contract compatible.Testing
Added focused coverage for:
Executed:
Result: