You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2026/04/28 20:55:06 UTC
(airflow) branch main updated: Add Configuration Reference docs page to Common AI provider (#66024)
This is an automated email from the ASF dual-hosted git repository.
kaxil pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 582a9edaf63 Add Configuration Reference docs page to Common AI provider (#66024)
582a9edaf63 is described below
commit 582a9edaf638ad6b21efb8f8c3803478feb5ab6f
Author: Kaxil Naik <ka...@apache.org>
AuthorDate: Tue Apr 28 21:54:58 2026 +0100
Add Configuration Reference docs page to Common AI provider (#66024)
* Add Configuration Reference docs page to Common AI provider
Documents the ``[common.ai] durable_cache_path`` option (consumed by
``airflow.providers.common.ai.durable.storage._get_base_path``) under a
new ``configurations-ref`` page, mirroring the pattern other providers
(e.g. Celery) use.
* Fix include paths in Common AI configurations-ref.rst
Provider docs live under providers/common/ai/docs/ (one level deeper
than top-level providers like Celery), so reaching devel-common/ needs
four ../ segments instead of three. Without this the spellcheck/docs
build fails with No such file or directory:
providers/devel-common/src/sphinx_exts/includes/... because Sphinx
resolves the include relative to the source root.
Matches the pattern already used by providers/common/io.
---
providers/common/ai/docs/configurations-ref.rst | 19 ++++++++++++++++++
providers/common/ai/docs/index.rst | 1 +
providers/common/ai/provider.yaml | 23 ++++++++++++++++++++++
.../providers/common/ai/get_provider_info.py | 14 +++++++++++++
4 files changed, 57 insertions(+)
diff --git a/providers/common/ai/docs/configurations-ref.rst b/providers/common/ai/docs/configurations-ref.rst
new file mode 100644
index 00000000000..ea8e668d757
--- /dev/null
+++ b/providers/common/ai/docs/configurations-ref.rst
@@ -0,0 +1,19 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ .. http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+.. include:: /../../../../devel-common/src/sphinx_exts/includes/providers-configurations-ref.rst
+.. include:: /../../../../devel-common/src/sphinx_exts/includes/sections-and-options.rst
diff --git a/providers/common/ai/docs/index.rst b/providers/common/ai/docs/index.rst
index 612739ad471..a9172cfcd83 100644
--- a/providers/common/ai/docs/index.rst
+++ b/providers/common/ai/docs/index.rst
@@ -46,6 +46,7 @@
:maxdepth: 1
:caption: References
+ Configuration <configurations-ref>
Python API <_api/airflow/providers/common/ai/index>
.. toctree::
diff --git a/providers/common/ai/provider.yaml b/providers/common/ai/provider.yaml
index 8cce0d60fed..33b5192a306 100644
--- a/providers/common/ai/provider.yaml
+++ b/providers/common/ai/provider.yaml
@@ -61,6 +61,29 @@ plugins:
plugin-class: airflow.providers.common.ai.plugins.hitl_review.HITLReviewPlugin
+config:
+ common.ai:
+ description: |
+ Options for the ``apache-airflow-providers-common-ai`` provider.
+ options:
+ durable_cache_path:
+ description: |
+ ObjectStorage URI used to persist per-step caches when running
+ ``AgentOperator`` / ``@task.agent`` with ``durable=True``. Each task
+ execution writes a single JSON file under this path containing its
+ cached model responses and tool results, so that on retry the agent
+ can replay completed steps instead of re-issuing LLM calls and tool
+ invocations. The file is deleted on successful task completion.
+
+ Required when ``durable=True`` is used. Any scheme supported by
+ ``airflow.sdk.ObjectStoragePath`` is accepted (``file://``, ``s3://``,
+ ``gs://``, ``azure://``, ...).
+ version_added: 0.1.0
+ type: string
+ example: "file:///tmp/airflow_durable_cache"
+ default: ""
+
+
connection-types:
- hook-class-name: airflow.providers.common.ai.hooks.pydantic_ai.PydanticAIHook
hook-name: "Pydantic AI"
diff --git a/providers/common/ai/src/airflow/providers/common/ai/get_provider_info.py b/providers/common/ai/src/airflow/providers/common/ai/get_provider_info.py
index 1790ef85819..b45714dbb4e 100644
--- a/providers/common/ai/src/airflow/providers/common/ai/get_provider_info.py
+++ b/providers/common/ai/src/airflow/providers/common/ai/get_provider_info.py
@@ -64,6 +64,20 @@ def get_provider_info():
"plugin-class": "airflow.providers.common.ai.plugins.hitl_review.HITLReviewPlugin",
}
],
+ "config": {
+ "common.ai": {
+ "description": "Options for the ``apache-airflow-providers-common-ai`` provider.\n",
+ "options": {
+ "durable_cache_path": {
+ "description": "ObjectStorage URI used to persist per-step caches when running\n``AgentOperator`` / ``@task.agent`` with ``durable=True``. Each task\nexecution writes a single JSON file under this path containing its\ncached model responses and tool results, so that on retry the agent\ncan replay completed steps instead of re-issuing LLM calls and tool\ninvocations. The file is deleted on successful task completion.\n\nRequired when ``durable=True`` is used. Any s [...]
+ "version_added": "0.1.0",
+ "type": "string",
+ "example": "file:///tmp/airflow_durable_cache",
+ "default": "",
+ }
+ },
+ }
+ },
"connection-types": [
{
"hook-class-name": "airflow.providers.common.ai.hooks.pydantic_ai.PydanticAIHook",