diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py index 321c1cc1fc9..1471f59b75c 100644 --- a/litellm/integrations/prometheus.py +++ b/litellm/integrations/prometheus.py @@ -103,26 +103,27 @@ class PrometheusLogger(CustomLogger): "Remaining budget for api key", labelnames=["hashed_api_key", "api_key_alias"], ) + + ######################################## + # LiteLLM Virtual API KEY metrics + ######################################## + # Remaining MODEL RPM limit for API Key + self.litellm_remaining_api_key_requests_for_model = Gauge( + "litellm_remaining_api_key_requests_for_model", + "Remaining Requests API Key can make for model (model based rpm limit on key)", + labelnames=["hashed_api_key", "api_key_alias", "model"], + ) + + # Remaining MODEL TPM limit for API Key + self.litellm_remaining_api_key_tokens_for_model = Gauge( + "litellm_remaining_api_key_tokens_for_model", + "Remaining Tokens API Key can make for model (model based tpm limit on key)", + labelnames=["hashed_api_key", "api_key_alias", "model"], + ) + # Litellm-Enterprise Metrics if premium_user is True: - ######################################## - # LiteLLM Virtual API KEY metrics - ######################################## - # Remaining MODEL RPM limit for API Key - self.litellm_remaining_api_key_requests_for_model = Gauge( - "litellm_remaining_api_key_requests_for_model", - "Remaining Requests API Key can make for model (model based rpm limit on key)", - labelnames=["hashed_api_key", "api_key_alias", "model"], - ) - - # Remaining MODEL TPM limit for API Key - self.litellm_remaining_api_key_tokens_for_model = Gauge( - "litellm_remaining_api_key_tokens_for_model", - "Remaining Tokens API Key can make for model (model based tpm limit on key)", - labelnames=["hashed_api_key", "api_key_alias", "model"], - ) - ######################################## # LLM API Deployment Metrics / analytics ########################################