mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
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:
parent
d6e85f7936
commit
c306c2e0fc
5 changed files with 82 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue