Change8

langchain==0.3.28

Breaking Changes
📦 langchainView on GitHub →
1 breaking6 features🐛 14 fixes1 deprecations🔧 9 symbols

Summary

This 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.

⚠️ Breaking Changes

  • The method for serializing `Chain` objects has been updated from using dictionary methods to `model_dump`. If you were manually serializing Chains, you must update calls from dict methods to `model_dump`.

Migration Steps

  1. Update minimum dependency requirement for `langchain-core` to `0.3.73` or higher.
  2. If manually serializing Chains, update calls from dictionary methods to use `model_dump`.

✨ New Features

  • Run IDs now use uuid7 for generation across core, langchain, and text-splitters.
  • Enabled `stream_usage` when using the default base URL and client for OpenAI models.
  • Added `minimal` and `verbosity` options for OpenAI integration.
  • Improved developer experience by porting various nit changes from `wip-v0.4`.
  • Improved documentation development experience and fixed `Makefile` targets.
  • Added `strip_ansi` function to remove ANSI escape sequences.

🐛 Bug Fixes

  • Patched a ReDoS vulnerability in MRKL and ReAct action regex (CVE-2024-58340).
  • Fixed serialization issues in the core library.
  • Handled the `gpt-5` model name correctly during `init_chat_model` initialization.
  • Added `context_management` support to Anthropic chat model initialization.
  • Preserved the supplied LLM in `FlareChain.from_llm`.
  • Improved PostgreSQL Manager upsert SQLAlchemy API calls.
  • Updated method calls from dict to `model_dump` in `Chain` for serialization consistency.
  • Updated `ainvoke` to use async `_aget_response` and added corresponding async tests.
  • Updated Google model names in examples to use current versions.
  • Updated `bar_model` to use the correct model version `claude-3-7-sonnet-20250219`.
  • Fixed tracking of within-batch deduplication in the indexing `num_skipped` count.
  • Fixed formatting issues in docstrings.
  • Fixed devcontainer configuration.
  • Fixed capitalization, codeblock formatting, and hyperlinks/note blocks in documentation.

Affected Symbols

⚡ Deprecations

  • References to the unsupported model `claude-3-sonnet-20240229` have been removed.