[PR #11466] [MERGED] fix: opensearch environment variables fix #9536

Closed
opened 2025-11-11 18:25:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/11466
Author: @captn-hook
Created: 3/9/2025
Status: Merged
Merged: 3/9/2025
Merged by: @tjbck

Base: devHead: dev


📝 Commits (6)

📊 Changes

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

View changed files

📝 backend/open_webui/config.py (+2 -2)

📄 Description

Pull Request Checklist
https://github.com/open-webui/open-webui/discussions/11431

Changelog Entry
as per this thread in the discord
https://discord.com/channels/1170866489302188073/1347727886001635338
opensearch environment variables are loaded as strings instead of bools,
modified according to other examples in the file backend/open_webui/config.py

in backend/open_webui/retrieval/vector/dbs/opensearch.py,
class OpenSearchClient:
def init(self):
self.index_prefix = "open_webui"
self.client = OpenSearch(
hosts=[OPENSEARCH_URI],
use_ssl=OPENSEARCH_SSL,
verify_certs=OPENSEARCH_CERT_VERIFY,
http_auth=(OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD),
)

But this is a Python bool, not a string.
In backend/open_webui/config.py, we define it here:
OPENSEARCH_SSL = os.environ.get("OPENSEARCH_SSL", True)

other variables are loaded like

OPENSEARCH_SSL = os.environ.get("OPENSEARCH_SSL", "true").lower() == "true"


🔄 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/11466 **Author:** [@captn-hook](https://github.com/captn-hook) **Created:** 3/9/2025 **Status:** ✅ Merged **Merged:** 3/9/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (6) - [`fc056b1`](https://github.com/open-webui/open-webui/commit/fc056b1397129821142d22e2f70e8b6f92010a65) Update bug_report.yaml - [`165e861`](https://github.com/open-webui/open-webui/commit/165e861a1d533f08b5fbb7cf6f933a9542f2c89c) Create config.yaml - [`c1d2e0d`](https://github.com/open-webui/open-webui/commit/c1d2e0d999a963b90b0b5d6d73b9f7dd500313d4) refac - [`a75f827`](https://github.com/open-webui/open-webui/commit/a75f82755d48aa4e84c010875df525971e7ce3ea) Update bug_report.yaml - [`084e2ca`](https://github.com/open-webui/open-webui/commit/084e2caf6f93e942636501d9fe59c113800cc18d) Update config.py to correctly handle environment strings - [`4c98508`](https://github.com/open-webui/open-webui/commit/4c98508c0b0ae7b0b2a692e63721a461613c5149) Merge pull request #3 from open-webui/dev ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+2 -2) </details> ### 📄 Description Pull Request Checklist https://github.com/open-webui/open-webui/discussions/11431 Changelog Entry as per this thread in the discord https://discord.com/channels/1170866489302188073/1347727886001635338 opensearch environment variables are loaded as strings instead of bools, modified according to other examples in the file backend/open_webui/config.py in backend/open_webui/retrieval/vector/dbs/opensearch.py, class OpenSearchClient: def init(self): self.index_prefix = "open_webui" self.client = OpenSearch( hosts=[OPENSEARCH_URI], use_ssl=OPENSEARCH_SSL, verify_certs=OPENSEARCH_CERT_VERIFY, http_auth=(OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD), ) But this is a Python bool, not a string. In backend/open_webui/config.py, we define it here: OPENSEARCH_SSL = os.environ.get("OPENSEARCH_SSL", True) other variables are loaded like OPENSEARCH_SSL = os.environ.get("OPENSEARCH_SSL", "true").lower() == "true" --- <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 2025-11-11 18:25:09 -06: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#9536