Add debug logging to /v1/agent/chat route handler

Log agent_type, full models payload and selected model on every request
to diagnose endpoint routing and empty-endpoint issues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 20:00:39 +02:00
parent 8704404c40
commit d74d1a74f8
+6
View File
@@ -558,6 +558,12 @@ async def agent_chat(req: ChatRequest, authorization: str = Header(default="")):
valid_poses = agent.poses if agent.poses else ["neutral"] valid_poses = agent.poses if agent.poses else ["neutral"]
model = select_model(req.models) model = select_model(req.models)
log.info(
f"[route] agent={agent.name!r} agent_type={agent.agent_type!r} "
f"models_payload={req.models} "
f"selected_model={model}"
)
# ── Route: Hermes Agent ─────────────────────────────────────────────────── # ── Route: Hermes Agent ───────────────────────────────────────────────────
if agent.agent_type == "hermes": if agent.agent_type == "hermes":
if not model or not model.endpoint: if not model or not model.endpoint: