Repository navigation
Pin Open WebUI v0.12.4.10 (GenAI spans on every path) and survive its cold start - #81
Merged
Merged
Conversation
GenAI spans on every content, tool and model path (fork #11): retrieval spans with documents for every content-reading built-in tool (knowledge files and grep, chat files, notes, chats, channels, memories, web search and fetch) and for memory recall, execute_tool spans in default function calling, and chat spans for pipe models. Fixes checks that counted no retrieved documents when an agent read a file with view_knowledge_file instead of searching.
Right after Open WebUI starts, its model registry can still miss the agent when Studio's once-a-minute refresh ran before Open WebUI loaded its connections, so concurrent scenarios failed with 'Model not found'. A saved-chat request that gets that answer now reloads the registry immediately and retries once.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
test_concurrent_runs_keep_their_own_auditor_class called mock.patch from two threads at once on the same attributes (decision_target_for, decision_auditor_class, snapshot_api_key). mock.patch is not thread-safe: one thread could restore the other's mock, leaving it installed for every later test on that xdist worker. That is the CI flake seen on #79 and #81 (snapshot_api_key returning '', decision_target_for returning object(), the auditor class being AuditorA). The test now patches once in the main thread, with side effects that pick each thread's class from its own target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Open WebUI v0.12.4.10-subpath
Fork PR SushantGautam/open-webui#11 audited every place Open WebUI reads content, runs tools or calls models, and closed the gaps in GenAI tracing:
gen_ai.retrieval.documentsfor every content-reading built-in tool (knowledge files and grep,kb_exec, chat files, notes, chats, channel messages and threads, memories, web search and fetch), and for memory recall. Each span names its data source.execute_toolspans in default (non-native) function calling.chatspans for pipe (function) models.embeddingsspan forquery_knowledge_files' query.This fixes D10-style checks that saw "0 retrieved documents" when an agent read a file with
view_knowledge_fileinstead of searching. Studio needs no code change for the new spans: it already reads retrieval spans.Cold-start fix
Right after Open WebUI starts, its model registry can miss the agent: Studio's throttled refresh may run before Open WebUI loads its connections. In testing, 6 of 10 concurrent scenarios failed with "Model not found". A saved-chat request that gets that answer now reloads the registry immediately and retries once.
Checks
uv run pytest -m "not embedded_hatchet": 1628 passed before the retry commit; the engine tests (71) pass with it.uv run ruff check .: clean.passwith every check passing, no "Model not found", and 27 knowledge retrieval spans (26 with documents).ENABLE_KB_EXEC=false:view_knowledge_fileandgrep_knowledge_fileseach produced a retrieval span withcustomer_faq.mdas the document.