mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
Update litellm/proxy/auth/model_checks.py
Update litellm/proxy/auth/model_checks.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
7b085e6e4e
commit
2d793a3acd
1 changed files with 4 additions and 2 deletions
|
|
@ -165,8 +165,10 @@ async def get_key_models_with_db_access_groups(
|
|||
db_models = await _get_models_from_db_access_groups(
|
||||
access_group_ids=user_api_key_dict.access_group_ids,
|
||||
)
|
||||
if db_models:
|
||||
key_models = db_models
|
||||
# Fail-closed: if the access group is configured but resolves to nothing
|
||||
# (deleted group, DB unavailable, or empty group), use a sentinel so
|
||||
# get_complete_model_list() does NOT fall through to team_models.
|
||||
key_models = db_models if db_models else ["__access_group_no_models__"]
|
||||
|
||||
return key_models
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue