mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-20 00:11:27 +00:00
Several spots in the chat pipeline issued sequential single-key config SELECTs, or fetched the same key twice back-to-back, on every request: - chat_completion_tools_handler: task model default/external and the tools prompt template were four sequential Config round trips (the template was fetched twice). One batched Config.get_many now serves all of them. - chat_completion_files_handler: the six RAG settings (top_k, top_k_reranker, relevance_threshold, hybrid_bm25_weight, enable_hybrid_search, full_context) were six sequential round trips inside the retrieval call. Batched into one get_many. - Voice and code-interpreter prompt templates were each fetched twice within one conditional; fetch once and reuse. The code-interpreter engine was likewise fetched twice per execution. - Skill resolution fetched the accessible-skills list, kept only the ids, then re-fetched each mentioned skill by id (N+1). Reuse the rows from the access query. Value semantics are identical: get_many applies the same defaults as the individual gets, and the pre-existing truthiness/empty-string checks on templates are preserved exactly. Claude-Session: https://claude.ai/code/session_01MHg5zs1VBjvRWQ54qHpfYD Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| access_control | ||
| images | ||
| mcp | ||
| telemetry | ||
| actions.py | ||
| anthropic.py | ||
| asgi_middleware.py | ||
| audit.py | ||
| auth.py | ||
| automations.py | ||
| calendar.py | ||
| channels.py | ||
| chat.py | ||
| chat_fork.py | ||
| code_interpreter.py | ||
| context_compaction.py | ||
| embeddings.py | ||
| files.py | ||
| filter.py | ||
| groups.py | ||
| headers.py | ||
| logger.py | ||
| memory.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| notifications.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| rate_limit.py | ||
| redis.py | ||
| response.py | ||
| sanitize.py | ||
| security_headers.py | ||
| session_pool.py | ||
| subagents.py | ||
| task.py | ||
| terminals.py | ||
| timers.py | ||
| tools.py | ||
| validate.py | ||
| valves.py | ||
| webhook.py | ||