Inspect the existing query path in search_prompts() and confirm it previously lowercased serialized JSON text and used LIKE.
Replace it with dialect-aware JSON element queries.
Run python3 -m py_compile backend/open_webui/models/prompts.py and git diff --check.
Screenshots or Videos
Not applicable for this backend query fix.
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/23386
**Author:** [@suyua9](https://github.com/suyua9)
**Created:** 4/3/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `suyua9-fix-prompt-tag-cyrillic`
---
### 📝 Commits (1)
- [`4368cce`](https://github.com/open-webui/open-webui/commit/4368cce6bf6da6411f561d4e081553f6a2b2b31e) fix: query prompt tags by JSON elements
### 📊 Changes
**1 file changed** (+18 additions, -5 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/models/prompts.py` (+18 -5)
</details>
### 📄 Description
# Pull Request Checklist
- [x] **Target branch:** Verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request down below.
- [ ] **Changelog:** No changelog entry needed for this small backend bug fix.
- [ ] **Documentation:** No docs repo change needed for this backend query fix.
- [x] **Dependencies:** No new or upgraded dependencies.
- [x] **Testing:** I ran `python3 -m py_compile backend/open_webui/models/prompts.py` and `git diff --check`.
- [x] **Agentic AI Code:** I manually reviewed the final patch before opening this PR.
- [x] **Code review:** I performed a self-review of the code change.
- [x] **Design & Architecture:** The change only replaces the prompt tag filter query path with dialect-aware JSON element matching.
- [x] **Git Hygiene:** This PR is a single logical change based on `dev`.
- [x] **Title Prefix:** `fix`
# Changelog Entry
### Description
- Use dialect-aware JSON element queries for prompt tag filtering so SQLite can match non-ASCII tags reliably.
### Added
- None.
### Changed
- Prompt tag filtering now queries decoded JSON array elements on SQLite and PostgreSQL instead of matching serialized JSON text.
### Deprecated
- None.
### Removed
- None.
### Fixed
- SQLite prompt tag filtering now returns prompts tagged with Cyrillic values such as `Бизнес`.
### Security
- None.
### Breaking Changes
- **BREAKING CHANGE**: None.
---
### Additional Information
- Refs #23381
- Manual verification:
1. Inspect the existing query path in `search_prompts()` and confirm it previously lowercased serialized JSON text and used `LIKE`.
2. Replace it with dialect-aware JSON element queries.
3. Run `python3 -m py_compile backend/open_webui/models/prompts.py` and `git diff --check`.
### Screenshots or Videos
- Not applicable for this backend query fix.
### Contributor License Agreement
- [x] 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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23386
Author: @suyua9
Created: 4/3/2026
Status: ❌ Closed
Base:
dev← Head:suyua9-fix-prompt-tag-cyrillic📝 Commits (1)
4368ccefix: query prompt tags by JSON elements📊 Changes
1 file changed (+18 additions, -5 deletions)
View changed files
📝
backend/open_webui/models/prompts.py(+18 -5)📄 Description
Pull Request Checklist
devbranch.python3 -m py_compile backend/open_webui/models/prompts.pyandgit diff --check.dev.fixChangelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Бизнес.Security
Breaking Changes
Additional Information
search_prompts()and confirm it previously lowercased serialized JSON text and usedLIKE.python3 -m py_compile backend/open_webui/models/prompts.pyandgit diff --check.Screenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.