organization · inferred from evidence
langchain-ai
The organization maintaining the LangChain repository.
- create_tool_calling_agent raises ValueError: This function requires a .bind_tools method be implemented on...
The root cause: with_fallbacks wraps the model in a Runnable that hid bind_tools, so the agent factory could not find the method. A maintainer linked the fix in PR #22139, which forwards bind_tools through fallbacks: upgrade to langchain-co
- LangGraph InvalidUpdateError: Must write to at least one of [...] (state channel name mismatch)
Check that every key your node returns exactly matches a channel name in your state schema; a typo like returning `message` when the channel is `messages` produces this error. Also make sure `graph.invoke()` is called with the required init
- LangSmith Python SDK memory grows in long-running apps (RunTree kept in memory)
A maintainer confirmed this is expected behavior rather than a leak: the Python SDK keeps the whole run tree (parents, children, inputs/outputs, metadata) in memory while a trace is live, so RSS grows with concurrency and only releases when
- OpenAIEmbeddings fails against Azure OpenAI: Too many inputs for model
Pass `chunk_size=1` when constructing the embeddings: `embeddings = OpenAIEmbeddings(chunk_size=1)`. This was the confirmed fix in the thread and also works through helpers like `vectorstore.from_documents()` where you can't pass chunk_size
- ValueError: create_tool_calling_agent requires .bind_tools on the LLM when using with_fallbacks
The root cause: with_fallbacks wraps the model in a Runnable that hid bind_tools, so the agent factory could not find the method. A maintainer linked the fix in PR #22139, which forwards bind_tools through fallbacks: upgrade to langchain-co
- streaming not working when using bind_tools with ChatOllama - llm.stream() returns no tokens
The root cause was on the Ollama server side, not in LangChain. A reporter confirmed that updating to the latest Ollama release (which shipped streaming-tool support) fixed streaming with bind_tools, and another confirmed the same behavior:
- Error in RootListenersTracer.on_chain_end callback: KeyError('answer') while streaming a RAG chain
This warning is non-fatal: the streamed output is unaffected, only the tracing callback hits the missing key. Multiple reporters confirmed it went away after upgrading (langchain 0.2.14 / langchain-core 0.2.32 or later), so upgrading is the