Skip to content

0.2.31

Choose a tag to compare

@github-actions github-actions released this 30 Sep 22:40
716d23e

langgraph 0.2.31

Summary of Changes

  • Fixed type handling in Pregel task preparation by using explicit cast (#1926)
  • Fixed the logic in _should_bind_tools function to correctly determine when tools should be bound to a language model (#1927)

Detailed Changes

langgraph.pregel.algo.prepare_single_task

  • Improved type safety by using explicit cast(str, task_path[1]) instead of str(task_path[1]) when handling PULL task paths (#1926)

langgraph.prebuilt.chat_agent_executor

  • Fixed inverted logic in _should_bind_tools function to correctly determine when tools should be bound to a language model:
    • Now returns True when model is not a RunnableBinding (previously returned False)
    • Now returns True when model doesn't have tools in its kwargs (previously returned False)
    • Now returns False when model already has matching tools bound (previously returned True)
    • This ensures tools are correctly bound only when needed (#1927)