Auth checks on invalid fallback models (#7871)

* fix(user_api_key_auth.py): handle clientside fallback model when item in list is dictionary

* fix(auth_checks.py): help user find invalid model names during dev

Ensure fallbacks work in prod

* fix(user_api_key_auth.py): fix linting check

* fix: cleanup unused variables

* fix: fix import

* fix(auth_checks.py): fix auth check
This commit is contained in:
Krish Dholakia 2025-01-19 21:28:10 -08:00 committed by GitHub
parent d6e85f7936
commit c306c2e0fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 82 additions and 11 deletions

View file

@ -50,9 +50,7 @@ async def route_request(
):
"""
Common helper to route the request
"""
router_model_names = llm_router.model_names if llm_router is not None else []
if "api_key" in data or "api_base" in data:
return getattr(litellm, f"{route_type}")(**data)