mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #23381] issue: SQLite: Prompt tag filter fails for Cyrillic tags #35493
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?
Originally created by @goldkreateav on GitHub (Apr 3, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23381
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.8.12
Ollama Version (if applicable)
No response
Operating System
Windows 10
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Prompts tagged with Бизнес should be returned.
Actual Behavior
0 prompts returned.
Steps to Reproduce
Logs & Screenshots
There's no actual logs for this.
Additional Information
Root cause:
prompt.tags is stored as JSON in SQLite and may be serialized with \uXXXX escapes. Using LIKE (and/or LOWER() which is ASCII-focused in SQLite) on the serialized JSON text does not reliably match Cyrillic tag strings.
Proposed fix
Use dialect-aware JSON search:
SQLite: EXISTS (SELECT 1 FROM json_each(prompt.tags) WHERE json_each.value = :tag) (JSON1, compares decoded values)
PostgreSQL: EXISTS (SELECT 1 FROM jsonb_array_elements_text(prompt.tags::jsonb) AS tag_elem WHERE tag_elem ILIKE :tag)
Keep a fallback for other dialects.
Notes
This change fixes Cyrillic tag filtering on SQLite without relying on LOWER()/NOCASE behavior.