kaxil opened a new pull request, #74381:
URL: https://github.com/apache/airflow/pull/74381

   Stacked on #74379. Until that merges, this diff also shows its commit; the 
change here is the last commit.
   
   `pydantic-ai-skills` gives its tools a budget of one correction, and that 
toolset-level value takes precedence over the agent's `retries`. So a model 
that named two missing skill resources in a row failed the run with 
`UnexpectedModelBehavior: Tool 'read_skill_resource' exceeded max retries count 
of 1`, even with `agent_params={"retries": {"tools": 3}}`. Unlike the other 
toolsets in this provider, `AgentSkillsToolset` had no way to raise it.
   
   `AgentSkillsToolset` now takes `max_retries` and passes it to 
`SkillsToolset`. It is only forwarded when set, like `exclude_tools` and 
`exclude_resources`, so the default budget is unchanged.
   
   **Why `None` keeps one correction rather than following the agent's 
`retries`.** That is what `max_retries=None` means on the SQL, hook and object 
storage toolsets. Here, though, `SkillsToolset` assigns its budget to each tool 
when it registers them, so honouring the agent's value would mean overriding 
the library's tools after construction. A plain pass-through keeps the default 
where it is today and avoids reaching into the library.
   
   A real-run test covers both cases: the default still fails on the second 
refused read, and `max_retries=2` lets the run finish. The restricted Agent 
Skills example now sets `max_retries=3`, and its guide shows both outcomes, 
recaptured from a real run.
   


-- 
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