Skip to content

Commit 05bb259

Browse files
cursoragentclaude
andcommitted
tests(langchain): restore invoke_agent span origin assertion
Co-Authored-By: gpt-5.3-codex-high <noreply@anthropic.com>
1 parent c7552cf commit 05bb259

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/integrations/langchain/test_langchain.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,14 @@ def test_langchain_agent(
217217
assert tx["contexts"]["trace"]["origin"] == "manual"
218218

219219
chat_spans = list(x for x in tx["spans"] if x["op"] == "gen_ai.chat")
220+
invoke_agent_span = next(x for x in tx["spans"] if x["op"] == "gen_ai.invoke_agent")
220221
tool_exec_span = next(x for x in tx["spans"] if x["op"] == "gen_ai.execute_tool")
221222

222223
assert len(chat_spans) == 2
223224

224225
assert chat_spans[0]["origin"] == "auto.ai.langchain"
225226
assert chat_spans[1]["origin"] == "auto.ai.langchain"
227+
assert invoke_agent_span["origin"] == "auto.ai.langchain"
226228
assert tool_exec_span["origin"] == "auto.ai.langchain"
227229

228230
# We can't guarantee anything about the "shape" of the langchain execution graph

0 commit comments

Comments
 (0)