precommit

This commit is contained in:
Ashwin Bharambe 2025-10-15 09:26:04 -07:00
parent 57b3d14895
commit eba2eb2b0e
3 changed files with 24 additions and 16 deletions

View file

@ -117,13 +117,13 @@ def test_mcp_invocation(llama_stack_client, text_model_id, mcp_server):
assert final_response is not None
issued_calls = [
event
for event in events
if isinstance(event, StepProgress) and isinstance(event.delta, ToolCallIssuedDelta)
event for event in events if isinstance(event, StepProgress) and isinstance(event.delta, ToolCallIssuedDelta)
]
assert issued_calls and issued_calls[0].delta.tool_name == "greet_everyone"
tool_events = [event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"]
tool_events = [
event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"
]
assert tool_events and tool_events[0].result.tool_calls[0].tool_name == "greet_everyone"
assert "hello" in final_response.output_text.lower()

View file

@ -416,7 +416,9 @@ class TestAgentWithMCPTools:
)
events = [chunk.event for chunk in chunks]
tool_execution_steps = [event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"]
tool_execution_steps = [
event for event in events if isinstance(event, StepCompleted) and event.step_type == "tool_execution"
]
for step in tool_execution_steps:
for tool_response in step.result.tool_responses: