From bbf1962540ec555888d045cef0e2653ec474f727 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 21 Mar 2025 10:50:55 -0700 Subject: [PATCH] fix llm responses --- tests/mcp_tests/test_mcp_litellm_client.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/mcp_tests/test_mcp_litellm_client.py b/tests/mcp_tests/test_mcp_litellm_client.py index 8efb728017..a4ca90eb1f 100644 --- a/tests/mcp_tests/test_mcp_litellm_client.py +++ b/tests/mcp_tests/test_mcp_litellm_client.py @@ -44,5 +44,10 @@ async def test_mcp_agent(): print("LLM RESPONSE: ", json.dumps(llm_response, indent=4, default=str)) # Add assertions to verify the response - assert isinstance(llm_response, dict) - print(llm_response) + assert llm_response["choices"][0]["message"]["tool_calls"] is not None + assert ( + llm_response["choices"][0]["message"]["tool_calls"][0]["function"][ + "name" + ] + == "add" + )