mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-17 23:52:29 +00:00
Each access to request.app.state.config.<KEY> triggers a synchronous Redis GET. In get_all_models_responses() and get_merged_models(), the config keys OPENAI_API_BASE_URLS, OPENAI_API_KEYS, and OPENAI_API_CONFIGS were read on every loop iteration — resulting in some cases in 200-300 Redis round-trips for OPENAI_API_BASE_URLS alone. Read each config value once into a local variable at the start of the function and reuse it throughout. |
||
|---|---|---|
| .. | ||
| data | ||
| internal | ||
| migrations | ||
| models | ||
| retrieval | ||
| routers | ||
| socket | ||
| static | ||
| storage | ||
| test | ||
| tools | ||
| utils | ||
| __init__.py | ||
| alembic.ini | ||
| config.py | ||
| constants.py | ||
| env.py | ||
| functions.py | ||
| main.py | ||
| tasks.py | ||