Repository navigation
Fix common.ai Vertex model example to use a valid pydantic-ai prefix - #72011
Merged
Merged
Conversation
ColtenOuO
reviewed
Aug 24, 2026
Lee-W
force-pushed
the
fix-common-ai-vertex-prefix
branch
2 times, most recently
from
August 27, 2026 11:44
9303aef to
293f573
Compare
potiuk
approved these changes
Aug 27, 2026
…test The Vertex hook's tests still built their connection extras from "google-vertex:gemini-2.0-flash", a provider id pydantic-ai no longer recognizes -- it was renamed to "google-cloud:" when GoogleProvider(vertexai=True) was split into GoogleProvider and GoogleCloudProvider (pydantic/pydantic-ai#5336). The user-facing strings were corrected in apache#72012, but the fixtures kept exercising a prefix that raises "Unknown provider" in real use, so nothing in the suite would notice the documented example drifting away from a working one again. Align the fixtures with the prefix the hook now documents and add a test that resolves it through pydantic-ai's own provider lookup rather than a mock.
Lee-W
force-pushed
the
fix-common-ai-vertex-prefix
branch
from
August 27, 2026 14:34
293f573 to
122b32b
Compare
1 task done
Lee-W
added a commit
to astronomer/airflow
that referenced
this pull request
Sep 19, 2026
Review of the bare-model-id support on this branch surfaced four ways it misleads whoever configured the connection. pydantic-ai's "test" sentinel stopped reaching pydantic-ai: on a generic connection it raised, and on a vendor connection it silently became "azure:test" and friends. A mistyped prefix was reported as a bare model name, telling the user to set the "provider:model" string they had already set, and never naming the segment that failed to resolve. A name forwarded down a fallback chain was attributed to the fallback connection, which had never carried it, instead of to the primary that set it. A vendor's own native id was forwarded across platforms, where it resolves without complaint and only 404s during the outage the chain existed to cover, while test_connection reports the chain healthy. A prefix left over from a spelling this provider shipped until apache#72011 resolves the same way, so it is now logged when a prefixed name is treated as a bare vendor id.
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 documented model-identifier example for the Google Vertex AI connection ("google-vertex:gemini-2.0-flash") is not a provider prefix pydantic-ai recognizes; calling infer_provider_class with it raises ValueError: Unknown provider. Users who copy the connection form placeholder, docstring example, or hook default verbatim hit an immediate, confusing failure instead of an expected credentials error.
pydantic-ai renamed this provider id to "google-cloud:" when it split GoogleProvider(vertexai=True) into separate GoogleProvider and GoogleCloudProvider classes (pydantic/pydantic-ai#5336), shortly before these examples were written. Update the connection-form placeholder, hook docstrings, and tests to the working prefix, and add a regression test that exercises the real (unmocked) provider resolution so the example string can't silently drift again.
Was generative AI tooling used to co-author this PR?
Generated-by: [Tool Name] following the guidelines
{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.