fix(gateway): log agent task failures instead of silently losing usage data

This commit is contained in:
wabrent 2026-05-07 12:53:59 +03:00 committed by Teknium
parent fcd619cae4
commit 98ca0694d6

View file

@ -1326,8 +1326,8 @@ class APIServerAdapter(BasePlatformAdapter):
try:
result, agent_usage = await agent_task
usage = agent_usage or usage
except Exception:
pass
except Exception as exc:
logger.warning("Agent task %s failed, usage data lost: %s", completion_id, exc)
# Finish chunk
finish_chunk = {