fix(core): treat empty tool chunk ids as missing in merge#35414
Merged
ccurme (ccurme) merged 6 commits intolangchain-ai:masterfrom Feb 24, 2026
Merged
Conversation
Merging this PR will degrade performance by 22.46%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | test_import_time[CallbackManager] |
286.4 ms | 325.5 ms | -12.01% |
| ❌ | WallTime | test_import_time[LangChainTracer] |
410.6 ms | 464.9 ms | -11.67% |
| ❌ | WallTime | test_import_time[InMemoryRateLimiter] |
158.6 ms | 178.1 ms | -10.95% |
| ❌ | WallTime | test_import_time[InMemoryVectorStore] |
552.5 ms | 623.6 ms | -11.4% |
| ❌ | WallTime | test_import_time[Runnable] |
444.5 ms | 504.4 ms | -11.87% |
| ❌ | WallTime | test_import_time[HumanMessage] |
239.3 ms | 269.5 ms | -11.19% |
| ❌ | WallTime | test_import_time[ChatPromptTemplate] |
549.8 ms | 648.3 ms | -15.2% |
| ❌ | WallTime | test_import_time[tool] |
473.5 ms | 559.6 ms | -15.39% |
| ❌ | WallTime | test_import_time[Document] |
172.1 ms | 192.3 ms | -10.47% |
| ❌ | WallTime | test_import_time[PydanticOutputParser] |
477.6 ms | 553.7 ms | -13.74% |
| ❌ | WallTime | test_async_callbacks_in_sync |
18.4 ms | 23.7 ms | -22.46% |
| ❌ | WallTime | test_import_time[RunnableLambda] |
442 ms | 501.5 ms | -11.86% |
| ❌ | WallTime | test_import_time[BaseChatModel] |
482.7 ms | 547.5 ms | -11.83% |
Comparing T1mn:fix/core-tool-call-chunk-empty-id-merge (d5eb8ff) with master (4ffb584)
Footnotes
-
23 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
29 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #35395
Tool call chunk aggregation treated
id=""as a conflicting identifier, which prevented chunks with the sameindexfrom merging and could break streamed tool-argument reconstruction. This change treats empty ids as missing ids during list merge so chunks continue to merge correctly.How did you verify your code works?
uv run --project libs/core --group test pytest libs/core/tests/unit_tests/test_messages.py::test_message_chunksuv run --project libs/core --group test pytest libs/core/tests/unit_tests/test_messages.pyBreaking changes
Depends on