diff --git a/litellm/tests/test_function_call_parsing.py b/litellm/tests/test_function_call_parsing.py index fab9cf110c..98c3af4abe 100644 --- a/litellm/tests/test_function_call_parsing.py +++ b/litellm/tests/test_function_call_parsing.py @@ -134,11 +134,11 @@ def trade(model_name: str) -> List[Trade]: "function": {"name": tool_spec["function"]["name"]}, # type: ignore }, ) + calls = response.choices[0].message.tool_calls + trades = [trade for call in calls for trade in parse_call(call)] + return trades except litellm.InternalServerError: pass - calls = response.choices[0].message.tool_calls - trades = [trade for call in calls for trade in parse_call(call)] - return trades @pytest.mark.parametrize(