Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

style(router): format encrypted task selection

Tin Chi Lo55fc0deabc88
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