mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #21210] [CLOSED] fix: use keyword args for IndicesClient.refresh() (opensearch-py >= 3.0.0) #41599
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/21210
Author: @veeceey
Created: 2/6/2026
Status: ❌ Closed
Base:
dev← Head:fix/issue-20649-opensearch-refresh-kwarg📝 Commits (1)
108b6cffix: use keyword args for IndicesClient.refresh() (opensearch-py >= 3.0.0)📊 Changes
2 files changed (+345 additions, -3 deletions)
View changed files
📝
backend/open_webui/retrieval/vector/dbs/opensearch.py(+3 -3)➕
backend/open_webui/test/apps/webui/routers/test_opensearch.py(+342 -0)📄 Description
Description
Fixes #20649
In
opensearch-py >= 3.0.0, all auto-generated API methods switched to keyword-only arguments. The three calls toIndicesClient.refresh()in the OpenSearch vector DB client were passing the index name as a positional argument, causing:This made it impossible to add documents to a knowledge base when using OpenSearch as the vector DB backend.
Changed
backend/open_webui/retrieval/vector/dbs/opensearch.py: Changed all 3refresh()call sites from positional to keyword argument (index=)Fixed
TypeErrorcrash when using OpenSearch as vector DB backend withopensearch-py >= 3.0.0insert(),upsert(),delete()index=keyword arg is backward-compatible withopensearch-py < 3.0.0Testing
I have personally tested all changes:
Changelog Entry
Fixed
TypeErrorcrash when adding documents to knowledge base with OpenSearch backend andopensearch-py >= 3.0.0by using keyword arguments forIndicesClient.refresh()(#20649)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.