mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #21245] [CLOSED] Fix opensearch-py 3.0+ compatibility in refresh() calls #25989
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/21245
Author: @veeceey
Created: 2/8/2026
Status: ❌ Closed
Base:
main← Head:fix/issue-20649-opensearch-refresh📝 Commits (1)
658ac39Fix opensearch-py 3.0+ compatibility in refresh() calls📊 Changes
1 file changed (+3 additions, -3 deletions)
View changed files
📝
backend/open_webui/retrieval/vector/dbs/opensearch.py(+3 -3)📄 Description
Summary
Problem
The
IndicesClient.refresh()method signature changed in opensearch-py 3.0.0 to accept only keyword-only arguments. The code was callingrefresh()with a positional argument, causing:This prevented document uploads to knowledge base when using OpenSearch as the vector database backend. The error occurred in
save_docs_to_vector_db()whenVECTOR_DB_CLIENT.insert()was called.Solution
Changed all three
refresh()calls inopensearch.pyto use keyword argument syntax:Before:
After:
Changes made in:
insert()method (line 214)upsert()method (line 237)delete()method (line 266)Manual Testing
Test Setup
Before Fix
After Fix
Compatibility Testing
OpenSearch Verification
Root Cause
In opensearch-py >= 3.0.0, the API changed to require keyword-only arguments for better clarity and to prevent positional argument errors. The old positional syntax:
Must now be:
This is part of opensearch-py's effort to align with modern Python best practices and improve API consistency.
Fixes #20649
Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.