From c590b8a53a90c184c2530f1bfcd16ace5255d4eb Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Wed, 17 Jun 2026 20:21:29 +0200 Subject: [PATCH] fix(archivar): replace asyncio.to_thread with run_in_executor in _llm_room_lookup --- plugin/archivar/router.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/archivar/router.py b/plugin/archivar/router.py index eee2760..2ea9989 100644 --- a/plugin/archivar/router.py +++ b/plugin/archivar/router.py @@ -598,8 +598,9 @@ class BidirectionalRouter: # Try LLM — expects room ID directly # Semaphore schützt vor parallelen Ollama-Aufrufen (qwen2.5:7b = single-request) async with self._llm_semaphore: - llm_result = await asyncio.to_thread( - self._classifier._llm_raw_sync, prompt + loop = asyncio.get_running_loop() + llm_result = await loop.run_in_executor( + None, self._classifier._llm_raw_sync, prompt ) if llm_result is None: return None, True # LLM-Aufruf fehlgeschlagen