You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Honcho view fails (422 UnprocessableEntityError) when honcho.json aiPeer contains a space — peer IDs not slugged #35
The Honcho memory view of the plugin fails with an HTTP 422 (UnprocessableEntityError) whenever the configured Honcho AI peer name contains a character outside [a-zA-Z0-9_-] — in our case a space (aiPeer: "RU Risk" in honcho.json).
The main honcho plugin slugs peer IDs before calling the Honcho API (re.sub(r'[^a-zA-Z0-9_-]+', '-', ...)), so the real server-side peer is RU-Risk. hermes-memory-ui passes the raw, unslogued name (RU Risk) to the Honcho SDK, and the server's peer endpoint rejects it:
UnprocessableEntityError
[{'type': 'string_pattern_mismatch', 'loc': ['body', 'id'],
'msg': "String should match pattern '^[a-zA-Z0-9_-]+$'",
'input': 'RU Risk'}]
Because the plugin surfaces the raised exception into base["error"], the whole Honcho panel shows an error and stays empty, even though the Honcho data itself is fine and the main honcho plugin works with the same identity.
Steps to Reproduce
Configure a profile with honcho.json containing an aiPeer value containing a space, e.g. "RU Risk" (a display-style name with a space).
Open the plugin's Honcho memory view (or call GET /api/plugins/hermes-memory-ui/honcho).
The view errors out; the underlying Honcho data is unreachable from the dashboard.
Expected Behavior
Peer IDs taken from honcho.json should be slugged to the API-safe form (the same way the main honcho plugin does it) before being passed to the Honcho SDK, so the view resolves the actual server-side peer (RU Risk → RU-Risk).
Actual Behavior
_honcho_payload() passes the raw display name through, and client.peer("RU Risk") raises a 422 from the Honcho server; the whole panel reports an error.
In dashboard/plugin_api.py, _honcho_payload() (~line 1113), slug the IDs resolved from the config before constructing the SDK peers:
def_slug_peer(name: Any) ->str:
"""Mirror the main honcho plugin: peer IDs must match ^[a-zA-Z0-9_-]+$."""returnre.sub(r"[^a-zA-Z0-9_-]+", "-", str(name)).strip("-") or"user"client=get_honcho_client(cfg)
user_peer_id=_slug_peer(honcho_cfg["user_peer"] or"user")
ai_peer_id=_slug_peer(honcho_cfg["ai_peer"] orhoncho_cfg["host"] or"hermes")
This is a local patch I applied and verified — after it, the Honcho view loads with no error (error: None) and correctly resolves the display name RU Risk to the existing server-side peer RU-Risk (peer cards, representations, and conclusions all populate).
Activity
xraysight commentedon Nov 28, 2026
Thanks for the clear report and for testing a local fix, @atvarady ! The fix is in #36 and shipped in v0.7.2.
The UI now follows Honcho’s own peer ID rules, so RU Risk resolves to your existing RU-Risk peer. No changes to honcho.json are needed.