From 2ff54ae6b35d13a24232192bbc21bcd0fa0682d1 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Fri, 27 Feb 2026 00:13:47 -0800 Subject: [PATCH] fix(gateway): Remove session_db from AIAgent instantiation to prevent errors This change removes the session_db parameter from AIAgent instantiations in gateway/run.py, addressing issues related to session management. The previous implementation caused errors when session_db was not properly initialized, leading to failures in session_search functionality. --- gateway/run.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/gateway/run.py b/gateway/run.py index 71d5c60d4..3d34aaad8 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -185,7 +185,6 @@ class GatewayRunner: quiet_mode=True, enabled_toolsets=["memory", "skills"], session_id=old_entry.session_id, - session_db=self._session_db, ) # Build conversation history from transcript @@ -871,7 +870,6 @@ class GatewayRunner: _flush_api_key = os.getenv("OPENAI_API_KEY") or os.getenv("OPENROUTER_API_KEY", "") _flush_base_url = os.getenv("OPENAI_BASE_URL") or os.getenv("OPENROUTER_BASE_URL", "https://openrouter.ai/api/v1") _flush_model = os.getenv("HERMES_MODEL") or os.getenv("LLM_MODEL", "anthropic/claude-opus-4.6") - _flush_session_db = self._session_db def _do_flush(): tmp_agent = AIAgent( model=_flush_model, @@ -881,7 +879,6 @@ class GatewayRunner: quiet_mode=True, enabled_toolsets=["memory"], session_id=old_entry.session_id, - session_db=_flush_session_db, ) # Build simple message list from transcript msgs = []