releaseintermediate
[Release] langchain-ai/langchain langchain-core==1.4.0: langchain-core==1.4.0
By github-actions[bot]github
View original on githublangchain-core version 1.4.0 release includes numerous bug fixes, performance improvements, and feature additions across the LangChain core library. Key updates involve hardening security (SSRF protections, deserialization safety), improving streaming with content-block-centric v2 support, enhancing tracer metadata handling, and updating dependencies. The release spans from version 0.3.86 through 1.4.0 with multiple intermediate releases (1.2.x, 1.3.x series) containing incremental improvements to tool handling, token counting, and model integrations.
Key Points
- •Security hardening: Added SSRF protections, deserialization warnings, and validation for untrusted manifests in load() functions
- •Streaming improvements: Introduced content-block-centric streaming (v2) with beta status for stream_v2/astream_v2 methods
- •Tracer metadata enhancements: Preserve structured inputs on tool runs, update inheritance behavior for special keys, add chat model/LLM invocation params to traceable metadata
- •Tool handling fixes: Preserve default_factory in tool call schemas, improve error messages for non-JSON-serializable schemas, fix merge_lists for parallel tool calls
- •Token counting: Add ContextOverflowError, count tokens from tool schemas in count_tokens_approximately, allow scaling by reported usage
- •Dependency updates: Bump urllib3, mistune, jupyter-server, pytest, langsmith, and other core dependencies to latest versions
- •Deprecation management: Make removal optional in warn_deprecated, set proper deprecation since versions, handle symlinks in deprecated prompt paths
- •Performance optimization: Defer langsmith imports to reduce import time, reduce streaming metadata overhead, improve garbage collection with reference counting
- •Model integrations: Add ChatBaseten to serializable mapping, add Bedrock model support, support OpenAI tool search, add ChatAnthropicBedrock wrapper
- •Documentation and validation: Fix docstring inaccuracies, add security best practices, validate batch_size to prevent infinite loops, harden template sanitization
Found this useful? Add it to a playbook for a step-by-step implementation guide.
Workflow Diagram
Start Process
Step A
Step B
Step C
Complete