fix(gateway): log agent task failures instead of silently losing usage data
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user