The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(honcho): honor host-specific baseUrl
LeonSGP43a97d6747f3e0
diff --git a/plugins/memory/honcho/client.py b/plugins/memory/honcho/client.pyindex 08efe0beaea..d8ef74f22b2 100644--- a/plugins/memory/honcho/client.py+++ b/plugins/memory/honcho/client.py@@ -575,7 +575,9 @@ class HonchoClientConfig:else None)base_url = (- native_base_url+ host_block.get("baseUrl")+ or host_block.get("base_url")+ or native_base_urlor raw.get("baseUrl")or raw.get("base_url")or os.environ.get("HONCHO_BASE_URL", "").strip()diff --git a/tests/honcho_plugin/test_client.py b/tests/honcho_plugin/test_client.pyindex e3b117aceb7..7306f937fc0 100644--- a/tests/honcho_plugin/test_client.py+++ b/tests/honcho_plugin/test_client.py@@ -202,6 +202,18 @@ class TestFromGlobalConfig:# Should fall back to from_env without crashingassert isinstance(config, HonchoClientConfig)+ def test_base_url_host_block_overrides_root_and_env(self, tmp_path):+ """Host-specific baseUrl should win for self-hosted Honcho deployments."""+ config_file = tmp_path / "config.json"+ config_file.write_text(json.dumps({+ "baseUrl": "http://root:9000",+ "hosts": {"hermes": {"baseUrl": "http://host-block:9001"}},+ }))++ with patch.dict(os.environ, {"HONCHO_BASE_URL": "http://env:8000"}, clear=False):+ config = HonchoClientConfig.from_global_config(config_path=config_file)+ assert config.base_url == "http://host-block:9001"+class TestResolveSessionName:def test_manual_override(self):