abhishekacharya200 opened a new pull request, #76228: URL: https://github.com/apache/airflow/pull/76228
`CohereHook(max_retries=0)` is ignored. The constructor checks `if self.max_retries:`, so 0 is treated as unset: the value never reaches `request_options` and the Cohere client falls back to its default of 2 retries. Anyone turning retries off, for example because Airflow task retries already cover them, still gets them. The check now uses `is not None`, so 0 is sent like any other value and it raises the same deprecation warning. Two parametrized tests cover this, with and without existing `request_options`. Both fail on main and pass here. The 5 tests in `test_cohere.py` pass and `ruff check` and `ruff format --check` are clean on the provider. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Opus 5.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]
