litellm/tests/test_litellm/router_strategy/adaptive_router
Krrish Dholakia e50f945ef7
Some checks failed
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (proxy-utils, tests/proxy_unit_tests/test_proxy_utils.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled
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
..
fixtures feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
__init__.py feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
test_adaptive_router.py fix(adaptive_router): bound owner cache, drop PK from upsert update, redact PII 2026-04-20 17:53:52 -07:00
test_async_pre_routing.py fix(adaptive_router): 3 P1 review defects 2026-04-20 15:22:18 -07:00
test_bandit.py feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
test_classifier.py feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
test_config.py feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
test_e2e_adaptive_router.py fix(adaptive_router): enforce satisfaction gate, stop false-flagging empty tool output 2026-04-20 17:47:25 -07:00
test_hooks.py test(adaptive_router/hooks): align stale tests with current hook API 2026-04-20 16:03:32 -07:00
test_router_dispatch.py fix(adaptive_router): P1 flusher hot-reload + P2 hook accumulation + CI 2026-04-21 17:49:38 -07:00
test_signals.py fix(adaptive_router): enforce satisfaction gate, stop false-flagging empty tool output 2026-04-20 17:47:25 -07:00
test_state_endpoint.py fix(adaptive_router): P2 review items — @updatedAt + snapshot samples 2026-04-21 16:27:01 -07:00
test_update_queue.py refactor(adaptive_router): move update_queue out of litellm.proxy 2026-04-21 18:02:44 -07:00