diff --git a/litellm/tests/test_completion.py b/litellm/tests/test_completion.py index c3db66499a..fe98e178db 100644 --- a/litellm/tests/test_completion.py +++ b/litellm/tests/test_completion.py @@ -594,6 +594,9 @@ def test_completion_azure(): # ) # Add any assertions here to check the response print(response) + + cost = completion_cost(completion_response=response) + print("Cost for azure completion request", cost) except Exception as e: pytest.fail(f"Error occurred: {e}") diff --git a/litellm/utils.py b/litellm/utils.py index e9e649252a..8ca70fa64a 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1612,7 +1612,7 @@ def cost_per_token(model="gpt-3.5-turbo", prompt_tokens=0, completion_tokens=0): ) return prompt_tokens_cost_usd_dollar, completion_tokens_cost_usd_dollar else: - # calculate average input cost + # calculate average input cost, azure/gpt-deployments can potentially go here if users don't specify, gpt-4, gpt-3.5-turbo. LLMs litellm knows input_cost_sum = 0 output_cost_sum = 0 model_cost_ref = litellm.model_cost