From c2994f3a32f129d1b6134f9351c8477dab7faa05 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 19 Nov 2024 16:17:10 -0800 Subject: [PATCH] use a var name for CUSTOM_LLM_PROVIDER --- litellm/integrations/prometheus.py | 12 ++++++------ litellm/types/integrations/prometheus.py | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py index cbeb4d336..029ba02ec 100644 --- a/litellm/integrations/prometheus.py +++ b/litellm/integrations/prometheus.py @@ -208,7 +208,7 @@ class PrometheusLogger(CustomLogger): "LLM Deployment Analytics - remaining requests for model, returned from LLM API Provider", labelnames=[ "model_group", - "api_provider", + CUSTOM_LLM_PROVIDER, "api_base", "litellm_model_name", "hashed_api_key", @@ -221,7 +221,7 @@ class PrometheusLogger(CustomLogger): "remaining tokens for model, returned from LLM API Provider", labelnames=[ "model_group", - "api_provider", + CUSTOM_LLM_PROVIDER, "api_base", "litellm_model_name", "hashed_api_key", @@ -233,7 +233,7 @@ class PrometheusLogger(CustomLogger): "litellm_model_name", "model_id", "api_base", - "api_provider", + CUSTOM_LLM_PROVIDER, ] team_and_key_labels = [ "hashed_api_key", @@ -790,7 +790,7 @@ class PrometheusLogger(CustomLogger): """ log these labels - ["litellm_model_name", "model_id", "api_base", "api_provider"] + ["litellm_model_name", "model_id", "api_base", CUSTOM_LLM_PROVIDER] """ self.set_deployment_partial_outage( litellm_model_name=litellm_model_name, @@ -882,7 +882,7 @@ class PrometheusLogger(CustomLogger): if remaining_requests: """ "model_group", - "api_provider", + CUSTOM_LLM_PROVIDER, "api_base", "litellm_model_name" """ @@ -907,7 +907,7 @@ class PrometheusLogger(CustomLogger): """ log these labels - ["litellm_model_name", "requested_model", model_id", "api_base", "api_provider"] + ["litellm_model_name", "requested_model", model_id", "api_base", CUSTOM_LLM_PROVIDER] """ self.set_deployment_healthy( litellm_model_name=litellm_model_name, diff --git a/litellm/types/integrations/prometheus.py b/litellm/types/integrations/prometheus.py index d09ed9670..dc77340f9 100644 --- a/litellm/types/integrations/prometheus.py +++ b/litellm/types/integrations/prometheus.py @@ -1,4 +1,5 @@ REQUESTED_MODEL = "requested_model" +CUSTOM_LLM_PROVIDER = "api_provider" EXCEPTION_STATUS = "exception_status" EXCEPTION_CLASS = "exception_class" EXCEPTION_LABELS = [EXCEPTION_STATUS, EXCEPTION_CLASS]