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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix init correct prometheus metrics
Ishaan Jaff65c0626aa4c0
diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.pyindex 321c1cc1fc9..1471f59b75c 100644--- a/litellm/integrations/prometheus.py+++ b/litellm/integrations/prometheus.py@@ -103,25 +103,26 @@ class PrometheusLogger(CustomLogger):"Remaining budget for api key",labelnames=["hashed_api_key", "api_key_alias"],)- # 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"],- )+ ########################################+ # 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"],- )+ # 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:######################################### LLM API Deployment Metrics / analytics