LangChain
AI & LLMs🦜🔗 The platform for reliable agents.
Release History
langchain-anthropic==1.4.41 fixThis patch release for langchain-anthropic primarily fixes an issue by normalizing cross-provider tool-call IDs and includes several dependency bumps.
langchain-perplexity==1.3.1This release primarily updates the underlying perplexityai dependency to version 0.34.1.
langchain-fireworks==1.4.21 fixThis release primarily addresses a serialization bug within the fireworks integration by ensuring non-wire keys are stripped from content parts. It also updates internal dependencies.
langchain-perplexity==1.3.01 featureVersion 1.3.0 introduces the `use_responses_api` flag for ChatPerplexity and updates several internal dependencies.
langchain==1.3.22 fixes2 featuresThis release introduces PII redaction and stream transformer registration features, alongside fixes for TodoListMiddleware and glob_search sorting. It also updates several internal dependencies.
langchain-openai==1.2.23 fixesThis release focuses on maintenance, dependency bumps, and minor fixes within the OpenAI integration, including guarding httpx finalizers and correctly sourcing LLM context sizes.
langchain-tests==1.1.91 featureThis release bumps the idna dependency and introduces an enhancement to streaming assertions within the standard-tests library.
langchain-fireworks==1.4.12 fixesVersion 1.4.1 for langchain-fireworks introduces improved resilience by adding retries for API connection errors and setting a default retry limit.
langchain-fireworks==1.4.0Breaking1 fix1 featureVersion 1.4.0 for langchain-fireworks migrates the integration to the fireworks-ai 1.x SDK and introduces proper context overflow error handling. Several minor dependency bumps were also performed.
langchain-tests==1.1.81 fixThis release primarily consists of dependency bumps and maintenance updates, including refreshing stale OpenAI model references and fixing a test assertion regarding model overrides.
langchain==1.3.11 fixThis patch release (1.3.1) addresses a bug related to Bedrock provider aliasing within the summarization token check.
langchain==1.3.01 featureThis release introduces support for version="v3" in event streaming methods for langchain agents.
langchain-core==1.4.034 fixes14 featuresThis release focuses heavily on infrastructure updates, dependency bumps, and significant hardening across security (SSRF) and tracing mechanisms. New features include content-block-centric streaming (v2) and enhanced metadata tracing for LLM invocations.
langchain==1.2.181 fixThis release reverts a previous change regarding agent tagging and introduces deprecations for 'hub' and load/dump limits within langchain-classic.
langchain-core==0.3.861 fixThis release backports a critical path-traversal security fix to the langchain-core v0.3 branch.
langchain==0.3.301 fixThis release backports security hardening for loads/dumps to version 0.3 and deprecates the 'hub' functionality.
langchain-classic==1.0.7This release of langchain-classic deprecates the 'hub' functionality and limits loads/dumps operations.
langchain==1.3.0a224 fixes13 featuresThis release introduces significant updates to streaming protocols (v2 and v3), enhances agent capabilities with new middleware features, and includes numerous dependency bumps and bug fixes across various components.
langchain-classic==1.0.62 fixesThis release primarily focuses on security hardening for manifest loading and restricts deserialization in the classic storage module, while also updating a dependency.
langchain==0.3.292 fixesThis release focuses on security enhancements by restricting deserialization and hardening the `load()` function against untrusted manifests.
langchain-core==0.3.851 fixThis release focuses on security by hardening the `load()` function against untrusted manifests.
langchain-core==1.3.35 fixes1 featureThis release (1.3.3) focuses on hardening security for manifest loading and fixing several internal logic issues, including batch validation and tracer data preservation.
langchain-fireworks==1.3.12 fixesVersion 1.3.1 of langchain-fireworks includes fixes related to API key requirements in embeddings and cleaning up ToolMessage content blocks.
langchain-mistralai==1.1.41 fixThis release primarily addresses a bug fix in the mistralai integration by cleaning up keys in ToolMessage.
langchain-anthropic==1.4.31 fixThis release primarily focuses on refactoring deprecation targets within langchain-classic and includes a minor bug fix for httpx finalizers in the anthropic integration.
langchain-classic==1.0.51 fix1 featureThis release focuses on dependency updates, minor bug fixes in Fireworks, and introduces content-block-centric streaming (v2) in the core library. Deprecation messages have also been refined.
langchain-openrouter==0.2.31 fixThis release (0.2.3) for langchain-openrouter primarily addresses a streaming bug related to reasoning details.
langchain-mistralai==1.1.32 fixes2 featuresThis release for langchain-mistralai adds image input support for human messages and includes several dependency updates and infrastructure improvements across the ecosystem.
langchain-fireworks==1.3.01 featureThe Fireworks integration has been updated to version 1.3.0, introducing the ability to specify a `service_tier` when initializing `ChatFireworks`.
langchain==1.3.0a119 fixes14 featuresThis release includes numerous performance improvements, dependency bumps, and feature additions like content-block-centric streaming (v2) and integration of stream_events(version='v3'). Several bug fixes address token counting, model recognition, and middleware configuration.
langchain-openrouter==0.2.21 fix2 featuresThis release introduces new fields for session tracking in OpenRouter and implements content-block-centric streaming (v2). It also includes several dependency updates and a fix for usage metadata extraction across multiple providers.
langchain-core==1.4.0a235 fixes14 featuresThis release introduces content-block-centric streaming (v2) and support for the v3 stream protocol, alongside numerous bug fixes related to tracing, validation, and dependency updates. Path saving/loading functions for prompts have been deprecated.
langchain-core==1.4.0a134 fixes16 featuresThis release introduces significant feature updates, including content-block-centric streaming (v2) and support for the v3 event protocol. Numerous bug fixes address issues related to tracing, serialization, SSRF hardening, and model wrapper compatibility.
langchain-fireworks==1.2.11 fix1 featureVersion 1.2.1 primarily addresses minor dependency updates and includes a fix for multimodal content block translation in Fireworks, alongside a new content-block-centric streaming feature in core.
langchain==1.2.171 featureThis release introduces a new decision type to the HITL middleware for enhanced control flow.
langchain-perplexity==1.2.02 fixes5 featuresThis release introduces `PerplexityEmbeddings`, overhauls the Perplexity integration with its official SDK, and adds new fields to model profiles. It also includes several dependency bumps, notably for security and stability.
langchain==1.2.161 fix2 featuresThis release introduces content-block-centric streaming (v2) in core and adds agent type tagging for `create_agent` calls. It also includes several dependency updates and performance improvements.
langchain-tests==1.1.71 featureThis release (1.1.7) introduces content-block-centric streaming (v2) and updates several dependencies, including bumping the minimum required versions for core components.
langchain-anthropic==1.4.21 fix1 featureThis release for langchain-anthropic (1.4.2) restores cache control functionality and introduces content-block-centric streaming (v2) in the core library, alongside bumping minimum dependency versions.
langchain-openai==1.2.11 fix1 featureThis hotfix release bumps minimum core dependency versions and introduces content-block-centric streaming (v2) while fixing an issue with the Responses API check.
langchain-core==1.3.21 featureThis release introduces content-block-centric streaming (v2) to the core library.
langchain-fireworks==1.2.05 fixes3 featuresThis release updates dependency versions across the board, refreshes model profile data, and introduces streaming usage metadata support for the Fireworks integration. It also fixes several bugs related to retries and tool binding in Fireworks.
langchain-core==1.3.12 featuresThis release updates dependencies and introduces minor feature enhancements in the core library, including changes to output formatting and tracer metadata handling.
langchain-openai==1.2.01 featureVersion 1.2.0 introduces a fix to prevent silent streaming hangs within ChatOpenAI and includes minor CI and partner integration chore updates.
langchain-openai==1.1.161 fixThis release primarily addresses a bug related to prompt cache retention during streaming operations in langchain-openai.
langchain-openai==1.1.152 fixesThis release of langchain-openai primarily focuses on bug fixes related to streaming responses and Azure profile inference.
langchain-core==1.3.03 fixes1 featureLangchain-core version 1.3.0 introduces new traceable metadata fields for chat models and LLMs, alongside several bug fixes related to SSRF policies and garbage collection support.
langchain-anthropic==1.4.13 fixes2 featuresThis release (1.4.1) introduces support for new Anthropic model features like Opus 4.7 and adaptive thinking, alongside dependency updates and minor bug fixes.
langchain-huggingface==1.2.23 fixes1 featureThis release focuses on hardening HuggingFace integrations by improving repository ID validation and optimizing API calls, alongside updating model profile data and dependencies.
langchain-core==1.3.0a337 fixes12 featuresThis release introduces new features like enhanced metadata tracing, support for ChatBaseten, and multimodal token counting. It also includes numerous bug fixes related to SSRF hardening, model serialization, and tool handling, alongside the deprecation of prompt saving/loading functions due to added path validation.
langchain-classic==1.0.43 fixesThis release of langchain-classic (1.0.4) introduces deprecations, dependency bumps including pytest and cryptography, and fixes related to mypy errors and Azure AI Foundry model providers.
langchain-openai==1.1.141 fixVersion 1.1.14 of langchain-openai fixes an issue related to image token counting by implementing SSRF-safe transport. This release also updates several dependencies.
langchain-text-splitters==1.1.22 fixes1 featureThis release updates numerous dependencies, enforces SSRF-safe transport for URL splitting, and fixes a data loss issue in RecursiveJsonSplitter.
langchain-core==1.2.31This release ports change 36816 to the v1.2 branch, resulting in version 1.2.31 of langchain-core.
langchain-core==1.2.301 fixThis release primarily focuses on hardening private SSRF utilities within the core library.
langchain-openai==1.1.134 fixes1 featureThis release primarily focuses on bug fixes related to API response handling, token extraction, and User-Agent overrides, alongside adding a feature to impute placeholder filenames for OpenAI file inputs.
langchain-core==1.2.291 fixThis release updates langchain-core to version 1.2.29 and incorporates a fix from PR #36725.
langchain-core==1.3.0a235 fixes14 featuresThis release focuses heavily on stability, security hardening (anti-SSRF), and improved token counting, especially for multimodal inputs and tool schemas. Several prompt loading/saving methods have been deprecated due to path validation improvements.
langchain-core==1.3.0a135 fixes13 featuresThis release focuses heavily on stability, security hardening (anti-SSRF, pygments update), and feature parity, including adding Bedrock and OpenRouter support, and enhancing token counting for multimodal inputs and tool schemas. Several internal cleanups and deprecations related to prompt saving paths were also introduced.
langchain-core==0.3.841 fixThis release primarily focuses on improving prompt sanitization within the core library, moving from version 0.3.83 to 0.3.84.
langchain-core==1.2.281 fixThis release primarily focuses on improving template security by adding more sanitization.
langchain-tests==1.1.61 fixThis release primarily focuses on dependency updates, security patches (pygments), and minor fixes to standard tests for sandbox backends.
langchain-core==1.2.271 fixThis release primarily addresses a bug related to handling symlinks in the deprecated prompt saving path and updates a dependency comment.
langchain-ollama==1.1.04 fixes3 featuresThis release introduces new features for Ollama, including support for `response_format`, `dimensions` in embeddings, and logprobs, alongside several bug fixes and dependency updates.
langchain-core==1.2.262 fixes1 featureVersion 1.2.26 introduces a new serializable mapping for ChatBaseten and fixes serialization/validation issues for Bedrock models.
langchain==1.2.15This release primarily updates the dependency version for aiohttp within the langchain_v1 library.
langchain-core==1.2.252 fixesThis release (1.2.25) focuses on minor fixes, including hardening file checks in deprecated prompt loading and correcting documentation typos.
langchain-core==1.2.241 fix1 featureVersion 1.2.24 introduces placeholder filename imputation for OpenAI file inputs and updates the dependency constraint for Pygments.
langchain==1.2.145 fixes1 featureThis release focuses on dependency updates, performance improvements, and several bug fixes, including updates for Azure AI Foundry providers and recursion limit handling in agents.
langchain-openrouter==0.2.11 fixThis release bumps the dependency on 'requests' and fixes an issue in the OpenRouter integration where attribution headers were not being passed correctly.
langchain-core==1.2.231 fixThis release reverts a previous fix related to tracing invocation parameters and updates the 'requests' dependency version.
langchain-exa==1.1.01 featureThis release updates the default search type in langchain-exa to 'auto' and includes numerous dependency bumps across the project.
langchain-openrouter==0.2.01 fix1 featureThe OpenRouter integration received an update to include marketplace attribution fields, and core components received fixes for missing model profile fields.
langchain-core==1.2.221 fixVersion 1.2.22 introduces path validation for prompt saving and loading, leading to the deprecation of the underlying methods.
langchain-openai==1.1.127 fixes1 featureThis release (1.1.12) focuses on bug fixes for OpenAI integrations, including support for the phase parameter and fixing file descriptor leaks, alongside updates to model profiles.
langchain-core==1.2.211 fixThis release primarily addresses a bug fix in model profiles by adding missing fields and implementing schema drift warnings, alongside minor cleanup.
langchain==1.2.132 fixes1 featureThis release includes minor dependency bumps, CI improvements, and adds LangSmith integration metadata to agent and chat model initialization functions. A bug fix was also applied to the OpenAI Responses API input typing.
langchain-core==1.2.201 fix2 featuresVersion 1.2.20 of langchain-core includes security hardening, improved LangSmith integration metadata, and a fix for tracing invocation parameters.
langchain-anthropic==1.4.02 featuresVersion 1.4 introduces explicit caching for system messages and tool definitions via AnthropicPromptCachingMiddleware and improves cache control delegation.
langchain-anthropic==1.3.54 fixes1 featureThis release (1.3.5) for langchain-anthropic focuses on bug fixes related to caching, streaming, and tool choice handling, alongside dependency updates and new model profile features.
langchain-mistralai==1.1.23 fixes2 featuresThis release introduces new fields to model profiles and fixes several bugs related to exception handling and type resolution. Dependencies, including langsmith and urllib3, have also been updated.
langchain-classic==1.0.3BreakingThis release primarily involves internal housekeeping, moving BaseCrossEncoder to langchain-core and updating several minor and patch dependencies across the project.
langchain-core==1.2.19This release moves the BaseCrossEncoder class to langchain-core and updates the tornado dependency version.
langchain==1.2.121 featureThis release introduces tracing capabilities for wrapped models and tool calls within langchain_v1.
langchain==1.2.113 fixes2 featuresThis release introduces support for OpenRouter and automatic server-side compaction in OpenAI, alongside several dependency updates and bug fixes related to model initialization and detector output.
langchain-openai==1.1.11Breaking5 fixes2 featuresThis release introduces support for tool search and streaming token usage for OpenRouter, alongside several bug fixes related to model detection and structured output handling. It also bumps minimum dependency versions.
langchain-core==1.2.182 fixes1 featureThis release (1.2.18) focuses on minor fixes, including correcting docstrings and preserving schema factory settings, alongside adding tool search support for OpenAI.
langchain==0.3.28Breaking14 fixes6 featuresThis release bumps the minimum required version for `langchain-core` to 0.3.73 and patches a critical ReDoS vulnerability in MRKL/ReAct regexes. It also includes numerous internal cleanups, dependency bumps (like Ruff), and updates to model handling, particularly for Anthropic and Google models.
langchain-classic==1.0.27 fixes2 featuresThis release bumps `langchain-classic` to 1.0.2, patching a ReDoS vulnerability and including various dependency updates. New features include support for automatic server-side compaction in OpenAI integrations.
langchain-openrouter==0.1.03 fixes4 featuresThis release bumps the version of langchain-openrouter to 0.1.0 and introduces several new features, including streaming token usage and cost reporting for OpenRouter, alongside various infrastructure and profile updates.
langchain-core==1.2.171 fixVersion 1.2.17 of langchain-core includes a fix for extracting usage metadata from tracer messages and several dependency bumps.
langchain-huggingface==1.2.12 fixes1 featureThis release focuses on dependency updates, resolving compatibility issues with huggingface-hub 1.x, and introducing new fields to model profiles.
langchain-core==1.2.161 fixThis release of langchain-core includes a minor bug fix related to handling empty tool chunk IDs during merging.
langchain-anthropic==1.3.45 fixes2 featuresThis release focuses on improving the Anthropic integration by adding Bedrock support and a User-Agent header, alongside several fixes related to model IDs and response handling.
langchain-core==1.2.153 fixes1 featureThis release focuses on bug fixes in the core library, improved error handling, and the addition (and subsequent reversion) of the ChatAnthropicBedrock wrapper. Performance improvements were also made by deferring specific langsmith imports.
langchain-core==1.2.144 fixesThis release focuses primarily on bug fixes within the core library, addressing issues related to tool call merging, recursion errors, and LangSmith tracing parameter handling. Dependency groups were also updated.
langchain-text-splitters==1.1.14 fixes1 featureVersion 1.1.1 of langchain-text-splitters focuses on bug fixes, including resolving an SSRF vulnerability and mutation issues in splitters, alongside adding support for model_kwargs in SentenceTransformersTokenTextSplitter.
langchain-tests==1.1.5This release bumps several internal dependency groups, most notably updating langsmith to version 0.6.3, and releases version 1.1.5 of langchain-tests.
langchain-openai==1.1.105 fixes2 featuresThis release introduces support for automatic server-side compaction in OpenAI and adds the OpenRouter provider package. It also includes several bug fixes related to model properties, error handling, and dependency version bumps.
langchain-openrouter==0.0.2This release primarily involves bumping the core version and silencing a warning within the langchain-openrouter integration.
Common Errors
ModuleNotFoundError4 reportsThis error usually means the Langchain library is not installed, or the installed version is outdated and missing the module. Fix it by installing or upgrading Langchain using pip: `pip install langchain --upgrade`. If you are using poetry: `poetry add langchain`
ImportError3 reportsImportError in Langchain often arises when attempting to use a module or tool that hasn't been explicitly registered within Langchain's `load_tools` function or when a necessary dependency is missing. To fix this, ensure that the tool or module is properly registered with a string identifier in `load_tools` and that all required dependencies for the tool are installed in your environment (e.g., using `pip install`). Verify the correct spelling and capitalization of the tool's name during registration and when loading it.
NotImplementedError3 reportsThe "NotImplementedError" in LangChain often arises when a class inherits from an abstract base class (like `StructuredTool`) and doesn't implement a required method (like `_run`). To fix this, either implement the missing synchronous `_run` method or, if only an asynchronous `_arun` method exists, provide a synchronous implementation that calls `asyncio.run(_arun(...))` or use `sync_to_async` if direct use of `asyncio.run` is not suitable for the execution environment.
UnicodeDecodeError3 reportsUnicodeDecodeError usually arises when trying to decode a file or string with an encoding different from the one it was encoded with (often when the default system encoding is not UTF-8). To fix this, explicitly specify `encoding='utf-8'` when opening, reading, writing, saving, or decoding files and strings, especially in methods like `save()` that handle serialization. This ensures consistent handling of Unicode characters regardless of the system's default encoding.
BadRequestError3 reportsBadRequestError in Langchain usually arises from improperly formatted requests sent to a language model, such as incorrect tool inputs or file types. To resolve it, carefully inspect the request payload for data type mismatches or violations of the API's expected schema, ensuring all data conforms to the specified format (e.g., correct file MIME types, proper tool input structures). Validate your inputs against the LLM provider's API documentation and example requests to identify and correct any discrepancies.
BadRequestResponseError2 reportsBadRequestResponseError in Langchain often arises from exceeding the allowed token limit or malformed requests sent to the LLM provider during multi-turn conversations, especially when streaming. To fix this, either reduce the prompt size by summarizing or truncating earlier conversation turns, or ensure proper formatting and encoding of the request payload, especially when handling streamed responses containing structured data.
Related AI & LLMs Packages
AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Get up and running with OpenAI gpt-oss, DeepSeek-R1, Gemma 3 and other models.
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
LLM inference in C/C++
GPT4All: Run Local LLMs on Any Device. Open-source and available for commercial use.
A high-throughput and memory-efficient inference and serving engine for LLMs
Subscribe to Updates
Get notified when new versions are released