This commit is contained in:
Timothy Jaeryang Baek
2025-06-28 19:15:52 +04:00
parent 1b064a6c85
commit 962e078a9a
2 changed files with 196 additions and 192 deletions

View File

@@ -1248,12 +1248,7 @@ async def get_models(
return filtered_models
if request.app.state.MODELS and (
request.app.state.config.ENABLE_MODEL_LIST_CACHE and not refresh
):
all_models = list(request.app.state.MODELS.values())
else:
all_models = await get_all_models(request, user=user)
all_models = await get_all_models(request, refresh=refresh, user=user)
models = []
for model in all_models: