test(sdk): added a failing test for callback propagation to subagent …#2361
Open
Kavish Kartha (kavishkartha05) wants to merge 5 commits intolangchain-ai:mainfrom
Open
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Author
|
Eugene Yurtsev (@eyurtsev) would greatly appreciate if you could please review the PR. As instructed, I added the failing test for callback propagation to subagent invocations. |
| ) | ||
|
|
||
| # All three LLM calls (2 parent + 1 subagent) should trigger the callback | ||
| assert len(llm_start_agent_names) >= 2, ( |
Collaborator
There was a problem hiding this comment.
Could we make assertion more precise? i.e., instead >=2 make it == to expected result
Otherwise this looks good, and you can add an xfail / skip marker, we can merge and figure out how to fix the issue
…invocations Regression test for langchain-ai#2315 The task tool invokes subagents without forwarding config, causing callbacks passed in the parent config to not propagate to subagent model calls. The subagent LLM calls appear with name=None instead of the expected agent name, confirming config is not forward
8f786e3 to
963b8b5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a failing regression test for #2315.
Per Eugene Yurtsev (@eyurtsev)'s instruction, this PR contains only the failing test; no fix yet.
The test confirms that callbacks passed in the parent config are not forwarded to subagent model calls. All LLM invocations in the subagent show
name=Noneinstead of the expected agent namecallback-check-subagent.Fixes #2315