zozo123 opened a new pull request, #70096: URL: https://github.com/apache/airflow/pull/70096
Malformed model-generated arguments currently bypass validation in the Common AI toolsets. Missing or mistyped arguments can therefore reach tool implementations and fail with `KeyError` or `TypeError` instead of producing the bounded retry that pydantic-ai supports. This change derives each tool's argument validator from the same JSON Schema advertised to the model and applies it to `SQLToolset`, `DataFusionToolset`, and `HookToolset`. Hook introspection keeps optional and union parameters accurate, leaves unsupported annotations permissive, drops unexpected arguments for fixed signatures, and preserves additional arguments for methods that accept `**kwargs`. Validation: - 1,043 Common AI unit tests passed - provider mypy passed - pre-commit and manual prek checks passed --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Fable 5) and Codex (GPT-5) Generated-by: Claude Code (Fable 5) and Codex (GPT-5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
