# LangChain

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

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

---

## [About the LangChain category](https://forum.langchain.com/t/about-the-langchain-category/38)

<div class="topic-metadata">

**Author:** [@jess](https://forum.langchain.com/u/jess)\
**Replies:** 0\
**Last updated:** [June 27, 2025, 9:09pm UTC](https://forum.langchain.com/t/about-the-langchain-category/38 "2025-06-27T21:09:01Z")

</div>

Questions, issues, and/or discussions regarding LangChain.

---

## [AgentLens — free, local-only CLI to audit what your LangChain agent actually did](https://forum.langchain.com/t/agentlens-free-local-only-cli-to-audit-what-your-langchain-agent-actually-did/4551)

<div class="topic-metadata">

**Author:** [@subhash-0000](https://forum.langchain.com/u/subhash-0000)\
**Replies:** 14\
**Last updated:** [November 16, 2026, 9:10am UTC](https://forum.langchain.com/t/agentlens-free-local-only-cli-to-audit-what-your-langchain-agent-actually-did/4551 "2026-11-16T09:10:54Z")

</div>

Been building with LangChain agents and kept running into the same problem: once an agent runs, I have no real record of what it decided, which tools it called, why, how long each step took, or what it cost. If something…

---

## [How are you handling governance for production LangChain agents? (PII, cost caps, tool safety)](https://forum.langchain.com/t/how-are-you-handling-governance-for-production-langchain-agents-pii-cost-caps-tool-safety/4315)

<div class="topic-metadata">

**Author:** [@nagasatish](https://forum.langchain.com/u/nagasatish)\
**Replies:** 8\
**Last updated:** [November 16, 2026, 12:56am UTC](https://forum.langchain.com/t/how-are-you-handling-governance-for-production-langchain-agents-pii-cost-caps-tool-safety/4315 "2026-11-16T00:56:25Z")

</div>

Curious how others are approaching governance for LangChain agents in production — specifically: PII leaking through RAG pipelines When a retriever pulls documents containing customer data (SSNs, emails, credit cards)…

---

## [GPT-OSS-120b Tool calling issue ( Empty content and tool\_calls in response )](https://forum.langchain.com/t/gpt-oss-120b-tool-calling-issue-empty-content-and-tool-calls-in-response/5067)

<div class="topic-metadata">

**Author:** [@nileshapsingkar](https://forum.langchain.com/u/nileshapsingkar)\
**Replies:** 5\
**Last updated:** [November 11, 2026, 6:32pm UTC](https://forum.langchain.com/t/gpt-oss-120b-tool-calling-issue-empty-content-and-tool-calls-in-response/5067 "2026-11-11T18:32:18Z")

</div>

I have gpt-oss-120b hosted on azure and use AzureChatOpenAI for model invokes. The model has 2 tools ( with simple 2 keys arguments ) bind to it and for some reason it fails to provide any content and tool\_calls in its …

---

## [Text-splitters: add\_start\_index returns wrong position for duplicate chunks (#41190), happy to work on a fix](https://forum.langchain.com/t/text-splitters-add-start-index-returns-wrong-position-for-duplicate-chunks-41190-happy-to-work-on-a-fix/5140)

<div class="topic-metadata">

**Author:** [@SANJANAKUMARI83](https://forum.langchain.com/u/SANJANAKUMARI83)\
**Replies:** 1\
**Last updated:** [November 9, 2026, 5:20pm UTC](https://forum.langchain.com/t/text-splitters-add-start-index-returns-wrong-position-for-duplicate-chunks-41190-happy-to-work-on-a-fix/5140 "2026-11-09T17:20:27Z")

</div>

Hi everyone! I’m Sanjana, an IIT Graduate , AI/ML engineer from India working on LLM systems and RAG pipelines, and I’m starting to contribute to LangChain. I recently reported a bug in text-splitters: text-splitters: a…

---

## [\[JS\] @langchain/qdrant: add a hybrid retrieval mode (parity with langchain-qdrant for Python)](https://forum.langchain.com/t/js-langchain-qdrant-add-a-hybrid-retrieval-mode-parity-with-langchain-qdrant-for-python/5041)

<div class="topic-metadata">

**Author:** [@valeriocomo](https://forum.langchain.com/u/valeriocomo)\
**Replies:** 6\
**Last updated:** [November 9, 2026, 9:56am UTC](https://forum.langchain.com/t/js-langchain-qdrant-add-a-hybrid-retrieval-mode-parity-with-langchain-qdrant-for-python/5041 "2026-11-09T09:56:36Z")

</div>

Summary Since July 2024 the Python QdrantVectorStore has a retrieval\_mode option, with dense, sparse and hybrid modes (langchain#24164). @langchain/qdrant for JS (1.0.3) still writes and queries a single unnamed dense ve…

---

## [Tool error is automatically handled by langchain agent](https://forum.langchain.com/t/tool-error-is-automatically-handled-by-langchain-agent/5003)

<div class="topic-metadata">

**Author:** [@MSJavaScript](https://forum.langchain.com/u/MSJavaScript)\
**Replies:** 8\
**Last updated:** [November 8, 2026, 5:20pm UTC](https://forum.langchain.com/t/tool-error-is-automatically-handled-by-langchain-agent/5003 "2026-11-08T17:20:23Z")

</div>

Hello, I am debugging my code, I want get error informations when a error occured. I didn’t add any middleware, but I got a message below for a tool Error invoking tool 'planner' with kwargs..., Please fix the error and…

---

## [HITL Middleware per-call edited arguments are not saved](https://forum.langchain.com/t/hitl-middleware-per-call-edited-arguments-are-not-saved/4973)

<div class="topic-metadata">

**Author:** [@JuR-0](https://forum.langchain.com/u/JuR-0)\
**Replies:** 1\
**Last updated:** [October 30, 2026, 7:18pm UTC](https://forum.langchain.com/t/hitl-middleware-per-call-edited-arguments-are-not-saved/4973 "2026-10-30T19:18:19Z")

</div>

Hey there, In the new per-call middleware, in edit mode the modified arguments are only “saved” in an unstructured fashion with the note inserted in front of the tool result. In the context of a chat application it make…

---

## [Finding reviewers for three LangChain.js provider fixes](https://forum.langchain.com/t/finding-reviewers-for-three-langchain-js-provider-fixes/4835)

<div class="topic-metadata">

**Author:** [@mbarinov](https://forum.langchain.com/u/mbarinov)\
**Replies:** 1\
**Last updated:** [October 30, 2026, 5:46pm UTC](https://forum.langchain.com/t/finding-reviewers-for-three-langchain-js-provider-fixes/4835 "2026-10-30T17:46:19Z")

</div>

Hi! I have three bug-fix PRs in langchain-ai/langchainjs awaiting review: #11889 — Ollama standard image content blocks: supports standard image inputs in ChatOllama. #11900 — xAI streaming token usage: fixes double-co…

---

## [Gemini emits unregistered parallel tool calls with ToolStrategy and nested structured output](https://forum.langchain.com/t/gemini-emits-unregistered-parallel-tool-calls-with-toolstrategy-and-nested-structured-output/4852)

<div class="topic-metadata">

**Author:** [@saytoaditya](https://forum.langchain.com/u/saytoaditya)\
**Replies:** 1\
**Last updated:** [October 30, 2026, 5:37pm UTC](https://forum.langchain.com/t/gemini-emits-unregistered-parallel-tool-calls-with-toolstrategy-and-nested-structured-output/4852 "2026-10-30T17:37:56Z")

</div>

I’m using LangChain with ChatVertexAI and Gemini 2.5 Flash. A specialist agent returns a nested Pydantic response using ToolStrategy, and also has one real tool available on some requests. Simplified setup: class Segme…

---

## [Feature request: support reasoning effort in ChatMistralAI (JavaScript)](https://forum.langchain.com/t/feature-request-support-reasoning-effort-in-chatmistralai-javascript/4982)

<div class="topic-metadata">

**Author:** [@Arnall](https://forum.langchain.com/u/Arnall)\
**Replies:** 0\
**Last updated:** [October 30, 2026, 1:04pm UTC](https://forum.langchain.com/t/feature-request-support-reasoning-effort-in-chatmistralai-javascript/4982 "2026-10-30T13:04:34Z")

</div>

Hi everyone, I’d like to propose exposing a typed reasoningEffort option in the JavaScript ChatMistralAI integration. The Mistral SDK exposes this request parameter, but @langchain/mistralai 1.2.0 does not expose it th…

---

## [Feature request: support standard image and file content blocks in ChatMistralAI (JavaScript)](https://forum.langchain.com/t/feature-request-support-standard-image-and-file-content-blocks-in-chatmistralai-javascript/4981)

<div class="topic-metadata">

**Author:** [@Arnall](https://forum.langchain.com/u/Arnall)\
**Replies:** 0\
**Last updated:** [October 30, 2026, 12:57pm UTC](https://forum.langchain.com/t/feature-request-support-standard-image-and-file-content-blocks-in-chatmistralai-javascript/4981 "2026-10-30T12:57:42Z")

</div>

Hi everyone, I’d like to propose adding support for LangChain’s standard image and file content blocks to the JavaScript ChatMistralAI integration. Use Case Applications that work with multiple model providers benefit …

---

## [Recommended configuration for ModelRetryMiddleware: rationale and trade-offs](https://forum.langchain.com/t/recommended-configuration-for-modelretrymiddleware-rationale-and-trade-offs/4972)

<div class="topic-metadata">

**Author:** [@Abdullah](https://forum.langchain.com/u/Abdullah)\
**Replies:** 1\
**Last updated:** [October 30, 2026, 3:24am UTC](https://forum.langchain.com/t/recommended-configuration-for-modelretrymiddleware-rationale-and-trade-offs/4972 "2026-10-30T03:24:20Z")

</div>

Context. We’re building an agent with tool calls on a hosted model. We want to use ModelRetryMiddleware rather than hand written loops, but there are many parameters and the defaults aren’t explained in terms of cost or …

---

## [A proposal to add token-usage budgets to LangChain agents via a new middleware, since the existing limiters only cap call count, not tokens](https://forum.langchain.com/t/a-proposal-to-add-token-usage-budgets-to-langchain-agents-via-a-new-middleware-since-the-existing-limiters-only-cap-call-count-not-tokens/4147)

<div class="topic-metadata">

**Author:** [@Juyotal](https://forum.langchain.com/u/Juyotal)\
**Replies:** 4\
**Last updated:** [October 28, 2026, 5:29pm UTC](https://forum.langchain.com/t/a-proposal-to-add-token-usage-budgets-to-langchain-agents-via-a-new-middleware-since-the-existing-limiters-only-cap-call-count-not-tokens/4147 "2026-10-28T17:29:07Z")

</div>

Feature Description LangChain’s agent middleware suite can cap the number of model calls (ModelCallLimitMiddleware) and tool calls (ToolCallLimitMiddleware), but nothing bounds token consumption. I’d like a TokenBudge…

---

## [Does langchain-openai support passing Gemini 3’s thought-signatures metadata via OpenRouter？](https://forum.langchain.com/t/does-langchain-openai-support-passing-gemini-3-s-thought-signatures-metadata-via-openrouter/2271)

<div class="topic-metadata">

**Author:** [@xiaohui](https://forum.langchain.com/u/xiaohui)\
**Replies:** 7\
**Last updated:** [October 28, 2026, 5:05pm UTC](https://forum.langchain.com/t/does-langchain-openai-support-passing-gemini-3-s-thought-signatures-metadata-via-openrouter/2271 "2026-10-28T17:05:07Z")

</div>

We are currently calling various LLMs through the chain langchain-openai → OpenRouter → various models. The newly released Gemini 3 Pro requires passing back the thoughtSignatures parameter during tool calls, but this p…

---

## [Agent passes wrong data for the tool](https://forum.langchain.com/t/agent-passes-wrong-data-for-the-tool/4731)

<div class="topic-metadata">

**Author:** [@piotrmorek](https://forum.langchain.com/u/piotrmorek)\
**Replies:** 11\
**Last updated:** [October 28, 2026, 2:04pm UTC](https://forum.langchain.com/t/agent-passes-wrong-data-for-the-tool/4731 "2026-10-28T14:04:09Z")

</div>

Quick question, I have an agent (typical ReAct agent, system prompt + some tools to get the job done) that gets a list of entities, user select one entity by typing eg. “the 3rd one”, then agent needs to call another too…

---

## [There is no way to use custom filters like \`@\>\` with \`PGVectorStore\`](https://forum.langchain.com/t/there-is-no-way-to-use-custom-filters-like-with-pgvectorstore/4594)

<div class="topic-metadata">

**Author:** [@wbyoung](https://forum.langchain.com/u/wbyoung)\
**Replies:** 2\
**Last updated:** [October 27, 2026, 4:31pm UTC](https://forum.langchain.com/t/there-is-no-way-to-use-custom-filters-like-with-pgvectorstore/4594 "2026-10-27T16:31:45Z")

</div>

It appears that it would be easy to subclass PGVectorStore and add support for custom operations via the filters if the buildFilterClauses method were not private. I’m new to the community. Is this the right place to di…

---

## [Unable to apply discount coupon while booking LCAE exam](https://forum.langchain.com/t/unable-to-apply-discount-coupon-while-booking-lcae-exam/4633)

<div class="topic-metadata">

**Author:** [@cjcheema](https://forum.langchain.com/u/cjcheema)\
**Replies:** 8\
**Last updated:** [October 27, 2026, 4:28pm UTC](https://forum.langchain.com/t/unable-to-apply-discount-coupon-while-booking-lcae-exam/4633 "2026-10-27T16:28:39Z")

</div>

Hi Team I am trying to use discount code LCAE50 while booking the LCAE exam but it is showing me an invalid coupon code: Therefore, can you please share me the similar discount code so that I can book the exam now. …

---

## [How are you handling auditability and policy enforcement in multi-step agents?](https://forum.langchain.com/t/how-are-you-handling-auditability-and-policy-enforcement-in-multi-step-agents/3904)

<div class="topic-metadata">

**Author:** [@Tanishq1030](https://forum.langchain.com/u/Tanishq1030)\
**Replies:** 11\
**Last updated:** [October 27, 2026, 4:25pm UTC](https://forum.langchain.com/t/how-are-you-handling-auditability-and-policy-enforcement-in-multi-step-agents/3904 "2026-10-27T16:25:50Z")

</div>

Hey LangChain community, As more of us move agents into production — especially those with tool calling, memory, and real-world actions — the gap between “it works in the notebook” and “it’s safe, auditable, and complia…

---

## [How to stream a JSON by using a chat provider?](https://forum.langchain.com/t/how-to-stream-a-json-by-using-a-chat-provider/1638)

<div class="topic-metadata">

**Author:** [@daniel-style](https://forum.langchain.com/u/daniel-style)\
**Replies:** 3\
**Last updated:** [October 27, 2026, 3:19pm UTC](https://forum.langchain.com/t/how-to-stream-a-json-by-using-a-chat-provider/1638 "2026-10-27T15:19:46Z")

</div>

I want to use ChatAnthropic for the streaming output of Json, but it seems not supported? Here is my sample code, the Json is not streamed, and it was the last to come out. const model = new ChatAnthropic({ model: "…

---

## [Async graph creation function](https://forum.langchain.com/t/async-graph-creation-function/4767)

<div class="topic-metadata">

**Author:** [@eric-burel](https://forum.langchain.com/u/eric-burel)\
**Replies:** 2\
**Last updated:** [October 19, 2026, 3:32pm UTC](https://forum.langchain.com/t/async-graph-creation-function/4767 "2026-10-19T15:32:45Z")

</div>

Hey folks, I fail to figure how you’re expected to build a graph from an async function, in the context of a LangGraph app. Documentation often shows using \`ainvoke\` etc. but when creating an actual LangGraph Server you…

---

## [feat(core): forward document metadata to embedding implementations to enable multimodal providers](https://forum.langchain.com/t/feat-core-forward-document-metadata-to-embedding-implementations-to-enable-multimodal-providers/3924)

<div class="topic-metadata">

**Author:** [@VedantSonani](https://forum.langchain.com/u/VedantSonani)\
**Replies:** 3\
**Last updated:** [October 10, 2026, 9:24am UTC](https://forum.langchain.com/t/feat-core-forward-document-metadata-to-embedding-implementations-to-enable-multimodal-providers/3924 "2026-10-10T09:24:02Z")

</div>

Background Several embedding providers now support multimodal inputs — text, images, audio, and video — in the same embedding space: Gemini Embedding 2 (gemini-embedding-2-preview) — text, images, video, audio, PDFs Vo…

---

## [Sonnet-5.5 through \`ChatOpenAI\`](https://forum.langchain.com/t/sonnet-5-5-through-chatopenai/4672)

<div class="topic-metadata">

**Author:** [@saqlain2204](https://forum.langchain.com/u/saqlain2204)\
**Replies:** 4\
**Last updated:** [October 6, 2026, 1:42pm UTC](https://forum.langchain.com/t/sonnet-5-5-through-chatopenai/4672 "2026-10-06T13:42:09Z")

</div>

Hi LangChain Community, A while ago Anthropic launched 5.5 and I was trying to access to access it thorugh ChatOpenAI wrapper. The migration docs explicitly state that on passing thinking.type as disabled we would be en…

---

## [How are you handling runaway agent costs?](https://forum.langchain.com/t/how-are-you-handling-runaway-agent-costs/3913)

<div class="topic-metadata">

**Author:** [@DeboJolaosho](https://forum.langchain.com/u/DeboJolaosho)\
**Replies:** 8\
**Last updated:** [October 5, 2026, 2:26pm UTC](https://forum.langchain.com/t/how-are-you-handling-runaway-agent-costs/3913 "2026-10-05T14:26:33Z")

</div>

Been building with LangChain agents for a while and kept running into the same problem — an agent gets stuck in a loop and burns through API credits before anyone notices. Tried a few things: setting account-level lim…

---

## [Langchain-text-splitters release](https://forum.langchain.com/t/langchain-text-splitters-release/4675)

<div class="topic-metadata">

**Author:** [@Ben10](https://forum.langchain.com/u/Ben10)\
**Replies:** 1\
**Last updated:** [October 2, 2026, 3:38pm UTC](https://forum.langchain.com/t/langchain-text-splitters-release/4675 "2026-10-02T15:38:17Z")

</div>

Hello, langchain-text-splitter package introduced lazy loading of heavy dependency, I was wondering if a release was planned, or whats the release policy of that sort of package? Thanks!

---

## [Is support for MarkdownHeaderTextSplitter coming for Langchain-JS?](https://forum.langchain.com/t/is-support-for-markdownheadertextsplitter-coming-for-langchain-js/4516)

<div class="topic-metadata">

**Author:** [@michielvaneerd](https://forum.langchain.com/u/michielvaneerd)\
**Replies:** 1\
**Last updated:** [September 9, 2026, 4:40pm UTC](https://forum.langchain.com/t/is-support-for-markdownheadertextsplitter-coming-for-langchain-js/4516 "2026-09-09T16:40:54Z")

</div>

I see the Python Langchain supports the MarkdownHeaderTextSplitter which is needed keep the header hierarchy when chunking documents. But the Javascript Langchain does not seem to support this. Is this something that is …

---

## [How to get structured output when using astream() or stream()](https://forum.langchain.com/t/how-to-get-structured-output-when-using-astream-or-stream/4509)

<div class="topic-metadata">

**Author:** [@MSJavaScript](https://forum.langchain.com/u/MSJavaScript)\
**Replies:** 1\
**Last updated:** [September 8, 2026, 11:06am UTC](https://forum.langchain.com/t/how-to-get-structured-output-when-using-astream-or-stream/4509 "2026-09-08T11:06:35Z")

</div>

Hello, I am using agent.astream() to print streaming message, but I don’t know how to get structured output like agent.invoke(). Anyone has some ideas ? def print\_msg(msg): if isinstance(msg, AIMessage): pr…

---

## [Tool call and structured ouput](https://forum.langchain.com/t/tool-call-and-structured-ouput/1891)

<div class="topic-metadata">

**Author:** [@yugandhar](https://forum.langchain.com/u/yugandhar)\
**Replies:** 5\
**Last updated:** [September 3, 2026, 9:20am UTC](https://forum.langchain.com/t/tool-call-and-structured-ouput/1891 "2026-09-03T09:20:20Z")

</div>

I’m new to langchain. I’m using a model in Standalone mode. In this i have defined a tools and output structures I’m using Langchain V1 import os import dotenv from langchain.chat\_models import init\_chat\_model from la…

---

## [Feature Request: Dgraph Integration for LangGraph](https://forum.langchain.com/t/feature-request-dgraph-integration-for-langgraph/4477)

<div class="topic-metadata">

**Author:** [@LakshimiRam-073](https://forum.langchain.com/u/LakshimiRam-073)\
**Replies:** 0\
**Last updated:** [September 2, 2026, 5:31pm UTC](https://forum.langchain.com/t/feature-request-dgraph-integration-for-langgraph/4477 "2026-09-02T17:31:50Z")

</div>

We are evaluating Dgraph as a graph database for our GraphRAG use case and would like to have a native Dgraph integration/client in LangGraph, similar to the existing Neo4j integration. The integration would ideally sup…

---

## [Can somebody suggest books to learn LangChain?](https://forum.langchain.com/t/can-somebody-suggest-books-to-learn-langchain/4395)

<div class="topic-metadata">

**Author:** [@rajtilakjee](https://forum.langchain.com/u/rajtilakjee)\
**Replies:** 6\
**Last updated:** [September 2, 2026, 4:55pm UTC](https://forum.langchain.com/t/can-somebody-suggest-books-to-learn-langchain/4395 "2026-09-02T16:55:23Z")

</div>

Can somebody suggest a good book that is updated to a recent version of LangChain and teaches the basics of LangChain in Python? Before you suggest that I look up the documentation, I did but I learn from books better.

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