fix: Update openai.py

need to await get_filtered_models
This commit is contained in:
Jonathan Respeto 2025-01-29 08:47:54 -05:00 committed by GitHub
parent b4be58f6b6
commit a32782e527
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -489,7 +489,7 @@ async def get_models(
raise HTTPException(status_code=500, detail=error_detail) raise HTTPException(status_code=500, detail=error_detail)
if user.role == "user" and not BYPASS_MODEL_ACCESS_CONTROL: if user.role == "user" and not BYPASS_MODEL_ACCESS_CONTROL:
models["data"] = get_filtered_models(models, user) models["data"] = await get_filtered_models(models, user)
return models return models