# \#python-help

**URL:** https://forum.langchain.com/tag/python-help/12.md?match_all_tags=true&page=1&tags%5B%5D=python-help

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

**Page:** 2

---

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

---

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

---

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

---

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

---

## [Question on Open Github Issue #7345: Status of configurable PostgreSQL schema](https://forum.langchain.com/t/question-on-open-github-issue-7345-status-of-configurable-postgresql-schema/4558)

<div class="topic-metadata">

**Author:** [@alive](https://forum.langchain.com/u/alive)\
**Replies:** 1\
**Last updated:** [September 18, 2026, 2:28pm UTC](https://forum.langchain.com/t/question-on-open-github-issue-7345-status-of-configurable-postgresql-schema/4558 "2026-09-18T14:28:22Z")

</div>

Hey everyone! :waving\_hand: Quick question regarding Issue #7345 (“Configurable PostgreSQL schema for langgraph-checkpoint-postgres”): https://github.com/langchain-ai/langgraph/issues/7345 It looks like there has been…

---

## [A problem of agent architecture](https://forum.langchain.com/t/a-problem-of-agent-architecture/4546)

<div class="topic-metadata">

**Author:** [@MSJavaScript](https://forum.langchain.com/u/MSJavaScript)\
**Replies:** 3\
**Last updated:** [September 16, 2026, 11:52pm UTC](https://forum.langchain.com/t/a-problem-of-agent-architecture/4546 "2026-09-16T23:52:28Z")

</div>

Hello, I am building an agent with architecture like below ModelNode reads skill docs and makes plans and assigns tasks to executor agent. My concern is, the executor is called by agent.invoke(messages), but the Mode…

---

## [The Right Solution/Architecture?](https://forum.langchain.com/t/the-right-solution-architecture/4522)

<div class="topic-metadata">

**Author:** [@ipatchcables](https://forum.langchain.com/u/ipatchcables)\
**Replies:** 3\
**Last updated:** [September 13, 2026, 12:27am UTC](https://forum.langchain.com/t/the-right-solution-architecture/4522 "2026-09-13T00:27:41Z")

</div>

I’m trying to build out a project that helps automate web testing work (I’m a dev - 100s over servers internally). I’m curious what approach would work best? I know it can’t be fully non-deterministic, but curious what t…

---

## [Ephemeral Subagent Task - Deep Agent](https://forum.langchain.com/t/ephemeral-subagent-task-deep-agent/4518)

<div class="topic-metadata">

**Author:** [@ipatchcables](https://forum.langchain.com/u/ipatchcables)\
**Replies:** 2\
**Last updated:** [September 10, 2026, 1:55pm UTC](https://forum.langchain.com/t/ephemeral-subagent-task-deep-agent/4518 "2026-09-10T13:55:06Z")

</div>

Random task executes a dynamic subagent? AFAIK, this shouldn’t happen if you aren’t using CodeInterpreterMiddleware Really curious about this. ? Dynamic subagents - Docs by LangChain

---

## [Feature request: let a add\_conditional\_edges branch write into an existing add\_edge(\[...\], dest) barrier](https://forum.langchain.com/t/feature-request-let-a-add-conditional-edges-branch-write-into-an-existing-add-edge-dest-barrier/4513)

<div class="topic-metadata">

**Author:** [@AlejandroTorresMunoz](https://forum.langchain.com/u/AlejandroTorresMunoz)\
**Replies:** 0\
**Last updated:** [September 9, 2026, 9:11am UTC](https://forum.langchain.com/t/feature-request-let-a-add-conditional-edges-branch-write-into-an-existing-add-edge-dest-barrier/4513 "2026-09-09T09:11:36Z")

</div>

The gap add\_edge(\[source1, source2, ...\], dest) creates a NamedBarrierValue channel: dest becomes a real AND-join, firing only once every named source has written to it since it last fired. This works great, as long as e…

---

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

[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)
