This is an automated email from the ASF dual-hosted git repository.
potiuk 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 62e50c50030 List Meta among common.ai's external services and
recognise new pydantic-ai 2.59 providers (#75641)
62e50c50030 is described below
commit 62e50c50030524b5405b4f3a879343c7e8b2d9e0
Author: Wei Lee <[email protected]>
AuthorDate: Tue Oct 27 05:03:49 2026 +0800
List Meta among common.ai's external services and recognise new pydantic-ai
2.59 providers (#75641)
pydantic-ai-slim 2.59.0 adds the elevenlabs, meta and openai_chatgpt
provider modules.
Meta (Muse models, api_key based) is declared in provider.yaml and
labelled. ElevenLabs
is not reachable through infer_model and ChatGPT plan sign-in takes only
OAuth
credentials the connection cannot supply, so both are recorded as
exclusions.
The declared-vendor-exists-upstream tripwires now start at 2.59.0.
---
providers/common/ai/provider.yaml | 1 +
.../providers/common/ai/get_provider_info.py | 1 +
.../tests/unit/common/ai/test_provider_metadata.py | 29 +++++++++++++++++-----
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/providers/common/ai/provider.yaml
b/providers/common/ai/provider.yaml
index 814a850a20b..158a36a61bd 100644
--- a/providers/common/ai/provider.yaml
+++ b/providers/common/ai/provider.yaml
@@ -193,6 +193,7 @@ connection-types:
- Heroku
- Hugging Face
- LiteLLM
+ - Meta
- Mistral AI
- Moonshot AI
- Nebius
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 97364eb0c50..188a2831d0f 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
@@ -165,6 +165,7 @@ def get_provider_info():
"Heroku",
"Hugging Face",
"LiteLLM",
+ "Meta",
"Mistral AI",
"Moonshot AI",
"Nebius",
diff --git a/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py
b/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py
index cdc17b932c7..c235d109b82 100644
--- a/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py
+++ b/providers/common/ai/tests/unit/common/ai/test_provider_metadata.py
@@ -76,6 +76,7 @@ LABELS = {
"heroku": "Heroku",
"huggingface": "Hugging Face",
"litellm": "LiteLLM",
+ "meta": "Meta",
"mistral": "Mistral AI",
"moonshotai": "Moonshot AI",
"nebius": "Nebius",
@@ -108,8 +109,10 @@ NON_MODULE_SERVICES: set[str] = set()
# routes to -- `infer_model("voyageai:...")` /
`infer_model("sentence-transformers:...")`
# raise `UserError: Unknown model`, confirmed by
`test_unreachable_modules_stay_unreachable`
# below. Not listed in `LABELS`/`provider.yaml` because there is no
`common.ai` code path
-# (chat or embedding) that reaches them.
-UNREACHABLE_MODULES = {"voyageai", "sentence_transformers"}
+# (chat or embedding) that reaches them. `elevenlabs` (added in
pydantic-ai-slim 2.59.0) is
+# the same: its provider only backs ElevenLabs speech/realtime models, which
`infer_model`
+# does not route to (`UserError: Unknown model: elevenlabs:...`, checked on
2.59.0).
+UNREACHABLE_MODULES = {"voyageai", "sentence_transformers", "elevenlabs"}
# Modules that ARE reachable through `infer_model` (unlike
UNREACHABLE_MODULES) but are
# excluded by decision because pydantic-ai itself marks the upstream backend
dead:
@@ -147,7 +150,12 @@ DEPRECATED_UPSTREAM_MODULES = {"github"}
# pydantic-ai gives one of these providers an `api_key`/`base_url` constructor
parameter, this
# must fail so a human re-evaluates whether the module belongs back in
`LABELS` and
# `provider.yaml`, instead of it staying excluded forever on a stale rationale.
-HOOK_INCOMPATIBLE_AUTH_MODULES = {"openai_codex"}
+HOOK_INCOMPATIBLE_AUTH_MODULES = {"openai_codex", "openai_chatgpt"}
+
+# `openai_chatgpt` (pydantic-ai-slim 2.59.0, "Sign in with ChatGPT" plan
usage) is excluded for
+# the same reason as `openai_codex`: `OpenAIChatGPTProvider.__init__` accepts
only `credentials`,
+# `credential_source`, `openai_client` and `http_client`, so the
`api_key`/`base_url` the hook
+# sends cannot reach it; only an OAuth sign-in flow the hook cannot express
can.
# `pydantic_ai.providers.openai_codex` (the sole
`HOOK_INCOMPATIBLE_AUTH_MODULES` member) was
# added in pydantic-ai-slim 2.41.0 -- absent on 2.40.0 and below (bisected
empirically; the
@@ -155,6 +163,12 @@ HOOK_INCOMPATIBLE_AUTH_MODULES = {"openai_codex"}
# so on the floor it would raise `ModuleNotFoundError` instead of testing
anything.
OPENAI_CODEX_AVAILABLE_FROM = Version("2.41.0")
+# First pydantic-ai-slim release carrying each
`HOOK_INCOMPATIBLE_AUTH_MODULES` member.
+HOOK_INCOMPATIBLE_AUTH_MODULES_AVAILABLE_FROM = {
+ "openai_codex": OPENAI_CODEX_AVAILABLE_FROM,
+ "openai_chatgpt": Version("2.59.0"),
+}
+
requires_openai_codex_module = pytest.mark.skipif(
Version(Version(version("pydantic-ai-slim")).base_version) <
OPENAI_CODEX_AVAILABLE_FROM,
reason=(
@@ -167,14 +181,14 @@ requires_openai_codex_module = pytest.mark.skipif(
# supports `pydantic-ai-slim>=2.33.0` (`pyproject.toml`) and CI's "Low dep
tests" job installs
# exactly that floor. Vendors upstream added after the floor are legitimately
absent there --
# bisected empirically: `vllm` landed in 2.38.0, `github_copilot` in 2.42.0,
`typesafe` in
-# 2.45.0, `system_one` in 2.53.0 and `openai_decisions` in 2.55.0
(`openai_codex` also landed
+# 2.45.0, `system_one` in 2.53.0 and `openai_decisions` in 2.55.0 and `meta`
in 2.59.0 (`openai_codex` also landed
# after the floor, in 2.41.0, but is excluded from this reasoning -- see
# `OPENAI_CODEX_AVAILABLE_FROM` above) -- so only the "installed but not
declared" direction
# holds on every supported version. The opposite direction ("declared but not
installed") is a
# real drift signal solely from the release that carries every vendor
currently declared, i.e.
-# the latest of them, `openai_decisions`'s 2.55.0: raise this when a newly
declared vendor lands
+# the latest of them, `meta`'s 2.59.0: raise this when a newly declared vendor
lands
# in a later release.
-ALL_DECLARED_VENDORS_AVAILABLE_FROM = Version("2.55.0")
+ALL_DECLARED_VENDORS_AVAILABLE_FROM = Version("2.59.0")
requires_all_declared_vendors = pytest.mark.skipif(
Version(Version(version("pydantic-ai-slim")).base_version) <
ALL_DECLARED_VENDORS_AVAILABLE_FROM,
@@ -341,7 +355,10 @@ class TestPydanticAIExternalServicesDrift:
re-evaluates whether the module belongs back in ``LABELS`` and
``provider.yaml``, instead
of it staying excluded forever on a stale rationale.
"""
+ installed = Version(Version(version("pydantic-ai-slim")).base_version)
for module in HOOK_INCOMPATIBLE_AUTH_MODULES:
+ if installed <
HOOK_INCOMPATIBLE_AUTH_MODULES_AVAILABLE_FROM[module]:
+ continue
mod = importlib.import_module(f"pydantic_ai.providers.{module}")
provider_classes = _provider_classes_in_module(mod)
for cls in provider_classes: