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): deprecate old Agno yield_run_response parameter for new yi… (#948)

Bryce Tichit3bd96c0d1074
diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml
index 702550f8..30da4f52 100644
--- a/sdk/python/pyproject.toml
+++ b/sdk/python/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openlit"
-version = "1.36.3"
+version = "1.36.4"
description = "OpenTelemetry-native Auto instrumentation library for monitoring LLM Applications and GPUs, facilitating the integration of observability into your GenAI-driven projects"
authors = ["OpenLIT"]
license = "Apache-2.0"
diff --git a/sdk/python/src/openlit/instrumentation/agno/async_agno.py b/sdk/python/src/openlit/instrumentation/agno/async_agno.py
index 59a7828c..7ed740aa 100644
--- a/sdk/python/src/openlit/instrumentation/agno/async_agno.py
+++ b/sdk/python/src/openlit/instrumentation/agno/async_agno.py
@@ -239,17 +239,19 @@ def async_agent_run_stream_wrap(
try:
# agno 2.x: when `yield_run_response=True`, the final `RunOutput` is yielded
# rather than stored on `instance.run_response`
+ # agno 2.3+: `yield_run_response` has been deprecated for `yield_run_output`
try:
from agno.run.agent import RunOutput # noqa: WPS433 # pylint: disable=import-error
except Exception: # noqa: WPS429
RunOutput = None # type: ignore # pylint: disable=invalid-name
- yield_run_response = kwargs.get("yield_run_response", None)
+ # `yield_run_response` is backwards compatibility for agno < 2.3
+ 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 RunOutput and isinstance(response, RunOutput):
final_response = response
- if yield_run_response:
+ if yield_run_output:
yield response
else:
yield response