forked from phoenix/litellm-mirror
fix(user_api_key_auth.py): ensure user has access to fallback models
for client side fallbacks, checks if user has access to fallback models
This commit is contained in:
parent
14da2d5ade
commit
5729eb5168
4 changed files with 150 additions and 53 deletions
|
@ -2087,7 +2087,7 @@ class Router:
|
|||
"content_policy_fallbacks", self.content_policy_fallbacks
|
||||
)
|
||||
try:
|
||||
if mock_testing_fallbacks is not None and mock_testing_fallbacks == True:
|
||||
if mock_testing_fallbacks is not None and mock_testing_fallbacks is True:
|
||||
raise Exception(
|
||||
f"This is a mock exception for model={model_group}, to trigger a fallback. Fallbacks={fallbacks}"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue