mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
The asyncio.gather in `_run_centralized_common_checks` ran with `return_exceptions=False` and a single bare `except HTTPException` arm, so an HTTPException from any one fetch (the realistic case is a 404 from `get_team_object` when a token references a deleted team) zeroed out the user, end-user, project, and global-spend contexts in addition to falling back the team object. That silently skipped the user budget, end-user budget, and project enforcement passes inside `common_checks` for the unrelated contexts that had actually fetched fine. Switch to `return_exceptions=True` and apply per-fetch fallback (matches the pre-refactor per-fetch try/except pattern in the builder): - ProxyException / BudgetExceededError still propagate as authz failures. - HTTPException on the team fetch reconstructs from the token; on the other fetches it nulls only that one context. - Successful fetches always reach `common_checks` intact. Adds two unit tests covering the team-404 and user-404 cases to lock the per-fetch isolation in. Drops the inaccurate `PROXY_ADMIN tokens short-circuit` claim from the docstring — admin tokens still flow through `common_checks`; admin status is only honored where the underlying check exempts it. |
||
|---|---|---|
| .. | ||
| test_auth_checks.py | ||
| test_auth_exception_handler.py | ||
| test_auth_hot_path_network_requests.py | ||
| test_auth_utils.py | ||
| test_cli_auth.py | ||
| test_custom_auth_end_user_budget.py | ||
| test_handle_jwt.py | ||
| test_info_routes.py | ||
| test_litellm_license.py | ||
| test_login_utils.py | ||
| test_mcp_ip_filtering.py | ||
| test_model_checks.py | ||
| test_model_checks_fallbacks.py | ||
| test_multi_budget_windows.py | ||
| test_object_permission_loading.py | ||
| test_onboarding.py | ||
| test_organization_budget_enforcement.py | ||
| test_password_hashing.py | ||
| test_route_checks.py | ||
| test_team_member_budget.py | ||
| test_unmapped_model_budget_enforcement.py | ||
| test_user_api_key_auth.py | ||