kaxil commented on code in PR #76541:
URL: https://github.com/apache/airflow/pull/76541#discussion_r4483604696


##########
providers/common/ai/src/airflow/providers/common/ai/toolsets/skills.py:
##########
@@ -154,9 +162,13 @@ def __init__(
         self._inner: Any = None
         self._cleanup: Callable[[], None] | None = None
         self._locations: list[_SkillsLocation] = []
-        # The run's messages, prior history included. Calls made before an 
approval pause or
-        # replayed on a durable retry never reach call_tool, so the skills 
XCom counts these.
+        # The run's messages, its history included. Calls replayed on a 
durable retry never reach
+        # call_tool, so the skills XCom counts these.
         self._messages: Sequence[ModelMessage] = ()
+        # The agent run this instance serves, set by get_tools. ``async with 
agent:`` also enters
+        # the instance passed to the agent, which never serves a run and so 
never publishes. Not
+        # set in for_run: a DynamicToolset builds this toolset per run without 
calling its for_run.

Review Comment:
   `DynamicToolset` defaults to `per_run_step=True`, so a factory builds this 
toolset again on every model step, not once per run: each step clones the repo 
and pushes the XCom (main does the same, so the final counts are fine). Could 
this comment say per step, and could the docs line about the commit the latest 
run cloned mention that a factory re-clones on each step unless it is 
`DynamicToolset(fn, per_run_step=False)`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to