From a42a175f142ded6aeaf3409572cf2d09a3f3a9e4 Mon Sep 17 00:00:00 2001 From: Denel John Date: Fri, 16 Oct 2026 14:56:50 -0400 Subject: [PATCH] fix(prometheus): use a read-only payload type in the failed model label helper The type discipline gate counted the dict | StandardLoggingPayload annotation as a new mutable collection. Signed-off-by: Denel John --- litellm/integrations/prometheus.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py index 32f9b97d4bf..9d49c4c761d 100644 --- a/litellm/integrations/prometheus.py +++ b/litellm/integrations/prometheus.py @@ -2602,9 +2602,7 @@ class PrometheusLogger(CustomLogger): ) @staticmethod - def _bounded_failed_request_model_label( - model: object, standard_logging_payload: dict | StandardLoggingPayload - ) -> object: + def _bounded_failed_request_model_label(model: object, standard_logging_payload: StandardLoggingPayload) -> object: """ Bound the legacy ``model`` label on the failed-request metric.