enh: redis dict for internal models state

Co-Authored-By: cw.a <57549718+acwoo97@users.noreply.github.com>
This commit is contained in:
Timothy Jaeryang Baek
2025-11-27 01:33:52 -05:00
parent ff4b1b9824
commit b5e5617a41
4 changed files with 28 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ from open_webui.utils import logger
from open_webui.utils.audit import AuditLevel, AuditLoggingMiddleware
from open_webui.utils.logger import start_logger
from open_webui.socket.main import (
MODELS,
app as socket_app,
periodic_usage_pool_cleanup,
get_event_emitter,
@@ -1217,7 +1218,7 @@ app.state.config.VOICE_MODE_PROMPT_TEMPLATE = VOICE_MODE_PROMPT_TEMPLATE
#
########################################
app.state.MODELS = {}
app.state.MODELS = MODELS
# Add the middleware to the app
if ENABLE_COMPRESSION_MIDDLEWARE: