Files
litellm/tests/test_litellm/router_strategy
Krrish DholakiaandClaude Opus 4.7 e50f945ef7 refactor(adaptive_router): move update_queue out of litellm.proxy
P1 review: adaptive_router.py had a top-level import of
AdaptiveRouterUpdateQueue from litellm.proxy.db, which broke the
SDK/proxy boundary that every other router strategy respects. No
other router_strategy module imports from litellm.proxy at module
level.

The queue only depends on litellm._logging — it never needed to
live under litellm.proxy. Moved:

  litellm/proxy/db/db_transaction_queue/adaptive_router_update_queue.py
  → litellm/router_strategy/adaptive_router/update_queue.py

  tests/test_litellm/proxy/db/db_transaction_queue/
    test_adaptive_router_update_queue.py
  → tests/test_litellm/router_strategy/adaptive_router/test_update_queue.py

Also switched the queue's logger from verbose_proxy_logger to
verbose_router_logger to match the new module's ownership.

P2 review: drop unused constant STAGNATION_JACCARD_EXACT from
config.py — it was defined but never referenced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 18:02:44 -07:00
..