diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index ed6999a9c..f186b3833 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -3668,7 +3668,7 @@ async def chat_completion( logging_obj, data = litellm.utils.function_setup( original_function="acompletion", rules_obj=litellm.utils.Rules(), - start_time=litellm.utils.get_utc_datetime(), + start_time=datetime.now(), **data, ) diff --git a/tests/test_keys.py b/tests/test_keys.py index f21c50c0d..e9d29914b 100644 --- a/tests/test_keys.py +++ b/tests/test_keys.py @@ -523,7 +523,9 @@ async def test_key_info_spend_values_streaming(): ) rounded_response_cost = round(response_cost, 8) rounded_key_info_spend = round(key_info["info"]["spend"], 8) - assert rounded_response_cost == rounded_key_info_spend + assert ( + rounded_response_cost == rounded_key_info_spend + ), f"Expected={rounded_response_cost}, Got={rounded_key_info_spend}" @pytest.mark.asyncio