Skip to content

The agent that grows with you

fix: add model and provider to agent:end hook payload

Ken Weiner1f5a22264cfe
diff --git a/gateway/run.py b/gateway/run.py
index 75f424ef6f6..9430d197051 100644
--- a/gateway/run.py
+++ b/gateway/run.py
@@ -18112,6 +18112,7 @@ 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 "",
})
# Check for pending process watchers (check_interval on background processes)