# LangChain

**URL:** https://forum.langchain.com/c/oss-product-help-lc-and-lg/langchain/14.md?page=3

[Latest](https://forum.langchain.com/latest.md) · [Categories](https://forum.langchain.com/categories.md) · [Tags](https://forum.langchain.com/tags.md)

**Page:** 4

---

## [Complete context compression through middleware](https://forum.langchain.com/t/complete-context-compression-through-middleware/3221)

<div class="topic-metadata">

**Author:** [@Huimin-station](https://forum.langchain.com/u/Huimin-station)\
**Replies:** 2\
**Last updated:** [March 19, 2026, 6:12pm UTC](https://forum.langchain.com/t/complete-context-compression-through-middleware/3221 "2026-03-19T18:12:06Z")

</div>

I am trying to use middleware to summarize and compress context. But it is appended by default. If I want to override it, what should I do? This is my code; it is appended by default. from langchain.agents.middleware im…

---

## [Token are sent at a random order when rejoin a stream with VueJS](https://forum.langchain.com/t/token-are-sent-at-a-random-order-when-rejoin-a-stream-with-vuejs/3207)

<div class="topic-metadata">

**Author:** [@Jourdelune](https://forum.langchain.com/u/Jourdelune)\
**Replies:** 4\
**Last updated:** [March 19, 2026, 7:52am UTC](https://forum.langchain.com/t/token-are-sent-at-a-random-order-when-rejoin-a-stream-with-vuejs/3207 "2026-03-19T07:52:59Z")

</div>

Hello, I tried to replicate the code in Join & rejoin streams - Docs by LangChain but I have an issue. When I rejoin a stream, the token of the run id are sent at a random order. I checked the EventStream content and h…

---

## [langChain createAgent giving error in typescript](https://forum.langchain.com/t/langchain-createagent-giving-error-in-typescript/3199)

<div class="topic-metadata">

**Author:** [@AgoDoo](https://forum.langchain.com/u/AgoDoo)\
**Replies:** 1\
**Last updated:** [March 17, 2026, 5:41pm UTC](https://forum.langchain.com/t/langchain-createagent-giving-error-in-typescript/3199 "2026-03-17T17:41:09Z")

</div>

Hello, I’m new to langChain and I’m experimenting some basic feature building a simple RAG agent. Using the sample code at Build a RAG agent with LangChain - Docs by LangChain I have an issue importing CreateAgent. In …

---

## [Created\_at column for PostgreSaver checkpointer](https://forum.langchain.com/t/created-at-column-for-postgresaver-checkpointer/3197)

<div class="topic-metadata">

**Author:** [@mehdi1514](https://forum.langchain.com/u/mehdi1514)\
**Replies:** 1\
**Last updated:** [March 17, 2026, 3:40pm UTC](https://forum.langchain.com/t/created-at-column-for-postgresaver-checkpointer/3197 "2026-03-17T15:40:37Z")

</div>

Hi. I am using PostgresSaver checkpointer to add memory to my agent. I am using the checkpointer in my code and have setup the tables required for the checkpointer using drizzle ORM. Everything is working fine but I also…

---

## [How to populate stream.messages with existing thread\_id history in useStream (Vue/React)?](https://forum.langchain.com/t/how-to-populate-stream-messages-with-existing-thread-id-history-in-usestream-vue-react/3194)

<div class="topic-metadata">

**Author:** [@Jourdelune](https://forum.langchain.com/u/Jourdelune)\
**Replies:** 5\
**Last updated:** [March 17, 2026, 2:49pm UTC](https://forum.langchain.com/t/how-to-populate-stream-messages-with-existing-thread-id-history-in-usestream-vue-react/3194 "2026-03-17T14:49:14Z")

</div>

Hi LangChain community, Using @langchain/langgraph-sdk useStream hook with Vue/React. When I do stream.switchThread('existing-thread-id'), stream.messages stays empty, no history loads. How do I populate stream.messa…

---

## [LangGraph agent invoke returns empty content and response\_metadata with Kimi-K2.5 on Azure Foundry](https://forum.langchain.com/t/langgraph-agent-invoke-returns-empty-content-and-response-metadata-with-kimi-k2-5-on-azure-foundry/3181)

<div class="topic-metadata">

**Author:** [@JNSAPH](https://forum.langchain.com/u/JNSAPH)\
**Replies:** 10\
**Last updated:** [March 17, 2026, 11:40am UTC](https://forum.langchain.com/t/langgraph-agent-invoke-returns-empty-content-and-response-metadata-with-kimi-k2-5-on-azure-foundry/3181 "2026-03-17T11:40:41Z")

</div>

Hi everyone! I wanted to try and build a fairly simple agent using LangGraph that does some Tool Calls. But I’ve been running into some Issues where the Response of the .invoke function i would get would be missing Data.…

---

## [An exception issue related to the invocation of tools via ChatopenAI()](https://forum.langchain.com/t/an-exception-issue-related-to-the-invocation-of-tools-via-chatopenai/3193)

<div class="topic-metadata">

**Author:** [@Huimin-station](https://forum.langchain.com/u/Huimin-station)\
**Replies:** 4\
**Last updated:** [March 17, 2026, 10:43am UTC](https://forum.langchain.com/t/an-exception-issue-related-to-the-invocation-of-tools-via-chatopenai/3193 "2026-03-17T10:43:45Z")

</div>

When I use ChatOpenAI as the model for create\_agent, an exception occurs during tool invocation: after adding ToolMessages (where the content field is a list) to the messages list, the model throws a processing error ind…

---

## [Prevent last LLM call after tool calls](https://forum.langchain.com/t/prevent-last-llm-call-after-tool-calls/3063)

<div class="topic-metadata">

**Author:** [@eric-burel](https://forum.langchain.com/u/eric-burel)\
**Replies:** 7\
**Last updated:** [March 16, 2026, 2:11pm UTC](https://forum.langchain.com/t/prevent-last-llm-call-after-tool-calls/3063 "2026-03-16T14:11:12Z")

</div>

Hi folks, In a \`create\_agent\` loop, is it possible to prevent the very last LLM call to happen? For instance say that model wants to call tool 1, then tool 2 to solve an issue, with 2 rounds of the agentic loop. I’d l…

---

## [Lag between providers, docs and Python Langchain package releases](https://forum.langchain.com/t/lag-between-providers-docs-and-python-langchain-package-releases/3046)

<div class="topic-metadata">

**Author:** [@slackbits](https://forum.langchain.com/u/slackbits)\
**Replies:** 4\
**Last updated:** [March 16, 2026, 3:57am UTC](https://forum.langchain.com/t/lag-between-providers-docs-and-python-langchain-package-releases/3046 "2026-03-16T03:57:25Z")

</div>

I am setting up an graph that has a node that is using create\_agent. Because reasons, I need to have OpenRouter for local development and AWS Bedrock for production use. So I see langchain-aws and langchain-openrouter ex…

---

## [How to extract GPT-5 reasoning summaries with @langchain/openai?](https://forum.langchain.com/t/how-to-extract-gpt-5-reasoning-summaries-with-langchain-openai/1802)

<div class="topic-metadata">

**Author:** [@Nikfury](https://forum.langchain.com/u/Nikfury)\
**Replies:** 15\
**Last updated:** [March 15, 2026, 2:45pm UTC](https://forum.langchain.com/t/how-to-extract-gpt-5-reasoning-summaries-with-langchain-openai/1802 "2026-03-15T14:45:37Z")

</div>

I have been trying to extract reasoning summaries from GPT-5 using @langchainlangchain/openai. I saw Python langchain has this working (PR #30909), but I can’t figure out if the JS version supports it at all. I’m on @la…

---

## [Make ToolCallLimitMiddleware proactive via before\_model hook](https://forum.langchain.com/t/make-toolcalllimitmiddleware-proactive-via-before-model-hook/3168)

<div class="topic-metadata">

**Author:** [@29swastik](https://forum.langchain.com/u/29swastik)\
**Replies:** 1\
**Last updated:** [March 14, 2026, 5:40pm UTC](https://forum.langchain.com/t/make-toolcalllimitmiddleware-proactive-via-before-model-hook/3168 "2026-03-14T17:40:43Z")

</div>

The \`ToolCallLimitMiddleware\` is currently reactive, which means the limit logic is invoked after the limit is reached which has few downsides: This might make LLM to utilize tools less effectively since it is not awa…

---

## [AIMessage content is always empty string when tool calls are present — is this expected with gpt-4.1?](https://forum.langchain.com/t/aimessage-content-is-always-empty-string-when-tool-calls-are-present-is-this-expected-with-gpt-4-1/3159)

<div class="topic-metadata">

**Author:** [@chakka-guna-sekhar](https://forum.langchain.com/u/chakka-guna-sekhar)\
**Replies:** 4\
**Last updated:** [March 13, 2026, 2:07pm UTC](https://forum.langchain.com/t/aimessage-content-is-always-empty-string-when-tool-calls-are-present-is-this-expected-with-gpt-4-1/3159 "2026-03-13T14:07:31Z")

</div>

I’m using create\_agent from LangChain with gpt-4.1-2025-04-14 (via ChatOpenAI) and ToolStrategy for structured output. I’ve noticed that every AIMessage that contains tool\_calls always has content=' ' — there is no natu…

---

## [Challenges with Supervisor–Sub-Agent Architecture for Complex, Step-Driven Workflows in LangChain](https://forum.langchain.com/t/challenges-with-supervisor-sub-agent-architecture-for-complex-step-driven-workflows-in-langchain/2919)

<div class="topic-metadata">

**Author:** [@razaullah](https://forum.langchain.com/u/razaullah)\
**Replies:** 9\
**Last updated:** [March 12, 2026, 6:07pm UTC](https://forum.langchain.com/t/challenges-with-supervisor-sub-agent-architecture-for-complex-step-driven-workflows-in-langchain/2919 "2026-03-12T18:07:48Z")

</div>

Hi everyone, I’m currently working on a fairly large healthcare conversational use case and would appreciate advice from the community on architecture and best practices. Use Case Overview The assistant is expected to …

---

## [Clarification on Official Container Images, Supported Python Versions, and the Recommended LangGraph Deployment Path](https://forum.langchain.com/t/clarification-on-official-container-images-supported-python-versions-and-the-recommended-langgraph-deployment-path/2477)

<div class="topic-metadata">

**Author:** [@rahulduvedi](https://forum.langchain.com/u/rahulduvedi)\
**Replies:** 1\
**Last updated:** [March 12, 2026, 5:32pm UTC](https://forum.langchain.com/t/clarification-on-official-container-images-supported-python-versions-and-the-recommended-langgraph-deployment-path/2477 "2026-03-12T17:32:46Z")

</div>

Hi team, We’re trying to align our containerization strategy with the officially supported approach for LangChain/LangGraph, and we need clarification on what the upstream-supported path looks like today. Context The…

---

## [Problems encountered when constructing a chain with LangChain](https://forum.langchain.com/t/problems-encountered-when-constructing-a-chain-with-langchain/3142)

<div class="topic-metadata">

**Author:** [@Huimin-station](https://forum.langchain.com/u/Huimin-station)\
**Replies:** 3\
**Last updated:** [March 12, 2026, 3:29pm UTC](https://forum.langchain.com/t/problems-encountered-when-constructing-a-chain-with-langchain/3142 "2026-03-12T15:29:59Z")

</div>

When I was building a langchain chain, I encountered a problem. First, please take a look at my code below: async def main\_chain(): agent = await agent\_get() chain =(RunnableLambda(retriever\_get) | R…

---

## [On the official website or locally, is there a relatively standard directory structure for building agents?](https://forum.langchain.com/t/on-the-official-website-or-locally-is-there-a-relatively-standard-directory-structure-for-building-agents/3127)

<div class="topic-metadata">

**Author:** [@Huimin-station](https://forum.langchain.com/u/Huimin-station)\
**Replies:** 1\
**Last updated:** [March 11, 2026, 11:26am UTC](https://forum.langchain.com/t/on-the-official-website-or-locally-is-there-a-relatively-standard-directory-structure-for-building-agents/3127 "2026-03-11T11:26:31Z")

</div>

In constructing agents, mindful of the engineering rigor and uniformity of the codebase, I seek a reference to a standardized directory structure.

---

## [What are the recommendations for choosing a vector database when doing RAG?](https://forum.langchain.com/t/what-are-the-recommendations-for-choosing-a-vector-database-when-doing-rag/3128)

<div class="topic-metadata">

**Author:** [@Huimin-station](https://forum.langchain.com/u/Huimin-station)\
**Replies:** 1\
**Last updated:** [March 11, 2026, 11:21am UTC](https://forum.langchain.com/t/what-are-the-recommendations-for-choosing-a-vector-database-when-doing-rag/3128 "2026-03-11T11:21:28Z")

</div>

In the context of Retrieval-Augmented Generation (RAG), which vector databases would you recommend?

---

## [Elastic v7 deprecation version integration with tools for big data indexes](https://forum.langchain.com/t/elastic-v7-deprecation-version-integration-with-tools-for-big-data-indexes/3110)

<div class="topic-metadata">

**Author:** [@matpg](https://forum.langchain.com/u/matpg)\
**Replies:** 1\
**Last updated:** [March 10, 2026, 10:33am UTC](https://forum.langchain.com/t/elastic-v7-deprecation-version-integration-with-tools-for-big-data-indexes/3110 "2026-03-10T10:33:32Z")

</div>

Hi guys, I have a question. I’m working on a multi-agent AI system, powered entirely by Long Chain and the Supervisor and Handoff design pattern. The problem with my system is that the knowledge base is hosted on Elastic…

---

## [MangoDB error in RAG tutorial](https://forum.langchain.com/t/mangodb-error-in-rag-tutorial/2454)

<div class="topic-metadata">

**Author:** [@JayKayNJIT](https://forum.langchain.com/u/JayKayNJIT)\
**Replies:** 1\
**Last updated:** [March 9, 2026, 11:20am UTC](https://forum.langchain.com/t/mangodb-error-in-rag-tutorial/2454 "2026-03-09T11:20:01Z")

</div>

I am trying to reproduce RAG tutorial (https://docs.langchain.com/oss/javascript/langchain/get-help) in Colab but it is throwing following error.

---

## [Agent Chat UI stream reasoning and tool calls?](https://forum.langchain.com/t/agent-chat-ui-stream-reasoning-and-tool-calls/2522)

<div class="topic-metadata">

**Author:** [@bradyneal](https://forum.langchain.com/u/bradyneal)\
**Replies:** 1\
**Last updated:** [March 7, 2026, 7:36pm UTC](https://forum.langchain.com/t/agent-chat-ui-stream-reasoning-and-tool-calls/2522 "2026-03-07T19:36:33Z")

</div>

Can the Agent Chat UI stream reasoning summaries and tool calls (e.g. from OpenAI built-in web search tool and custom tools)? I don’t see it streaming the reasoning summaries or OpenAI built-in web search tool calls; I o…

---

## [Seems like streaming with multiple agents is totally broken](https://forum.langchain.com/t/seems-like-streaming-with-multiple-agents-is-totally-broken/3073)

<div class="topic-metadata">

**Author:** [@george32](https://forum.langchain.com/u/george32)\
**Replies:** 3\
**Last updated:** [March 6, 2026, 11:06pm UTC](https://forum.langchain.com/t/seems-like-streaming-with-multiple-agents-is-totally-broken/3073 "2026-03-06T23:06:51Z")

</div>

I am using typedscript sdk to create main agent which uses tool call (lets imagine ask\_subagent). This tool creates separate new agent using “createAgent“ function. Both agents (main and subagent) use stream() method w…

---

## [LLM outputting a trajectory?](https://forum.langchain.com/t/llm-outputting-a-trajectory/3062)

<div class="topic-metadata">

**Author:** [@eric-burel](https://forum.langchain.com/u/eric-burel)\
**Replies:** 2\
**Last updated:** [March 5, 2026, 6:05pm UTC](https://forum.langchain.com/t/llm-outputting-a-trajectory/3062 "2026-03-05T18:05:34Z")

</div>

Hi folks, Are you aware of models to output a trajectory rather than tool calls? By a trajectory I mean : tool 1 with arguments tool 2 without arguments fully defined, as it expected tool 1 to run first tool 3…

---

## [Why can the model see the structured content returned by the MCP tool?](https://forum.langchain.com/t/why-can-the-model-see-the-structured-content-returned-by-the-mcp-tool/3076)

<div class="topic-metadata">

**Author:** [@hopegood](https://forum.langchain.com/u/hopegood)\
**Replies:** 13\
**Last updated:** [March 5, 2026, 2:55pm UTC](https://forum.langchain.com/t/why-can-the-model-see-the-structured-content-returned-by-the-mcp-tool/3076 "2026-03-05T14:55:11Z")

</div>

@mcp.tool(description=“Add two numbers”) def add(a: int, b: int) → CallToolResult: “”“Add two numbers”“” ‘’’ return ( \[{“type”: “text”, “text”: f"The sum of {a} and {b} is {a+b}"}\], {“result”: a + b} )

---

## [PR review being slow](https://forum.langchain.com/t/pr-review-being-slow/3071)

<div class="topic-metadata">

**Author:** [@gitbalaji](https://forum.langchain.com/u/gitbalaji)\
**Replies:** 2\
**Last updated:** [March 4, 2026, 2:59pm UTC](https://forum.langchain.com/t/pr-review-being-slow/3071 "2026-03-04T14:59:53Z")

</div>

Why its taking so much time for review ? i have 5 PRs pending for review and it has been there since Feb 19th. Are you guys closing the contributions ? I mean no need of contributors because of stability.

---

## [Does the cache param do anything when using create\_agent?](https://forum.langchain.com/t/does-the-cache-param-do-anything-when-using-create-agent/3065)

<div class="topic-metadata">

**Author:** [@ketiko](https://forum.langchain.com/u/ketiko)\
**Replies:** 3\
**Last updated:** [March 3, 2026, 8:34am UTC](https://forum.langchain.com/t/does-the-cache-param-do-anything-when-using-create-agent/3065 "2026-03-03T08:34:13Z")

</div>

The cache param when compiling a graph allows you to setup cache policies when you add nodes. However, I don’t see a way to add cache policies to the tools I add when using create\_agent. Internal it’s building the tool …

---

## [Upgrade Google Generative AI SDK integration from @google/generative-ai to @google/genai](https://forum.langchain.com/t/upgrade-google-generative-ai-sdk-integration-from-google-generative-ai-to-google-genai/2110)

<div class="topic-metadata">

**Author:** [@Ries0703](https://forum.langchain.com/u/Ries0703)\
**Replies:** 5\
**Last updated:** [March 2, 2026, 7:31pm UTC](https://forum.langchain.com/t/upgrade-google-generative-ai-sdk-integration-from-google-generative-ai-to-google-genai/2110 "2026-03-02T19:31:13Z")

</div>

The current integration of the Google Generative AI SDK in LangChain.js (via @google/generative-ai or equivalent) is tracking a library that is now deprecated. According to Google’s documentation: The legacy library @g…

---

## [Create\_stuff\_documents\_chain is not working with latest version of langchain(Version: 1.0.3)](https://forum.langchain.com/t/create-stuff-documents-chain-is-not-working-with-latest-version-of-langchain-version-1-0-3/2092)

<div class="topic-metadata">

**Author:** [@PallaviPadav](https://forum.langchain.com/u/PallaviPadav)\
**Replies:** 4\
**Last updated:** [February 27, 2026, 8:35pm UTC](https://forum.langchain.com/t/create-stuff-documents-chain-is-not-working-with-latest-version-of-langchain-version-1-0-3/2092 "2026-02-27T20:35:45Z")

</div>

When I tried to import create\_stuff\_documents\_chain, I’m getting the error ModuleNotFoundError: No module named ‘langchain.chains’. Please help me to resolve. I’m using the latest version of langchain (Version: 1.0.3) N…

---

## [Why can't my 'langgraph cli' load 'checkpointer'](https://forum.langchain.com/t/why-cant-my-langgraph-cli-load-checkpointer/3043)

<div class="topic-metadata">

**Author:** [@kun1s2](https://forum.langchain.com/u/kun1s2)\
**Replies:** 4\
**Last updated:** [February 27, 2026, 11:28am UTC](https://forum.langchain.com/t/why-cant-my-langgraph-cli-load-checkpointer/3043 "2026-02-27T11:28:40Z")

</div>

‘Checkpointer’ cannot load and is not displayed in the log,But my store loaded and displayed the logs

---

## [LangChain Messages : Content vs ContentBlocks properties](https://forum.langchain.com/t/langchain-messages-content-vs-contentblocks-properties/2377)

<div class="topic-metadata">

**Author:** [@ddewaele](https://forum.langchain.com/u/ddewaele)\
**Replies:** 8\
**Last updated:** [February 26, 2026, 6:49pm UTC](https://forum.langchain.com/t/langchain-messages-content-vs-contentblocks-properties/2377 "2026-02-26T18:49:59Z")

</div>

In the LangCainJS documentation it is stated Content blocks were introduced as a new property on messages in LangChain v1 to standardize content formats across providers while maintaining backward compatibility with exi…

---

## [Parsing error with structured output with model output](https://forum.langchain.com/t/parsing-error-with-structured-output-with-model-output/2985)

<div class="topic-metadata">

**Author:** [@Art](https://forum.langchain.com/u/Art)\
**Replies:** 3\
**Last updated:** [February 26, 2026, 9:40am UTC](https://forum.langchain.com/t/parsing-error-with-structured-output-with-model-output/2985 "2026-02-26T09:40:57Z")

</div>

I used the init\_chat\_model function to create an instance of a model, that I then add a Pydantic model for structured output using the with\_structured\_output method, and get the new model instance with the proper structu…

[Previous page](https://forum.langchain.com/c/oss-product-help-lc-and-lg/langchain/14.md?page=2)

[Next page](https://forum.langchain.com/c/oss-product-help-lc-and-lg/langchain/14.md?page=4)
