diff --git a/plugins/memory/honcho/client.py b/plugins/memory/honcho/client.py index 3c779f64fea1..21f4e298f0cc 100644 --- a/plugins/memory/honcho/client.py +++ b/plugins/memory/honcho/client.py @@ -553,6 +553,10 @@ def get_honcho_client(config: HonchoClientConfig | None = None) -> Honcho: } if resolved_base_url: kwargs["base_url"] = resolved_base_url + if _is_local: + # Local workstation models can take well over 60s for dialectic calls. + # Use a longer SDK timeout so Hermes doesn't give up before Honcho responds. + kwargs["timeout"] = 300.0 _honcho_client = Honcho(**kwargs) diff --git a/tests/honcho_plugin/test_client.py b/tests/honcho_plugin/test_client.py index cfb89482d03a..88aa0ea599dc 100644 --- a/tests/honcho_plugin/test_client.py +++ b/tests/honcho_plugin/test_client.py @@ -542,6 +542,31 @@ def test_absent_everywhere_defaults_false(self, tmp_path): assert cfg.init_on_session_start is False +class TestGetHonchoClient: + def test_local_base_url_uses_longer_timeout(self): + import plugins.memory.honcho.client as mod + + reset_honcho_client() + config = HonchoClientConfig( + workspace_id="local-ws", + base_url="http://127.0.0.1:8000", + enabled=True, + raw={}, + ) + + with patch("honcho.Honcho") as mock_honcho: + mock_client = MagicMock() + mock_honcho.return_value = mock_client + + result = get_honcho_client(config) + + assert result is mock_client + _, kwargs = mock_honcho.call_args + assert kwargs["base_url"] == "http://127.0.0.1:8000" + assert kwargs["api_key"] == "local" + assert kwargs["timeout"] == 300.0 + + class TestResetHonchoClient: def test_reset_clears_singleton(self): import plugins.memory.honcho.client as mod