Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

fix(agno): respect yield_run_output in Team arun stream wrapper (#1101)

bajrangostwala1e6547c6d75
diff --git a/sdk/python/src/openlit/instrumentation/agno/async_agno.py b/sdk/python/src/openlit/instrumentation/agno/async_agno.py
index 9bbd4c79..01e5582b 100644
--- a/sdk/python/src/openlit/instrumentation/agno/async_agno.py
+++ b/sdk/python/src/openlit/instrumentation/agno/async_agno.py
@@ -333,14 +333,16 @@ async def _team_arun_stream_wrapper(
except Exception:
TeamRunOutput = None
- yield_run_response = kwargs.get("yield_run_response", None)
+ yield_run_output = kwargs.get("yield_run_output", None) or kwargs.get(
+ "yield_run_response", None
+ )
new_kwargs = dict(kwargs)
- new_kwargs["yield_run_response"] = True
+ new_kwargs["yield_run_output"] = True
async for response in wrapped(*args, **new_kwargs):
if TeamRunOutput and isinstance(response, TeamRunOutput):
final_response = response
- if yield_run_response:
+ if yield_run_output:
yield response
else:
yield response