From 85ddf71a21c26f40c91a20473251c48ea4b44bd7 Mon Sep 17 00:00:00 2001 From: devorun <130918800+devorun@users.noreply.github.com> Date: Sat, 28 Mar 2026 22:04:49 +0300 Subject: [PATCH] fix(honcho): bypass API key validation for local servers Bypasses the strict API key validation when running a local Honcho server (`localhost` or `127.0.0.1`). If a local base_url is detected and no API key is provided, it assigns a dummy key so the initialization doesn't crash. --- honcho_integration/client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/honcho_integration/client.py b/honcho_integration/client.py index 385974d12f..469444d84f 100644 --- a/honcho_integration/client.py +++ b/honcho_integration/client.py @@ -133,6 +133,12 @@ def peer_memory_mode(self, peer_name: str) -> str: # block exists or enabled was set explicitly), vs auto-enabled from a # stray HONCHO_API_KEY env var. explicitly_configured: bool = False + + def __post_init__(self): + # Bypass API key validation for local Honcho servers + if self.base_url and ("localhost" in self.base_url or "127.0.0.1" in self.base_url): + if not self.api_key: + self.api_key = "local_dummy_key" @classmethod def from_env(cls, workspace_id: str = "hermes") -> HonchoClientConfig: