Conversation
…I image pydantic-ai-slim below 2.33 cannot talk to anthropic 1.x: it hands the SDK an httpx v1 client that anthropic rejects, and it passes temperature as a messages.create() kwarg that anthropic 1.x removed. The workspace lock was stuck on 2.31.1 because pydantic-ai-slim[openai]>=2.33 declares openai>=3 while llama-index-llms-openai and litellm (via the Google provider's aiplatform evaluation extra) cap openai below 3. Raise the provider's floor to 2.33.0 and add a workspace uv override that holds openai on 2.x, the pairing constraints-main already ships and the one the CI image's pip check accepts. The lock moves only pydantic-ai-slim and pydantic-graph to 2.44.0. Published wheels are unchanged apart from the floor.
…t the lowest resolution With the openai override in place, the lowest-direct-dependency run installs the provider's own floors instead of the ones upstream caps used to force. openai 2.45 and 2.46 reject the httpx2 client pydantic-ai-slim>=2.33 hands them; 2.47.0 is the first that accepts it. llama-index-llms-openai 0.6.0 declares llama-index-core>=0.13 but imports a type core only gained in 0.14; 0.6.8 is the first release whose metadata matches, and it needs core>=0.14.5. The override's lower bound moves to 2.47.0 too, since it replaces the provider's floor during that resolution.
kaxil
force-pushed
the
common-ai-pydantic-ai-floor-anthropic
branch
from
September 22, 2026 00:21
a347e30 to
729f5cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Common AI provider's Anthropic models cannot be exercised in the CI image or a local breeze checkout. The image installs pydantic-ai-slim 2.31.1 next to anthropic 1.5.0, and that pair fails before any request leaves the process: 2.31 hands the SDK an httpx v1 client that anthropic 1.x rejects (
Invalid http_client argument ... this SDK uses httpx2), and even with a pre-built client it passestemperatureas amessages.create()kwarg that anthropic 1.x removed. pydantic-ai-slim 2.33.0 fixed both, so this raises the provider's floor to 2.33.0. Users installing theanthropicextra from PyPI already resolve a working version because nothing caps pydantic-ai there; the floor now says so, and the lock and image follow.The lock could not follow on its own.
pydantic-ai-slim[openai]>=2.33declaresopenai>=3(>=3.8from 2.39), whilellama-index-llms-openai0.8.1 andlitellm(pulled in unconditionally by the Google provider'sgoogle-cloud-aiplatform[evaluation]) still cap openai below 3. Both caps are stale rather than real: llama-index chat and embeddings work on openai 3.16 (run-llama/llama_index#22939 lifts the cap), and Airflow never imports litellm (BerriAI/litellm#40317). Movingllama-index-llms-openaiout of the dev group and declaring the extras as conflicting, the shape one would reach for first, does not help, because litellm is a base dependency of another provider and has no extra to conflict on.Why the override holds openai on 2.x rather than moving it to 3.x. Overriding to
openai>=3.8also resolves, and the Common AI, OpenAI provider and Google Vertex evaluation suites all pass on it. It fails at image build time instead:Dockerfile.ciruns a barepip checkafter install, and that reports llama-index's and litellm's unconditional caps against openai 3.pip checkignores extra-gated requirements, so pydantic-ai'sopenai>=3.8; extra == "openai"is invisible to it and the 2.x pairing passes. It is also the pairingconstraints-mainalready ships (pydantic-ai-slim 2.44.0 with openai 2.54.0), so the image tests what the constraints lane tests today. pydantic-ai's OpenAI model reaches the API on openai 2.54 at runtime; its declared floor tracks the SDK's httpx2 move. Overrides only shapeuv.lockand the image, so published wheels see the floor bump and nothing else. The rootpyproject.tomlcomment names both upstream trackers so the override can be dropped once they land.With the new lock, inside breeze:
pip checkis clean, anAnthropicModelrequest with a dummy key now reaches the API and returns a 401 instead of the TypeError, and the Common AI unit suite (2275 tests), the OpenAI provider suite and the Vertex AI evaluation tests pass. The OpenAI provider's Managed Agents test module skips itself on openai 2.x because it imports an openai 3 type; that skip is unchanged from main.The lowest-direct-dependency lane needed two more floors, because with openai's constraints overridden it installs the provider's own floors rather than the ones upstream caps used to force. openai 2.45 and 2.46 reject the httpx2 client that pydantic-ai-slim 2.33 hands them, and 2.47.0 is the first release that accepts it, so the
openaiextra and the override's lower bound both say 2.47.0.llama-index-llms-openai0.6.0 declaresllama-index-core>=0.13.0but imports a type core only gained in 0.14; 0.6.8 is the first release whose metadata matches its imports, and it needs core 0.14.5, which is what that lane resolved on main anyway. In breeze,breeze testing providers-tests --force-lowest-dependencies --test-type "Providers[common.ai]"now passes all 2278 tests on pydantic-ai-slim 2.33.0, openai 2.47.0 and llama-index-llms-openai 0.6.8.{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.