Files
open-webui-ai4me/backend/open_webui/routers
Thomas Rehn ce3a615442 perf: cache OpenAI config reads to avoid redundant Redis lookups in /api/models (#21306)
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.
2026-02-11 17:59:50 -06:00
..
2026-02-11 16:24:11 -06:00
2026-02-11 17:56:49 -06:00
2026-02-11 17:53:01 -06:00
2026-02-11 16:24:11 -06:00
2026-01-29 18:51:02 +04:00
2026-01-22 03:11:33 +04:00
2026-01-09 20:44:31 +04:00
2026-02-09 13:28:14 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 15:55:23 -06:00
2026-02-10 15:41:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-06 22:33:49 +04:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00
2026-02-11 16:24:11 -06:00