pypi langgraph-sdk 0.3.10

latest releases: 0.3.15, 0.3.14, 0.3.13...
2 months ago

langgraph 0.3.10

Summary of Changes

  • Added a new SchemaCoercionMapper class to efficiently handle schema coercion with caching (#3806)
  • Improved how Pydantic models are handled in state updates, respecting field set values (#3839)
  • Enhanced PregelTask to better handle return values and results (#3839)
  • Simplified channel writes by removing required channel validation (#3839)
  • Added environment variable control for recursion limit via LANGGRAPH_DEFAULT_RECURSION_LIMIT (#3812, #3813)

Detailed Changes

langgraph.graph.schema_utils.SchemaCoercionMapper

  • Added a new utility class for efficiently coercing data to schemas
  • Implements caching using weakrefs to improve performance
  • Supports both Pydantic v1 and v2 models
  • Handles nested structures like lists, dicts, tuples and unions

langgraph.graph.state.StateGraph

  • Updated state coercion to use the new SchemaCoercionMapper
  • Improved handling of Pydantic models for state updates
  • Simplified formatting and structure of conditional code

langgraph.pregel.write.ChannelWrite

  • Removed the require_at_least_one_of parameter and validation logic
  • Made channel write operations more permissive, simplifying usage

langgraph.types.PregelTask

  • Updated result field to accept Any type instead of only dictionaries
  • This allows for more flexible return values from tasks

langgraph.pregel.debug

  • Enhanced map_debug_task_results to include RETURN values in results
  • Refactored tasks_w_writes for better handling of task results
  • Improved handling of return values in task output

Configuration

  • Added support for configuring recursion limit via environment variable
  • Set LANGGRAPH_DEFAULT_RECURSION_LIMIT to control recursion depth (default: 25)

Don't miss a new langgraph-sdk release

NewReleases is sending notifications on new releases.