mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
Three CI gates failed on the initial push; all three were real: 1. lint (strict-rule budget): BLE001 +5, PERF401 +1 over base. The defensive 'except Exception' catches are intentional (an unplaceable name or a malformed deployment must never fail a request or brick a router), so they now carry '# noqa: BLE001' with justifications, matching the convention already used in router.py and common_request_processing.py. The candidate -spelling loop becomes a generator passed to list.extend (PERF401). Both rules are now back at base parity. 2. code-quality (router_code_coverage): the checker only scans test files whose filename contains 'router', so tests/.../test_canonical_model_resolution.py was invisible to it and both new Router methods read as untested. Renamed to test_router_canonical_model_resolution.py and added direct coverage for _get_canonical_model_index (memoization + fenced build failure). Checker now reports untested_perc: 0.0. 3. proxy-infra (test_route_non_a2a_model_raises_error_if_not_in_router): a real regression. The test drives route_request with a Mock() router, so resolve_canonical_model_name returned a truthy Mock and the hook treated it as a resolved target instead of raising. Both hooks (routing and auth) now require an actual non-empty str before acting on a resolution -- correct hardening independent of the test: a stub or partially-initialised router must never be read as a grant. Full affected suite: 517 passed. basedpyright: new module 0 errors. Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| pre_call_checks | ||
| test_add_retry_fallback_headers.py | ||
| test_auto_router_model_naming.py | ||
| test_cooldown_cache.py | ||
| test_cooldown_handlers.py | ||
| test_fallback_event_handlers.py | ||
| test_health_check_allowed_fails_integration.py | ||
| test_health_state_cache.py | ||
| test_router_canonical_model_resolution.py | ||
| test_router_health_check_routing.py | ||
| test_router_interactions_endpoints.py | ||
| test_router_utils_common_utils.py | ||