refac: naming convention

MODEL_FILTER_ENABLED -> ENABLE_MODEL_FILTER
This commit is contained in:
Timothy J. Baek 2024-04-26 17:17:18 -04:00
parent c5eac5a1c7
commit dbf7b15539
5 changed files with 21 additions and 19 deletions

View file

@ -26,7 +26,7 @@ log.setLevel(SRC_LOG_LEVELS["LITELLM"])
from config import (
MODEL_FILTER_ENABLED,
ENABLE_MODEL_FILTER,
MODEL_FILTER_LIST,
DATA_DIR,
LITELLM_PROXY_PORT,
@ -130,7 +130,7 @@ async def startup_event():
asyncio.create_task(start_litellm_background())
app.state.MODEL_FILTER_ENABLED = MODEL_FILTER_ENABLED
app.state.ENABLE_MODEL_FILTER = ENABLE_MODEL_FILTER
app.state.MODEL_FILTER_LIST = MODEL_FILTER_LIST
@ -209,7 +209,7 @@ async def get_models(user=Depends(get_current_user)):
data = r.json()
if app.state.MODEL_FILTER_ENABLED:
if app.state.ENABLE_MODEL_FILTER:
if user and user.role == "user":
data["data"] = list(
filter(