From d5109e2a56799cc0e2afbb5c9c7ec7ad2c26b147 Mon Sep 17 00:00:00 2001 From: hatim-ez Date: Sat, 11 Apr 2026 01:58:48 -0700 Subject: [PATCH] format --- litellm/router_strategy/lowest_latency.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/litellm/router_strategy/lowest_latency.py b/litellm/router_strategy/lowest_latency.py index 6d76461c3d3..870b3f29d48 100644 --- a/litellm/router_strategy/lowest_latency.py +++ b/litellm/router_strategy/lowest_latency.py @@ -155,13 +155,10 @@ class LowestLatencyLoggingHandler(CustomLogger): "time_to_first_token", [] ).append(time_to_first_token) else: - request_count_dict[id][ - "time_to_first_token" - ] = request_count_dict[id]["time_to_first_token"][ - 1: - ] + [ - time_to_first_token - ] + request_count_dict[id]["time_to_first_token"] = ( + request_count_dict[id]["time_to_first_token"][1:] + + [time_to_first_token] + ) if precise_minute not in request_count_dict[id]: request_count_dict[id][precise_minute] = {} @@ -383,13 +380,10 @@ class LowestLatencyLoggingHandler(CustomLogger): "time_to_first_token", [] ).append(time_to_first_token) else: - request_count_dict[id][ - "time_to_first_token" - ] = request_count_dict[id]["time_to_first_token"][ - 1: - ] + [ - time_to_first_token - ] + request_count_dict[id]["time_to_first_token"] = ( + request_count_dict[id]["time_to_first_token"][1:] + + [time_to_first_token] + ) if precise_minute not in request_count_dict[id]: request_count_dict[id][precise_minute] = {}