[PR #18284] [MERGED] feat: Extend FileMetadataResponse to have hash field #40369

Closed
opened 2026-04-25 12:52:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/18284
Author: @Stoyan-Zlatev
Created: 10/13/2025
Status: Merged
Merged: 10/14/2025
Merged by: @tjbck

Base: devHead: feature/knowledge-response-file-hash


📝 Commits (1)

  • f0dfdb3 Extend FileMetadataResponse to have hash field

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 backend/open_webui/models/files.py (+4 -1)

📄 Description

Changelog Entry

Description

  • Extend the /api/v1/knowledge/{id} endpoint to include the hash value for each file returned. This supports a custom file-sync logic that compares hashes instead of re-uploading entire files, greatly improving sync performance and efficiency.

Added

  • hash property in the FileMetadataResponse model.

Changed

  • Refactored the knowledge endpoint’s response construction to include the new hash field.

Screenshots or Videos

Knowledge endpoint

See:
https://github.com/open-webui/open-webui/discussions/18282
https://github.com/open-webui/open-webui/discussions/18323

See: https://github.com/open-webui/open-webui/issues/18283

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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/18284 **Author:** [@Stoyan-Zlatev](https://github.com/Stoyan-Zlatev) **Created:** 10/13/2025 **Status:** ✅ Merged **Merged:** 10/14/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `feature/knowledge-response-file-hash` --- ### 📝 Commits (1) - [`f0dfdb3`](https://github.com/open-webui/open-webui/commit/f0dfdb30c3257d9d781f786d1e57bc219b3dc6f2) Extend FileMetadataResponse to have hash field ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/models/files.py` (+4 -1) </details> ### 📄 Description # Changelog Entry ### Description - Extend the `/api/v1/knowledge/{id}` endpoint to include the `hash` value for each file returned. This supports a custom file-sync logic that compares hashes instead of re-uploading entire files, greatly improving sync performance and efficiency. ### Added - `hash` property in the `FileMetadataResponse` model. ### Changed - Refactored the knowledge endpoint’s response construction to include the new `hash` field. --- ### Screenshots or Videos <img width="1709" height="840" alt="Knowledge endpoint" src="https://github.com/user-attachments/assets/28e6e892-4df9-4b6e-a594-2cbe4f00c1d8" /> ## Related Discussion See: https://github.com/open-webui/open-webui/discussions/18282 https://github.com/open-webui/open-webui/discussions/18323 ## Related Issue See: https://github.com/open-webui/open-webui/issues/18283 ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 12:52:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#40369