# \#python-help

**URL:** https://forum.langchain.com/tag/python-help/12.md?page=1

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

**Page:** 2

---

## [Stuck with a no way out](https://forum.langchain.com/t/stuck-with-a-no-way-out/4405)

<div class="topic-metadata">

**Author:** [@Hashim-Zafar](https://forum.langchain.com/u/Hashim-Zafar)\
**Replies:** 2\
**Last updated:** [October 31, 2026, 12:58pm UTC](https://forum.langchain.com/t/stuck-with-a-no-way-out/4405 "2026-10-31T12:58:05Z")

</div>

TBH i am up against a wall , i have tried everything over the past few days . So there is a node with in my graph that just keeps failing the evals over and over , like the best it can do is pass 64% of the test all it …

---

## [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…

---

## [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…

---

## [Building Reliable AI Agent Workflows with LangGraph and RAG](https://forum.langchain.com/t/building-reliable-ai-agent-workflows-with-langgraph-and-rag/4945)

<div class="topic-metadata">

**Author:** [@codeautomation](https://forum.langchain.com/u/codeautomation)\
**Replies:** 1\
**Last updated:** [October 30, 2026, 4:51pm UTC](https://forum.langchain.com/t/building-reliable-ai-agent-workflows-with-langgraph-and-rag/4945 "2026-10-30T16:51:50Z")

</div>

Hello LangChain community, I am exploring practical approaches for building reliable AI agent workflows using LangChain and LangGraph. I am currently experimenting with: RAG-based knowledge assistants Tool-calling AI…

---

## [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 …

---

## [Benchmarking a multi-step agent guardrail (local-first): catch vs false-alarm rate, and the eval cases I can’t invent](https://forum.langchain.com/t/benchmarking-a-multi-step-agent-guardrail-local-first-catch-vs-false-alarm-rate-and-the-eval-cases-i-can-t-invent/4977)

<div class="topic-metadata">

**Author:** [@rayyanmaan](https://forum.langchain.com/u/rayyanmaan)\
**Replies:** 0\
**Last updated:** [October 29, 2026, 4:21pm UTC](https://forum.langchain.com/t/benchmarking-a-multi-step-agent-guardrail-local-first-catch-vs-false-alarm-rate-and-the-eval-cases-i-can-t-invent/4977 "2026-10-29T16:21:17Z")

</div>

I’m working on this as a final-year CS capstone and want people who think about evals to poke holes in it. The failure I care about is multi-step: every tool call is individually allowed, but the sequence acts on stale …

---

## [Proposal: checkpoint aware context management for long-running agents (+ optional KV-cache editing)](https://forum.langchain.com/t/proposal-checkpoint-aware-context-management-for-long-running-agents-optional-kv-cache-editing/4792)

<div class="topic-metadata">

**Author:** [@Anipaleja](https://forum.langchain.com/u/Anipaleja)\
**Replies:** 4\
**Last updated:** [October 29, 2026, 1:46am UTC](https://forum.langchain.com/t/proposal-checkpoint-aware-context-management-for-long-running-agents-optional-kv-cache-editing/4792 "2026-10-29T01:46:03Z")

</div>

Hi maintainers, Ive been working on a context management layer for LangGraph and wanted to get some feedback before opening a PR. LangGraph already has tools like pre\_model\_hook, RemoveMessage, and trim\_messages, but I …

---

## [Production use of PostgresSaver: service-owned migrations and checkpoint retention in Node.js](https://forum.langchain.com/t/production-use-of-postgressaver-service-owned-migrations-and-checkpoint-retention-in-node-js/4481)

<div class="topic-metadata">

**Author:** [@waiz-ksolves](https://forum.langchain.com/u/waiz-ksolves)\
**Replies:** 3\
**Last updated:** [October 28, 2026, 6:38pm UTC](https://forum.langchain.com/t/production-use-of-postgressaver-service-owned-migrations-and-checkpoint-retention-in-node-js/4481 "2026-10-28T18:38:50Z")

</div>

We are planning to use @langchain/langgraph-checkpoint-postgres in a production Node.js service and have a few questions about the recommended database ownership and retention model. Our service team normally owns all P…

---

## [Trying to understand how to optimise on agent cost](https://forum.langchain.com/t/trying-to-understand-how-to-optimise-on-agent-cost/4909)

<div class="topic-metadata">

**Author:** [@raghusiddarth](https://forum.langchain.com/u/raghusiddarth)\
**Replies:** 3\
**Last updated:** [October 28, 2026, 6:15pm UTC](https://forum.langchain.com/t/trying-to-understand-how-to-optimise-on-agent-cost/4909 "2026-10-28T18:15:47Z")

</div>

Hi, We’ve built an agent with langchain, I’m spending around $0.9 per session - How do I optimse on this? any patterns that I can look for?

---

## [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…

---

## [Proposal: provider-neutral typed decisions for LangGraph Python and JS](https://forum.langchain.com/t/proposal-provider-neutral-typed-decisions-for-langgraph-python-and-js/4936)

<div class="topic-metadata">

**Author:** [@sjungwon03](https://forum.langchain.com/u/sjungwon03)\
**Replies:** 0\
**Last updated:** [October 28, 2026, 5:04pm UTC](https://forum.langchain.com/t/proposal-provider-neutral-typed-decisions-for-langgraph-python-and-js/4936 "2026-10-28T17:04:01Z")

</div>

I’d like to connect dedicated decision models to existing LangGraph LLM workflows in both Python and JS. A decision should be able to request any subset of named Choice, Noul, and Score judgments, then use the result eit…

---

## [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…

---

## [Can We Trust AI-Generated Code?](https://forum.langchain.com/t/can-we-trust-ai-generated-code/4827)

<div class="topic-metadata">

**Author:** [@Huimin-station](https://forum.langchain.com/u/Huimin-station)\
**Replies:** 3\
**Last updated:** [October 28, 2026, 7:21am UTC](https://forum.langchain.com/t/can-we-trust-ai-generated-code/4827 "2026-10-28T07:21:43Z")

</div>

Hello, I’d like to ask you a question about using AI coding tools for software development. Can we really trust AI with this work? Our team is facing a dilemma. On one hand, we want to use AI to boost efficiency. On the …

---

## [How should enterprise AI agents cache, refresh, and select skills in runtime? ](https://forum.langchain.com/t/how-should-enterprise-ai-agents-cache-refresh-and-select-skills-in-runtime/4845)

<div class="topic-metadata">

**Author:** [@suresandeep03](https://forum.langchain.com/u/suresandeep03)\
**Replies:** 2\
**Last updated:** [October 28, 2026, 3:43am UTC](https://forum.langchain.com/t/how-should-enterprise-ai-agents-cache-refresh-and-select-skills-in-runtime/4845 "2026-10-28T03:43:41Z")

</div>

Hi there, I’m are building an AI Agent that uses skill.md files. Each skill.md contains: Skill metadata skill\_name description examples business domain tags Execution instructions SQL query itself Snowflake execut…

---

## [Feature Proposal: First-Class AgentRouter and LLMRouter Abstractions](https://forum.langchain.com/t/feature-proposal-first-class-agentrouter-and-llmrouter-abstractions/4915)

<div class="topic-metadata">

**Author:** [@yogeshkulkarni11](https://forum.langchain.com/u/yogeshkulkarni11)\
**Replies:** 0\
**Last updated:** [October 27, 2026, 5:00pm UTC](https://forum.langchain.com/t/feature-proposal-first-class-agentrouter-and-llmrouter-abstractions/4915 "2026-10-27T17:00:34Z")

</div>

Feature Proposal: First-Class AgentRouter and LLMRouter Abstractions Background LangGraph provides excellent low-level primitives for building agent workflows, including nodes, edges, conditional routing, Command, state …

---

## [Interrupt Inconsistency (LangGraph 1.x)](https://forum.langchain.com/t/interrupt-inconsistency-langgraph-1-x/1996)

<div class="topic-metadata">

**Author:** [@akbindal](https://forum.langchain.com/u/akbindal)\
**Replies:** 1\
**Last updated:** [October 27, 2026, 4:28pm UTC](https://forum.langchain.com/t/interrupt-inconsistency-langgraph-1-x/1996 "2026-10-27T16:28:51Z")

</div>

Seeing a mismatch in langgraph interrupt behavior after migrating to LangGraph 1.x. On local dev, interrupt shows up in thread\_state but not in the streaming. On Docker (OSS self-hosted), stream emits the interrupt but…

---

## [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…

---

## [Create\_react\_agent occasionally not calling tools](https://forum.langchain.com/t/create-react-agent-occasionally-not-calling-tools/1873)

<div class="topic-metadata">

**Author:** [@FLFortunato](https://forum.langchain.com/u/FLFortunato)\
**Replies:** 2\
**Last updated:** [October 27, 2026, 3:19pm UTC](https://forum.langchain.com/t/create-react-agent-occasionally-not-calling-tools/1873 "2026-10-27T15:19:55Z")

</div>

Hey there, everyone! I’m facing a problem with my agent built with create\_react\_agent. I start a conversation questioning about some infos and it calls the tools correctly, but sometimes it just stops invoking the tools…

---

## [Proposal: additional docs for implementing custom DB checkpointers or a guide on generic base checkpointer](https://forum.langchain.com/t/proposal-additional-docs-for-implementing-custom-db-checkpointers-or-a-guide-on-generic-base-checkpointer/3735)

<div class="topic-metadata">

**Author:** [@Wonder-donbury](https://forum.langchain.com/u/Wonder-donbury)\
**Replies:** 3\
**Last updated:** [October 23, 2026, 6:58pm UTC](https://forum.langchain.com/t/proposal-additional-docs-for-implementing-custom-db-checkpointers-or-a-guide-on-generic-base-checkpointer/3735 "2026-10-23T18:58:26Z")

</div>

Currently I’m guessing a lot of agent PoC made with LangGraph is preparing to get to production level, and so is my project, and some projects that needs to be deployed on-prem, database licensing of the client’s side is…

---

## [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…

---

## [How to pass a "runtime args" to a graph node?](https://forum.langchain.com/t/how-to-pass-a-runtime-args-to-a-graph-node/4750)

<div class="topic-metadata">

**Author:** [@MSJavaScript](https://forum.langchain.com/u/MSJavaScript)\
**Replies:** 2\
**Last updated:** [October 15, 2026, 7:42am UTC](https://forum.langchain.com/t/how-to-pass-a-runtime-args-to-a-graph-node/4750 "2026-10-15T07:42:36Z")

</div>

Hello. I have a planner node, and I want it accept some runtime args, for example: def planner\_node(state:MainState, args:dict): pass This node may make (1) A fresh plan, without any dependence of previous steps. …

---

## [RAG Pipeline for industries](https://forum.langchain.com/t/rag-pipeline-for-industries/4718)

<div class="topic-metadata">

**Author:** [@dip\_gohil](https://forum.langchain.com/u/dip_gohil)\
**Replies:** 5\
**Last updated:** [October 12, 2026, 10:21am UTC](https://forum.langchain.com/t/rag-pipeline-for-industries/4718 "2026-10-12T10:21:47Z")

</div>

Everyone knows that when we discuss about any AI services or solutions there’s always a word comes which is RAG. But issue is not how we implement it or how we build it, the main issue is by which architecture you’ll bu…

---

## [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…

---

## [How to implement Dynamic Runtime Subagents in DeepAgents + LangGraph](https://forum.langchain.com/t/how-to-implement-dynamic-runtime-subagents-in-deepagents-langgraph/4607)

<div class="topic-metadata">

**Author:** [@mrsknetwork](https://forum.langchain.com/u/mrsknetwork)\
**Replies:** 5\
**Last updated:** [October 7, 2026, 4:34pm UTC](https://forum.langchain.com/t/how-to-implement-dynamic-runtime-subagents-in-deepagents-langgraph/4607 "2026-10-07T16:34:52Z")

</div>

Hi everyone, I’m trying to understand the best way to implement dynamically generated subagents at runtime. My goal is slightly different from the standard DeepAgents subagent pattern. Instead of predefining all subage…

---

## [Extending checkpoint schema with user\_id/agent\_id for cross-thread querying — trade-offs vs Thread Registry?](https://forum.langchain.com/t/extending-checkpoint-schema-with-user-id-agent-id-for-cross-thread-querying-trade-offs-vs-thread-registry/4429)

<div class="topic-metadata">

**Author:** [@santosh-nallur](https://forum.langchain.com/u/santosh-nallur)\
**Replies:** 6\
**Last updated:** [October 7, 2026, 2:28pm UTC](https://forum.langchain.com/t/extending-checkpoint-schema-with-user-id-agent-id-for-cross-thread-querying-trade-offs-vs-thread-registry/4429 "2026-10-07T14:28:50Z")

</div>

Hi Team, I want to gather opinion on one of our requirements related to LangGraph. I found a similar discussion here where this is discussed at length and provides useful insights, but I have more specific questions. U…

---

## [Does langchain provides classes for multimodal output models or for simplicity models with image only output like GPT-Image-2? Is the ChatOpenAI() going to work for GPT-Image-2 model?](https://forum.langchain.com/t/does-langchain-provides-classes-for-multimodal-output-models-or-for-simplicity-models-with-image-only-output-like-gpt-image-2-is-the-chatopenai-going-to-work-for-gpt-image-2-model/4698)

<div class="topic-metadata">

**Author:** [@shubhamkala06](https://forum.langchain.com/u/shubhamkala06)\
**Replies:** 4\
**Last updated:** [October 7, 2026, 6:35am UTC](https://forum.langchain.com/t/does-langchain-provides-classes-for-multimodal-output-models-or-for-simplicity-models-with-image-only-output-like-gpt-image-2-is-the-chatopenai-going-to-work-for-gpt-image-2-model/4698 "2026-10-07T06:35:35Z")

</div>

I have been trying to figure out that is it possible that a model response can be a image block or any other block other than the text block. So can a model response give an image block like this- { "type": "image…

---

## [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…

---

## [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!

---

## [What is the right way to conditionally interrupt](https://forum.langchain.com/t/what-is-the-right-way-to-conditionally-interrupt/4637)

<div class="topic-metadata">

**Author:** [@MSJavaScript](https://forum.langchain.com/u/MSJavaScript)\
**Replies:** 4\
**Last updated:** [October 1, 2026, 4:26pm UTC](https://forum.langchain.com/t/what-is-the-right-way-to-conditionally-interrupt/4637 "2026-10-01T16:26:22Z")

</div>

The langgraph manual said " Do not conditionally skip interrupt calls within a node", but I do have some situations in which I need to conditionally interrupt. For example, I have a very complex tool def generate\_elemen…

[Previous page](https://forum.langchain.com/tag/python-help/12.md?match_all_tags=true&tags%5B%5D=python-help)

[Next page](https://forum.langchain.com/tag/python-help/12.md?match_all_tags=true&page=2&tags%5B%5D=python-help)
