From 19c5790a916fbeca8c1f0b4343facdc52e47d177 Mon Sep 17 00:00:00 2001 From: yassin Date: Fri, 2 Oct 2026 05:06:53 +0000 Subject: [PATCH] fix(router): keep the cast-ok suppression on the cast line for the type discipline gate Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/router_strategy/lowest_tpm_rpm_v2.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/router_strategy/lowest_tpm_rpm_v2.py b/litellm/router_strategy/lowest_tpm_rpm_v2.py index 4239bdfaa61..f630fe373ca 100644 --- a/litellm/router_strategy/lowest_tpm_rpm_v2.py +++ b/litellm/router_strategy/lowest_tpm_rpm_v2.py @@ -423,10 +423,8 @@ class LowestTPMLoggingHandler_v2(BaseRoutingStrategy, CustomLogger): for idx, key in enumerate(rpm_keys): rpm_dict[rpm_keys[idx].split(":")[0]] = rpm_values[idx] + deployments: Final = cast(Sequence[Mapping[str, object]], healthy_deployments) # cast-ok: untyped dicts input_tokens = 0 - deployments: Final = cast( - Sequence[Mapping[str, object]], healthy_deployments - ) # cast-ok: router deployments are untyped dicts at this boundary if any(_declares_tpm_limit(deployment) for deployment in deployments): try: input_tokens = token_counter(messages=messages, text=input)