Fix common.ai Vertex model example to use a valid pydantic-ai prefix - #72011
Open
Lee-W wants to merge 1 commit into
Open
Fix common.ai Vertex model example to use a valid pydantic-ai prefix#72011Lee-W wants to merge 1 commit into
Lee-W wants to merge 1 commit into
Conversation
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.
ColtenOuO
reviewed
Aug 24, 2026
| result = hook._get_provider_kwargs( | ||
| None, | ||
| None, | ||
| {"model": "google-gla:gemini-2.0-flash", "api_key": "gla-key"}, |
Contributor
There was a problem hiding this comment.
In the same pydantic-ai release, the google-gla prefix was renamed to google. Might be worth updating this one too while you're at it.
That said, it doesn't affect the test's behavior.
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.