mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #21144] [CLOSED] enh: preserve full-context knowledge files with native function calling #25948
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21144
Author: @jimbo-p
Created: 2/4/2026
Status: ❌ Closed
Base:
dev← Head:bugfix/full-context-mode-for-model-attachments📝 Commits (2)
a904d93Fix: Proper handling of full-context vs searchable file attachments with native tools136664fMerge branch 'dev' into bugfix/full-context-mode-for-model-attachments📊 Changes
4 files changed (+166 additions, -90 deletions)
View changed files
📝
backend/open_webui/tools/builtin.py(+102 -48)📝
backend/open_webui/utils/middleware.py(+49 -35)📝
backend/open_webui/utils/tools.py(+11 -5)📝
src/lib/components/workspace/Models/ModelEditor.svelte(+4 -2)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
Added
Changed
middleware.py: Full-context files now bypass RAG and inject directly into the conversation regardless of function calling mode; non-full-context files continue to use RAG when native FC is disabledModelEditor.svelte: Preserves thecontextproperty when converting legacy knowledge itemsbuiltin.py: Skips full-context files inquery_knowledge_filesto prevent redundant searching (content already in conversation)Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Builtin tools enabled for all screenshots
Open WebUI 0.7.2 (main) - Example of how turn on 'Using Entire Document' is not doing anything in current OWUI version with Builtin Tools checked. Token counts remain near identical but the document at hand is ~115k tokens in size.
Open WebUI 0.7.2 (PR) - 'Using Entire Document' now properly injects full context into message.


Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.