Commit Graph

2 Commits

Author SHA1 Message Date
Alankrit Verma
fcbf57466e refactor: update callback type signatures to support sync and async responses 2025-04-29 09:02:09 -04:00
Alankrit Verma
21736067f9 feat(llm_flows): support async before/after tool callbacks
Previously, callbacks were treated as purely synchronous,
so passing an async coroutine caused “was never awaited”
errors and Pydantic serialization failures.

Now we detect awaitable return values from
before_tool_callback and after_tool_callback,
and `await` them if necessary.

Fixes: #380
2025-04-28 14:36:25 -04:00