From 2ba44c6b5130ae7eef08f12614e0e929ee5c71f4 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Sat, 21 Feb 2026 12:46:43 -0800 Subject: [PATCH] fix(router): clarify circular import comment for ComplexityRouter --- litellm/router.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/router.py b/litellm/router.py index bf1284011de..fc3bb1632e0 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -6301,8 +6301,9 @@ class Router: This will initialize the complexity-router and add it to the complexity-routers dictionary. """ - # Import here to match AutoRouter pattern and avoid circular imports - # (ComplexityRouter is a CustomLogger subclass that imports litellm internals) + # Import here to avoid circular imports — ComplexityRouter is a CustomLogger + # subclass that imports litellm internals which depend on router.py. + # This matches the AutoRouter pattern in init_auto_router_deployment above. from litellm.router_strategy.complexity_router.complexity_router import ( ComplexityRouter, )