Skip to content

Log capability tool calls in AgentOperator - #72202

Merged
kaxil merged 11 commits into
apache:mainfrom
jeff3071:fix-capability-toolset-logging
Oct 12, 2026
Merged

kaxil merged 11 commits into
apache:mainfrom
jeff3071:fix-capability-toolset-logging

Conversation

@jeff3071

@jeff3071 jeff3071 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

AgentOperator applies real-time tool-call logging to entries passed through toolsets=, but concrete toolsets supplied through a pydantic-ai Toolset capability bypass that logging even when enable_tool_logging=True.

What

  • Apply LoggingToolset by get_wrapper_toolset().
  • Catch the control-flow signals (ModelRetry, ApprovalRequired, CallDeferred, SkipToolExecution and SkipToolValidation) and re-raising.

Before

image

After

image
Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-5.6-sol)

Generated-by: Codex (GPT-5.6-sol) following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/agent.py Outdated
Comment thread providers/common/ai/docs/operators/agent.rst Outdated
Comment thread providers/common/ai/tests/unit/common/ai/operators/test_agent.py Outdated
Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/agent.py Outdated
Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/agent.py Outdated
Comment thread providers/common/ai/docs/operators/agent.rst Outdated
Comment thread providers/common/ai/src/airflow/providers/common/ai/toolsets/logging.py Outdated
Comment thread providers/common/ai/docs/operators/agent.rst Outdated
Comment thread providers/common/ai/docs/operators/agent.rst Outdated
Comment thread providers/common/ai/docs/toolsets.rst Outdated
Comment thread providers/common/ai/tests/unit/common/ai/operators/test_agent.py Outdated
@jeff3071
jeff3071 force-pushed the fix-capability-toolset-logging branch 4 times, most recently from aa69ae1 to f2bfef6 Compare September 24, 2026 14:59
Comment thread providers/common/ai/src/airflow/providers/common/ai/toolsets/logging.py Outdated
Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/agent.py Outdated
Comment thread providers/common/ai/tests/unit/common/ai/operators/test_agent.py Outdated
Comment thread providers/common/ai/tests/unit/common/ai/operators/test_agent.py Outdated
@jeff3071
jeff3071 force-pushed the fix-capability-toolset-logging branch from f2bfef6 to c52175d Compare September 29, 2026 15:12
Comment thread providers/common/ai/tests/unit/common/ai/operators/test_agent.py Outdated
Comment thread providers/common/ai/docs/toolsets/logging.rst Outdated
@jeff3071
jeff3071 force-pushed the fix-capability-toolset-logging branch 2 times, most recently from abe2e37 to 63228a9 Compare October 5, 2026 12:39
Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/agent.py Outdated
Comment thread providers/common/ai/docs/operators/agent.rst Outdated
Comment thread providers/common/ai/tests/unit/common/ai/toolsets/test_logging.py Outdated
Comment thread providers/common/ai/src/airflow/providers/common/ai/operators/agent.py Outdated
@kaxil

kaxil commented Oct 6, 2026

Copy link
Copy Markdown
Member

Could you resolve conflicts too plz

@jeff3071
jeff3071 force-pushed the fix-capability-toolset-logging branch from ed374b5 to 56b7166 Compare October 7, 2026 06:17
Toolsets supplied through pydantic-ai capabilities currently bypass real-time Airflow logging even when tool logging is enabled. This makes capability tools less observable than toolsets passed directly to AgentOperator.
@jeff3071
jeff3071 force-pushed the fix-capability-toolset-logging branch from 56b7166 to dcad63a Compare October 8, 2026 14:36
@kaxil
kaxil merged commit 06e7e28 into apache:main Oct 12, 2026
85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants