From 3bb8aa0db46dc693dd938bb90da4185066aa74d4 Mon Sep 17 00:00:00 2001 From: HARSHIT KULKARNI Date: Thu, 5 Nov 2026 06:36:23 +0530 Subject: [PATCH 1/2] feat(prometheus): add SERVICE_TIER to litellm_proxy_failed_requests_metric labels --- litellm/types/integrations/prometheus.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/types/integrations/prometheus.py b/litellm/types/integrations/prometheus.py index ca084bb358c..8fb660ac4d1 100644 --- a/litellm/types/integrations/prometheus.py +++ b/litellm/types/integrations/prometheus.py @@ -515,6 +515,7 @@ class PrometheusMetricLabels: UserAPIKeyLabelNames.USER_EMAIL.value, UserAPIKeyLabelNames.EXCEPTION_STATUS.value, UserAPIKeyLabelNames.EXCEPTION_CLASS.value, + UserAPIKeyLabelNames.SERVICE_TIER.value, # ``rate_limit_category`` / ``rate_limit_type`` are appended in # ``get_labels()`` when ``litellm.prometheus_emit_rate_limit_labels`` # is True. Kept opt-in so existing dashboards keyed on this metric's From 56befa98d85da142f9737b2db446ee166cc067dc Mon Sep 17 00:00:00 2001 From: HARSHIT KULKARNI Date: Thu, 5 Nov 2026 06:38:33 +0530 Subject: [PATCH 2/2] feat(prometheus): pass service_tier in async_post_call_failure_hook --- litellm/integrations/prometheus.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py index fc1a601f9da..ed091eb6bf8 100644 --- a/litellm/integrations/prometheus.py +++ b/litellm/integrations/prometheus.py @@ -3097,6 +3097,12 @@ class PrometheusLogger(CustomLogger): model_id=model_id, api_provider=api_provider, stream=(str(request_data.get("stream")) if litellm.prometheus_emit_stream_label else None), + service_tier=( + request_data.get("service_tier") + if isinstance(request_data.get("service_tier"), str) + and request_data.get("service_tier") in KNOWN_REQUEST_SERVICE_TIERS + else None + ), ) _label_ctx: Final = PrometheusLabelFactoryContext(enum_values) PrometheusLogger._inc_labeled_counter(