From 1579af28a087b96a580f97382a87f4488b7ecd60 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 10 Oct 2026 17:48:08 +0200 Subject: [PATCH] fix: skill search does not find a skill by its translated name (#32174) Searching Workspace > Skills only matched a skill's original name, description and id, so typing the German name given to a skill in its editor found nothing, even with the interface in German. The search now also matches the names and descriptions translated in the skill editor, in any language, so both the translated and the original name find the skill, as the Translations page in the docs says. Fixes #32018 --- backend/open_webui/models/skills.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/models/skills.py b/backend/open_webui/models/skills.py index d101695c8d..b307e49fba 100644 --- a/backend/open_webui/models/skills.py +++ b/backend/open_webui/models/skills.py @@ -8,9 +8,10 @@ from open_webui.models.access_grants import AccessGrant, AccessGrantModel, Acces from open_webui.models.groups import Groups from open_webui.models.skill_history import SkillHistories, SkillHistory from open_webui.models.users import User, UserModel, UserResponse, Users +from open_webui.utils.misc import json_text_variants from open_webui.utils.skill_files import SkillFile, SkillFileOperation, apply_operations, validate_files from pydantic import BaseModel, ConfigDict, Field -from sqlalchemy import JSON, BigInteger, Boolean, Column, String, Text, delete, func, or_, select, update +from sqlalchemy import JSON, BigInteger, Boolean, Column, String, Text, cast, delete, func, or_, select, update from sqlalchemy.ext.asyncio import AsyncSession log = logging.getLogger(__name__) @@ -301,6 +302,10 @@ class SkillsTable: Skill.id.ilike(f'%{query_key}%'), User.name.ilike(f'%{query_key}%'), User.email.ilike(f'%{query_key}%'), + *( + cast(Skill.meta, String).icontains(variant, autoescape=True) + for variant in json_text_variants(query_key) + ), ) )