airflow.providers.common.ai.example_dags.example_llm_retry_policy

Example DAG demonstrating LLM-powered retry policies.

Uses an LLM (via PydanticAIHook) to classify errors and decide whether to retry, fail immediately, or retry with a custom delay.

Prerequisites:
  • Connection pydanticai_default with conn_type='pydanticai', password=<API key>, extra='{"model": "anthropic:claude-haiku-4-5-20251001"}'

  • pip install apache-airflow-providers-common-ai[anthropic]

Attributes

llm_policy

Module Contents

airflow.providers.common.ai.example_dags.example_llm_retry_policy.llm_policy[source]

Was this entry helpful?