mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 03:47:49 +01:00
fix: BYPASS_MODEL_ACCESS_CONTROL env var
This commit is contained in:
@@ -1265,6 +1265,9 @@ async def get_base_models(user=Depends(get_admin_user)):
|
||||
async def generate_chat_completions(
|
||||
form_data: dict, user=Depends(get_verified_user), bypass_filter: bool = False
|
||||
):
|
||||
if BYPASS_MODEL_ACCESS_CONTROL:
|
||||
bypass_filter = True
|
||||
|
||||
model_list = await get_all_models()
|
||||
models = {model["id"]: model for model in model_list}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user