From 55fc0deabc882be978713f7752983141ef031bb4 Mon Sep 17 00:00:00 2001 From: Tin Chi Lo Date: Tue, 15 Sep 2026 12:09:05 -0700 Subject: [PATCH] style(router): format encrypted task selection --- .../router_strategy/complexity_router/complexity_router.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/router_strategy/complexity_router/complexity_router.py b/litellm/router_strategy/complexity_router/complexity_router.py index c8de22e91fb..d20abefbb2a 100644 --- a/litellm/router_strategy/complexity_router/complexity_router.py +++ b/litellm/router_strategy/complexity_router/complexity_router.py @@ -2218,7 +2218,9 @@ class ComplexityRouter(CustomLogger): opening_task: Final = ( "The delegated task in the following agent_message." if encrypted_task is not None - else asks_newest_first[-1] if asks_newest_first else prompt + else asks_newest_first[-1] + if asks_newest_first + else prompt ) latest_follow_up: Final = asks_newest_first[0] if len(asks_newest_first) > 1 else None task_messages: list[AllMessageValues] = [ # mutable-ok: the latest message gains optional image parts below