Skip to content

test(langchain): add callback propagation test for agent model nodes#1

Open
iammannu wants to merge 1 commit into
masterfrom
iammannu-patch-1
Open

test(langchain): add callback propagation test for agent model nodes#1
iammannu wants to merge 1 commit into
masterfrom
iammannu-patch-1

Conversation

@iammannu
Copy link
Copy Markdown
Owner

Fixes langchain-ai#36395

Summary

Adds a unit test to verify that callbacks propagate correctly through agent model nodes.

Changes

  • Added async unit test for callback propagation in create_react_agent
  • Ensures on_llm_start is triggered during agent execution

Why this matters

Prevents regressions where callback chains silently break, affecting observability tools like LangSmith, Langfuse, and OpenTelemetry.

Verification

  • Test confirms on_llm_start is triggered during agent execution

Adds a unit test to verify that callbacks propagate correctly through agent model nodes.

Motivated by issue langchain-ai#36395 where trace configuration can silently break callback chains.
@iammannu
Copy link
Copy Markdown
Owner Author

Happy to make any changes if needed. Thanks for reviewing!

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.

[langchain] trace=False on agent model node in factory.py prevents callback setup

1 participant