diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 1b3581427b..1ac6f7f062 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -892,6 +892,10 @@ def get_logging_payload(kwargs, response_obj, start_time, end_time): from pydantic import Json import uuid + verbose_proxy_logger.debug( + f"SpendTable: get_logging_payload - kwargs: {kwargs}\n\n" + ) + if kwargs == None: kwargs = {} # standardize this function to be used across, s3, dynamoDB, langfuse logging diff --git a/litellm/tests/test_key_generate_prisma.py b/litellm/tests/test_key_generate_prisma.py index be1fd9890b..08b5d1f936 100644 --- a/litellm/tests/test_key_generate_prisma.py +++ b/litellm/tests/test_key_generate_prisma.py @@ -735,6 +735,7 @@ def test_call_with_key_over_budget(prisma_client): ) await track_cost_callback( kwargs={ + "model": "chatgpt-v-2", "stream": False, "litellm_params": { "metadata": { @@ -759,6 +760,7 @@ def test_call_with_key_over_budget(prisma_client): assert spend_log.request_id == request_id assert spend_log.spend == float("2e-05") + assert spend_log.model == "chatgpt-v-2" # use generated key to auth in result = await user_api_key_auth(request=request, api_key=bearer_token)