Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test_increment_top_level_request_and_spend_metrics

Ishaan Jaffer3759ea2de87a
diff --git a/tests/enterprise/litellm_enterprise/enterprise_callbacks/test_prometheus_logging_callbacks.py b/tests/enterprise/litellm_enterprise/enterprise_callbacks/test_prometheus_logging_callbacks.py
index 7309092dd50..0a57d046c72 100644
--- a/tests/enterprise/litellm_enterprise/enterprise_callbacks/test_prometheus_logging_callbacks.py
+++ b/tests/enterprise/litellm_enterprise/enterprise_callbacks/test_prometheus_logging_callbacks.py
@@ -590,12 +590,15 @@ def test_increment_top_level_request_and_spend_metrics(prometheus_logger):
prometheus_logger.litellm_requests_metric.labels.assert_called_once_with(
end_user=None,
user=None,
+ user_email=None,
hashed_api_key="test_hash",
api_key_alias="test_alias",
team="test_team",
team_alias="test_team_alias",
model="gpt-3.5-turbo",
- user_email=None,
+ model_id="model-123",
+ client_ip=None,
+ user_agent=None,
)
prometheus_logger.litellm_requests_metric.labels().inc.assert_called_once()
@@ -603,12 +606,15 @@ def test_increment_top_level_request_and_spend_metrics(prometheus_logger):
prometheus_logger.litellm_spend_metric.labels.assert_called_once_with(
end_user=None,
user=None,
+ user_email=None,
hashed_api_key="test_hash",
api_key_alias="test_alias",
team="test_team",
team_alias="test_team_alias",
model="gpt-3.5-turbo",
- user_email=None,
+ model_id="model-123",
+ client_ip=None,
+ user_agent=None,
)
prometheus_logger.litellm_spend_metric.labels().inc.assert_called_once_with(0.1)