Patch Changes
-
#10512
bbbfea1Thanks @hntrl! - fix(core): fix streaming chunk merge for providers withoutindexon tool call deltas_mergeListsnow falls back toid-based matching when items don't have anindexfield. Previously, providers routing through the OpenAI-compatible API withoutindexon streaming tool call deltas (e.g. Anthropic models viaChatOpenAI) would accumulate hundreds of individual raw deltas intool_call_chunksandadditional_kwargs.tool_callsinstead of merging them into a single entry per tool call. In a real trace with 3 concurrent subagents, this caused a single AI message to balloon from ~4KB to 146KB -- with 826 uncollapsed streaming fragments carrying a few bytes each.Also fixes
SystemMessage.concat()which used...thisto spread all instance properties (includinglc_kwargs) into the new constructor, causing each chainedconcat()call to nest one level deeper. After 7 middlewareconcat()calls (typical in deepagents), a 7KB system prompt would serialize to 81KB due to content being duplicated at every nesting level.