Skip to content

0.2.38

Choose a tag to compare

@github-actions github-actions released this 15 Oct 18:12

langgraph 0.2.38

Summary of Changes

  • Fixed a bug in IsLastStepManager that incorrectly identified the last step
  • Changed RemainingStepsManager return type from bool to int to correctly reflect the count of remaining steps

Detailed Changes

langgraph.managed.is_last_step.IsLastStepManager

  • Fixed an off-by-one error in the __call__ method that incorrectly identified when the current step is the last step
  • Changed condition from self.loop.step == self.loop.stop to self.loop.step == self.loop.stop - 1 to correctly identify the last step

langgraph.managed.is_last_step.RemainingStepsManager

  • Changed the return type from bool to int to properly reflect that this manager returns a count of remaining steps, not a boolean value
  • Updated the class and method type annotations accordingly
  • The implementation logic remains the same, calculating self.loop.stop - self.loop.step

langgraph.managed.is_last_step.RemainingSteps

  • Updated type annotation from Annotated[bool, RemainingStepsManager] to Annotated[int, RemainingStepsManager] to match the manager's return type change