Add util_model_call_after extension hook

Adds a symmetric "after" hook to call_utility_model, matching the existing util_model_call_before hook. This allows plugins (e.g. observability/tracing) to capture the utility model response for logging, cost tracking, and span finalization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

TerminallyLazy committed Mar 6, 2026 at 09:52 UTC 592fa615ae0e43f51ffc9939d36f8c1e0a6d9926
1 file changed +4
agent.py
+4
@@ -788,6 +788,10 @@ class Agent:
788 ),
789 )
790
791 + await extension.call_extensions_async(
792 + "util_model_call_after", self, call_data=call_data, response=response
793 + )
794 +
795 return response
796
797 @extension.extensible