From 895af42039a21992252a8ba74499bc9d4052aa04 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Sun, 16 Nov 2025 23:26:28 -0800 Subject: [PATCH] Fix unbound response var exception in agent safety checker --- src/khoj/routers/helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/khoj/routers/helpers.py b/src/khoj/routers/helpers.py index b0d649ad..d93e8a49 100644 --- a/src/khoj/routers/helpers.py +++ b/src/khoj/routers/helpers.py @@ -324,6 +324,7 @@ async def acheck_if_safe_prompt(system_prompt: str, user: KhojUser = None, lax: safe: bool reason: Optional[str] = "" + response = None with timer("Chat actor: Check if safe prompt", logger): try: response = await send_message_to_model_wrapper(