github langchain-ai/langgraph 0.4.1

latest releases: 1.0.0a3, 0.6.7, cli==0.4.2...
4 months ago

langgraph 0.4.1

Summary of Changes

  • Fixed an issue handling END in StateGraph edges to properly terminate graph execution #4458
  • Migrated codebase to exclusively use Pydantic V2, removing support for Pydantic V1 #4448
  • Added ability to merge UI message props using a new merge parameter #4473
  • Changed TAG_NOSTREAM from "langsmith:nostream" to "nostream", maintaining backwards compatibility #4473
  • Improved docstrings and documentation throughout the codebase #4463
  • Fixed UI message metadata handling in push_ui_message #4467

Detailed Changes

langgraph.graph.state.StateGraph

  • Fixed handling of the END constant in get_writes and _control_static functions, ensuring proper graph termination when returning to END #4458

langgraph.graph.ui

  • Added a new merge parameter to push_ui_message function, allowing incremental updates to UI messages #4473
  • Enhanced ui_message_reducer to support merging props from existing messages when the merge flag is set #4473
  • Fixed metadata handling in push_ui_message by removing old metadata merging which could cause unexpected behavior #4467

langgraph.constants

  • Changed TAG_NOSTREAM from "langsmith:nostream" to "nostream" #4473
  • Added TAG_NOSTREAM_ALT with the old value ("langsmith:nostream") for backward compatibility #4473

langgraph.graph.schema_utils

  • Removed support for Pydantic V1 models in SchemaCoercionMapper #4448
  • Simplified type adapters to work exclusively with Pydantic V2 #4448

langgraph.utils.pydantic

  • Completely rewritten to use only Pydantic V2 APIs #4448
  • Added proper caching for model creation with lru_cache for better performance #4448
  • Fixed handling of reserved names and field remapping to avoid collisions with Pydantic internals #4448

langgraph.channels.base.BaseChannel

  • Added docstring to clarify the purpose of this base class #4463

Don't miss a new langgraph release

NewReleases is sending notifications on new releases.