airflow.providers.common.ai.utils.toolsets¶
Walk a pydantic-ai toolset and the toolsets it wraps or combines.
Functions¶
|
Yield |
|
Return the first toolset of type |
Module Contents¶
- airflow.providers.common.ai.utils.toolsets.iter_toolsets(toolset)[source]¶
Yield
toolsetand every toolset nested inside it, outermost first.pydantic-ai composes toolsets by wrapping:
.prefixed(),.filtered(),.prepared()and.renamed()each return aWrapperToolsetaround the original, and passing several toolsets together produces aCombinedToolset. A check that only looks at the top level therefore misses a toolset the moment an author composes it, which the documentation recommends for running two sandboxes on one agent. This walks both shapes.A toolset resolved per run from a callable (
DynamicToolset) has nothing to walk until the run starts, so it is yielded as itself and its contents are not inspected.