diff --git a/py/routes/handlers/misc_handlers.py b/py/routes/handlers/misc_handlers.py index 6238a228..14624a70 100644 --- a/py/routes/handlers/misc_handlers.py +++ b/py/routes/handlers/misc_handlers.py @@ -686,6 +686,9 @@ class DoctorHandler: ) async def resolve_filename_conflicts(self, request: web.Request) -> web.Response: + if self._settings.get("lora_syntax_format", "legacy") == "full": + return web.json_response({"success": True, "renamed": [], "count": 0}) + renamed: list[dict[str, Any]] = [] try: @@ -990,6 +993,18 @@ class DoctorHandler: } async def _check_filename_conflicts(self) -> dict[str, Any]: + # When full path syntax is active, duplicate filenames across subfolders + # are not ambiguous (), so skip the check. + if self._settings.get("lora_syntax_format", "legacy") == "full": + return { + "id": "filename_conflicts", + "title": "Duplicate Filename Conflicts", + "status": "ok", + "summary": "Full path syntax is active — duplicate filenames across folders are not ambiguous.", + "details": [], + "actions": [], + } + all_conflicts: list[dict[str, Any]] = [] total_conflict_groups = 0 total_conflict_files = 0 diff --git a/py/routes/handlers/model_handlers.py b/py/routes/handlers/model_handlers.py index 5438dd29..d2b8a15f 100644 --- a/py/routes/handlers/model_handlers.py +++ b/py/routes/handlers/model_handlers.py @@ -1177,6 +1177,12 @@ class ModelQueryHandler: async def find_filename_conflicts(self, request: web.Request) -> web.Response: try: + settings = get_settings_manager() + if settings.get("lora_syntax_format", "legacy") == "full": + return web.json_response( + {"success": True, "conflicts": [], "count": 0} + ) + duplicates = self._service.find_duplicate_filenames() result = [] cache = await self._service.scanner.get_cached_data() diff --git a/py/services/model_scanner.py b/py/services/model_scanner.py index 34fb6fe1..e85211ad 100644 --- a/py/services/model_scanner.py +++ b/py/services/model_scanner.py @@ -1120,6 +1120,11 @@ class ModelScanner: if self._hash_index is None or self.model_type != "lora": return + # When full path syntax is active, duplicate filenames across subfolders + # are fully qualified, so there is no ambiguity — skip the warning. + if get_settings_manager().get("lora_syntax_format", "legacy") == "full": + return + duplicates = self._hash_index.get_duplicate_filenames() if not duplicates: return