Skip to content

The agent that grows with you

fix: drop redundant None-guard on agent_result in agent:end payload

kshitij063f6941e574
diff --git a/gateway/run.py b/gateway/run.py
index 647a5d11f31..940a9c58b05 100644
--- a/gateway/run.py
+++ b/gateway/run.py
@@ -18112,8 +18112,8 @@ class GatewayRunner(GatewayAuthorizationMixin, GatewayKanbanWatchersMixin, Gatew
await self.hooks.emit("agent:end", {
**hook_ctx,
"response": (response or "")[:500],
- "model": agent_result.get("model", "") if agent_result else "",
- "provider": agent_result.get("provider", "") if agent_result else "",
+ "model": agent_result.get("model", ""),
+ "provider": agent_result.get("provider", ""),
})
# Check for pending process watchers (check_interval on background processes)