Avatar for the langchain-ai user
langchain-ai
langchain
BlogDocsChangelog

Performance History

Latest Results

release(langchain): 1.4.10 Require langchain-core 1.7.7 for the latest deserialization fixes. Co-authored-by: Robin <open-swe@users.noreply.github.com>
release/langchain-1.4.10
9 hours ago
fix(langchain): keep middleware-internal model calls off the `messages` stream (#41579) Fixes #34139 Fixes #34382 Supersedes #34351 (@Manju080); also replaces #34501 (@devbyteai) and #35339 (@Nitin75408), which cleared callbacks and broke tracing/other handlers. Thanks @nick-youngblut and @Allaoua9 for the reports. `SummarizationMiddleware`, `LLMToolEmulator` and `LLMToolSelectorMiddleware` no longer leak their internal model output into `stream_mode="messages"`. The calls are tagged `nostream` and remain visible in traces and `astream_events`. To track their progress or tokens, use `astream_events` or a callback like `UsageMetadataCallbackHandler`. --- ## Problem Three middleware make their own model calls behind the scenes: - `SummarizationMiddleware` writes a conversation summary - `LLMToolEmulator` invents a tool's output - `LLMToolSelectorMiddleware` picks tools for the next turn With `agent.stream(..., stream_mode="messages")`, those tokens show up in the agent's stream, so a chat UI displays the summary, fake tool output or selection JSON as if the agent said it. Both issues were closed after #39252, but that only fixed `stream_events` v3; `stream_mode="messages"` still leaks. ## Fix - Tag each internal call `nostream`. LangGraph already drops tagged runs from the `messages` stream (and v3). Matches langchain-ai/langchainjs#11331. - Calls stay in LangSmith traces and `astream_events`, and keep `lc_source` / `lc_internal_call` metadata. - Remove the now-unused `InternalCallTransformer` registrations on these three middleware (the class itself stays). ```text before: 'SUMMARY-TEXTFinal answer.' after: 'Final answer.' ``` ## Heads up - Anything reading these tokens from the `messages` stream stops seeing them. deepagents-code does (compaction spinner, `/cost`); paired deepagents changes should ship before or with this.
master
10 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
release(langchain): 1.4.10#41778
9 hours ago
5f43b39
release/langchain-1.4.10
CodSpeed Performance Gauge
0%
9 hours ago
7d17edd
mdrxy/langchain/explain-baseten-minimum
CodSpeed Performance Gauge
0%
release(core): 1.7.7#41776
10 hours ago
ac59940
release/core-1.7.7
漏 2026 CodSpeed Technology
Home Terms Privacy Docs