Add full traceback logging to Hermes route for diagnostics
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -362,8 +362,10 @@ async def _fetch_hermes_token(endpoint: str) -> str:
|
||||
if cached:
|
||||
return cached
|
||||
|
||||
url = f"{endpoint}/"
|
||||
log.info(f"[hermes] fetching token — GET {url!r} (len={len(url)}, bytes={url.encode()!r})")
|
||||
async with httpx.AsyncClient(timeout=10.0) as client:
|
||||
resp = await client.get(f"{endpoint}/")
|
||||
resp = await client.get(url)
|
||||
resp.raise_for_status()
|
||||
html = resp.text
|
||||
|
||||
@@ -575,7 +577,12 @@ async def agent_chat(req: ChatRequest, authorization: str = Header(default="")):
|
||||
pose=valid_poses[0],
|
||||
conversation_id=req.conversation_id,
|
||||
)
|
||||
try:
|
||||
return await handle_hermes(req, agent, model, valid_poses)
|
||||
except Exception as e:
|
||||
import traceback
|
||||
log.error(f"[hermes] unhandled exception:\n{traceback.format_exc()}")
|
||||
raise
|
||||
|
||||
# ── Route: Agent0 MCP ─────────────────────────────────────────────────────
|
||||
if agent.agent_type == "agent0" or (model and model.type == "agent0"):
|
||||
|
||||
Reference in New Issue
Block a user