From 1980a07f322220f2feffa48cf69adefab0974b8e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 28 Jun 2024 16:54:28 -0700 Subject: [PATCH] fix test custom callback router --- litellm/llms/azure.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/litellm/llms/azure.py b/litellm/llms/azure.py index 11bf5c3f0d..e127ecea6a 100644 --- a/litellm/llms/azure.py +++ b/litellm/llms/azure.py @@ -717,11 +717,32 @@ class AzureChatCompletion(BaseLLM): model_response_object=model_response, ) except AzureOpenAIError as e: + ## LOGGING + logging_obj.post_call( + input=data["messages"], + api_key=api_key, + additional_args={"complete_input_dict": data}, + original_response=str(e), + ) exception_mapping_worked = True raise e except asyncio.CancelledError as e: + ## LOGGING + logging_obj.post_call( + input=data["messages"], + api_key=api_key, + additional_args={"complete_input_dict": data}, + original_response=str(e), + ) raise AzureOpenAIError(status_code=500, message=str(e)) except Exception as e: + ## LOGGING + logging_obj.post_call( + input=data["messages"], + api_key=api_key, + additional_args={"complete_input_dict": data}, + original_response=str(e), + ) if hasattr(e, "status_code"): raise e else: