Skip to content

Cap pydantic-ai-skills below 2 for the Common AI skills extra - #74899

Merged
kaxil merged 2 commits into
apache:mainfrom
astronomer:cap-pydantic-ai-skills-below-2
Oct 17, 2026
Merged

kaxil merged 2 commits into
apache:mainfrom
astronomer:cap-pydantic-ai-skills-below-2

Conversation

@kaxil

@kaxil kaxil commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

AgentSkillsToolset fails on every run in a fresh install of the Common AI provider with the skills extra. The extra asks for pydantic-ai-skills>=1.2.0 with no upper bound, so today it resolves 2.1.0 (checked with uv pip compile against the released 0.10.0). pydantic-ai-skills 2.0 removed SkillsToolset, which the toolset wraps, so the import in __aenter__ fails before the first model request. The error then tells the user to install the skills extra, which they already have.

This caps the extra and the dev dependency group at >=1.2.0,<2. 1.2.0, 1.3.0 and 1.4.0 all export SkillsToolset; 2.0.0 and 2.1.0 do not. The error now separates the two cases: if pydantic_ai_skills is missing, it still points at the extra; if it is installed without SkillsToolset, it names the installed version and the supported range.

Why CI didn't catch it. The root pyproject.toml had a temporary exclude-newer-package cutoff for pydantic-ai-skills (in both blocks), added so 1.2.0 could resolve inside the exclude-newer window. It kept uv.lock on 1.2.0, so no later release was ever tested. With the cap in place the cutoff is no longer needed, so this removes it, and the lock now moves to 1.4.0, the latest 1.x. That is the only package that changes in uv.lock. The existing AgentSkillsToolset tests pass on 1.4.0.

Why a cap rather than a port to 2.x. 2.0 is a rewrite, not a rename: it removes SkillsToolset, leaving SkillsCapability (which 1.x already ships), so each skill loads as a deferred pydantic-ai capability, and the tool names the model sees change. Supporting it means moving AgentSkillsToolset onto capabilities= and remapping exclude_tools / exclude_resources. That belongs in its own PR, and the cap fixes installs now.

Users on an affected release can pin pydantic-ai-skills<2 next to apache-airflow-providers-common-ai[skills].

Related to #74741

pydantic-ai-skills 2.0 removed SkillsToolset, which AgentSkillsToolset
wraps, and the skills extra had no upper bound, so a fresh install
resolved 2.1.0 and every AgentSkillsToolset run failed with an error
telling the user to install the extra they already had.

Cap the extra and the dev group at >=1.2.0,<2, and make the error name
the installed version and the supported range when pydantic-ai-skills is
present but has no SkillsToolset. Drop the root exclude-newer cutoff that
kept uv.lock on 1.2.0, so CI now tests 1.4.0, the latest 1.x.
@kaxil
kaxil merged commit c7cec68 into apache:main Oct 17, 2026
560 of 561 checks passed
@kaxil
kaxil deleted the cap-pydantic-ai-skills-below-2 branch October 17, 2026 10:22
potiuk added a commit to potiuk/airflow that referenced this pull request Oct 17, 2026
common.ai 1.0.0 was pulled from the 2026-10-14 wave so it could ship
with the pydantic-ai-skills cap (apache#74899): its "skills" extra allowed
pydantic-ai-skills 2.x, which breaks a fresh install at run time.
1.0.0 was never published, so rc2 keeps the version and the changelog
section grows with everything that has merged since rc1.

openai's common.compat floor was still the "use next version" placeholder
from apache#74149, which admits common.compat releases that lack
get_async_extra_dejson; 1.21.0 is the first one that has it.

Generated-by: Claude Opus 5
potiuk added a commit that referenced this pull request Oct 17, 2026
common.ai 1.0.0 was pulled from the 2026-10-14 wave so it could ship
with the pydantic-ai-skills cap (#74899): its "skills" extra allowed
pydantic-ai-skills 2.x, which breaks a fresh install at run time.
1.0.0 was never published, so rc2 keeps the version and the changelog
section grows with everything that has merged since rc1.

openai's common.compat floor was still the "use next version" placeholder
from #74149, which admits common.compat releases that lack
get_async_extra_dejson; 1.21.0 is the first one that has it.

Generated-by: Claude Opus 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants