Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix state fields received by routing function #3375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SrikanthVelpuri
Copy link

@SrikanthVelpuri SrikanthVelpuri commented Feb 10, 2025

Related to #2504

Modify the _get_updates function in libs/langgraph/langgraph/graph/state.py to include state fields not present in the input schema.

Add a test in libs/langgraph/tests/test_state.py to verify that the routing function receives the correct state fields regardless of the input schema.

  • Add test_routing_function_receives_correct_state_fields function to test the scenario described in the issue.
  • Ensure the test checks the final output state to confirm the correct state fields are received by the routing function.

For more details, open the Copilot Workspace session.

Related to langchain-ai#2504

Modify the `_get_updates` function in `libs/langgraph/langgraph/graph/state.py` to include state fields not present in the input schema.

Add a test in `libs/langgraph/tests/test_state.py` to verify that the routing function receives the correct state fields regardless of the input schema.
* Add `test_routing_function_receives_correct_state_fields` function to test the scenario described in the issue.
* Ensure the test checks the final output state to confirm the correct state fields are received by the routing function.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/langchain-ai/langgraph/issues/2504?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

vercel bot commented Feb 10, 2025

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langgraph-docs-preview ⬜️ Ignored (Inspect) Visit Preview Feb 10, 2025 10:39pm

@vbarda
Copy link
Collaborator

vbarda commented Feb 18, 2025

@SrikanthVelpuri did you mean to include an actual implementation for the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants