mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #21236] [CLOSED] fix: use keyword arg for IndicesClient.refresh() (opensearch-py 3.x) #41612
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/21236
Author: @veeceey
Created: 2/7/2026
Status: ❌ Closed
Base:
main← Head:fix/issue-20649-opensearch-refresh-kwarg📝 Commits (1)
dba45e5fix: use keyword argument for IndicesClient.refresh() for opensearch-py 3.x📊 Changes
1 file changed (+3 additions, -3 deletions)
View changed files
📝
backend/open_webui/retrieval/vector/dbs/opensearch.py(+3 -3)📄 Description
Summary
TypeError: IndicesClient.refresh() takes 1 positional argument but 2 positional argumentswhen using OpenSearch as vector database backendrefresh()callsRoot Cause
The project pins
opensearch-py==3.1.0inrequirements.txt. In opensearch-py >= 3.0.0,IndicesClient.refresh()changed its API signature: theindexparameter became keyword-only. The existing code passes it as a positional argument, causing aTypeErroron every document upload, upsert, or delete operation.Changes
Applied to all 3
refresh()calls in:insert()method (after bulk indexing)upsert()method (after bulk upsert)delete()method (after bulk delete / delete_by_query)Test Results
Before fix:
Document upload to knowledge bases fails completely.
After fix:
All other client calls in the file (
create,delete,exists,search,get,delete_by_query) already use keyword arguments correctly. Onlyrefresh()was missed.Fixes #20649
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.