Skip to content

Conversation

@YassinNouh21
Copy link
Contributor

close #5027

Summary

Adds optional response_schema parameter to interrupt() function and Interrupt dataclass to enable structured validation of resume values in human-in-the-loop workflows.

Changes

  • Core functionality: Added response_schema: dict | None field to Interrupt dataclass
  • API enhancement: Modified interrupt(value, *, response_schema=None) to accept Pydantic model classes
  • Validation: Resume values are validated against the schema and converted to model instances
  • Error handling: Invalid data triggers new interrupts with detailed validation error messages

Technical Details

  • Stores JSON schema dictionaries (not Pydantic classes) for proper serialization
  • Compatible with all checkpointers and graph state persistence
  • Maintains backward compatibility - existing code works unchanged
  • Validation errors include detailed field-level feedback
@vercel
Copy link

vercel bot commented Jun 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langgraph-docs-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 6:32am
@YassinNouh21 YassinNouh21 changed the title Add response_schema to interrupt and Interrupt feat: add response_schema to interrupt and Interrupt Jun 9, 2025
@YassinNouh21
Copy link
Contributor Author

@sydney-runkle Can u take a look ?

@sydney-runkle
Copy link
Collaborator

Thanks for this - marked as deferred, want to clean up Interrupt first for V1, then we can add this new feature.

@sydney-runkle
Copy link
Collaborator

Closing as stale for now. We're doing a big push for V1, but we do want this feature eventually!!

Happy to sync back up in a few weeks to sprint on this :)

@YassinNouh21
Copy link
Contributor Author

Closing as stale for now. We're doing a big push for V1, but we do want this feature eventually!!

Happy to sync back up in a few weeks to sprint on this :)

That would be nice when are u opening back the contributions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants