[PR #5988] test(prebuilt): standard integration tests for create_agent #4768

Closed
opened 2026-02-20 17:50:43 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/5988

State: closed
Merged: Yes


This PR improves standard integration tests in prebuilt to ensure logical equivalence between the Python and JavaScript implementations of create_agent.

  • Cleans up test_responses_int test harness
  • Adds new test utils to dynamically load JSON test specs
  • Adds test_return_direct_int test harness to validate model behavior when return_direct tool property is set
  • Adds support for when the user instantiates ToolOutput with multiple JSON schemas unified by the oneOf keyword

Failing tests:

  • test_inference_to_native_output: there is some odd behavior where the model makes a second call to get_weather despite having just received the tool message, so there are 6 messages instead of the 4 expected.
  • test_responses_integration_matrix[asking for information that does not fit into the response format]: XFAIL, currently failing due to undefined behavior when the model cannot conform to any of the structured response formats.

TODO in future PRs:

  • Add exception handling to pass test_responses_integration_matrix.
**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5988 **State:** closed **Merged:** Yes --- This PR improves standard integration tests in prebuilt to ensure logical equivalence between the Python and JavaScript implementations of `create_agent`. * Cleans up `test_responses_int` test harness * Adds new test utils to dynamically load JSON test specs * Adds `test_return_direct_int` test harness to validate model behavior when `return_direct` tool property is set * Adds support for when the user instantiates `ToolOutput` with multiple JSON schemas unified by the `oneOf` keyword Failing tests: * `test_inference_to_native_output`: there is some odd behavior where the model makes a second call to `get_weather` despite having just received the tool message, so there are 6 messages instead of the 4 expected. * `test_responses_integration_matrix[asking for information that does not fit into the response format]`: `XFAIL`, currently failing due to undefined behavior when the model cannot conform to any of the structured response formats. TODO in future PRs: * Add exception handling to pass `test_responses_integration_matrix`.
yindo added the pull-request label 2026-02-20 17:50:43 -05:00
yindo closed this issue 2026-02-20 17:50:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4768