Files
open-webui/backend/open_webui/routers
Classic298andClaude da7097565c perf: deduplicate repeated config fetches in Ollama request handlers (#27226)
The per-request Ollama handlers (chat, generate, embed, embeddings,
and the OpenAI-compat completions/chat-completions/messages/responses
endpoints) fetched 'ollama.api_configs' up to three times and
'ollama.base_urls' separately within a single request — the .get()
default-argument pattern made the second api_configs fetch
unconditional, and get_api_key() triggered a third. Up to four
sequential SELECTs per request collapse to one.

A new get_ollama_connection_config() helper fetches base_urls and
api_configs together in one batched Config.get_many where both are
needed; handlers that only need api_configs fetch it once into a
local. Admin operations (pull/push/copy/delete) and the TTL-cached
model-list path are deliberately left untouched.

Resolution semantics (str(idx) key first, url-key legacy fallback,
same defaults) are unchanged.


Claude-Session: https://claude.ai/code/session_01MHg5zs1VBjvRWQ54qHpfYD

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-23 12:48:55 -04:00
..
2026-06-29 01:38:41 -05:00
2026-07-01 03:37:35 -05:00
2026-06-29 21:31:49 -05:00
2026-06-29 13:03:14 -05:00
2026-06-29 13:03:14 -05:00
2026-07-16 01:34:50 -04:00
2026-07-23 02:54:56 -04:00
2026-07-14 00:10:28 -04:00
2026-06-29 13:03:14 -05:00
2026-07-20 22:11:42 -04:00
2026-07-21 13:53:30 -04:00
2026-07-09 17:28:34 -05:00
2026-06-29 05:47:21 -05:00
2026-06-29 14:03:11 -05:00
2026-06-29 13:03:14 -05:00
2026-07-17 06:34:17 -04:00
2026-07-20 22:11:42 -04:00
2026-07-16 01:27:52 -04:00
2026-07-15 02:53:39 -04:00
2026-06-29 13:03:14 -05:00
2026-06-29 13:39:08 -05:00
2026-06-25 03:31:45 +01:00
2026-07-17 04:11:11 -04:00
2026-07-16 21:57:43 -04:00
2026-07-10 16:41:35 -05:00
2026-07-09 17:28:34 -05:00
2026-07-23 03:31:32 -04:00
2026-06-17 02:52:35 +02:00