LangChain: V3 Streaming Message Assembly Fixes
Two critical fixes merged for LangChain's v3 streaming implementation, addressing data loss issues where reasoning blocks and additional metadata were being dropped during message assembly with providers like Gemini.
Duration: PT1M49S
Transcript
Good morning, this is your LangChain developer briefing for May 15th, 2026.
Nick Hollon merged two important fixes to the core streaming infrastructure yesterday. The first, PR #37434, resolves a bug where reasoning blocks were silently dropped from AI messages during v3 streaming when tool calls were present. This particularly affected Gemini 2.5 Pro users with include_thoughts enabled - reasoning would stream correctly but disappear from the final message state. The root cause was in the compatibility bridge's block grouping logic, which used positional indexing that caused reasoning and tool_call blocks to overwrite each other when providers didn't supply explicit indices.
The second fix, PR #37435, addresses additional_kwargs being lost during v3 stream assembly. This created a divergence between streaming and non-streaming behavior for providers that use additional_kwargs to carry metadata outside the standard protocol blocks. For Gemini specifically, this meant losing function call thought signatures required for multi-turn reasoning continuity, potentially causing regenerated thinking and additional token charges.
Both fixes are provider-agnostic and maintain backward compatibility. The reasoning fix uses composite keys to prevent block collision, while the additional_kwargs fix follows the existing pattern for metadata extensions in the compatibility bridge.
What's next: These fixes should restore feature parity between streaming and non-streaming modes for affected providers. Teams using v3 streaming with Gemini or other providers that leverage additional_kwargs should see immediate improvements in message assembly consistency.
That's your update for today. We'll be back tomorrow with more LangChain development news.