Document the dedicated pydantic-ai vendor connection types - #71774
Conversation
1a58548 to
7c6ac10
Compare
Azure OpenAI, Bedrock, and Vertex AI each have their own connection type and hook in this provider, with fields the generic pydanticai connection does not offer, but none of them appeared anywhere in the docs. The generic connection page meanwhile still taught Bedrock and Vertex AI setups that predate them, and its Vertex example relied on a credential fallback the underlying provider does not implement.
7c6ac10 to
acb4c78
Compare
amoghrajesh
left a comment
There was a problem hiding this comment.
This PR looks good but I observed something which I wanna flag
-
The Vertex hook has a bug. When someone sets
"vertexai": truein the connection's extra JSON, the hook tries to pass that as a keyword argument to Google's provider class but that class doesn't accept a vertexai argument at all. This throws an internal error that gets silently caught, and the hook falls back to using only environment variables for auth. Docs correctly warn about this, but the underlying hook code still has the bug and should be fixed separately. -
Two existing hook docstrings are already wrong, and this PR's docs unknowingly expose that. The Vertex hook's docstring says to use a
google-vertex:model prefix, but the actual library only recognizesgoogle-cloud:-google-vertexisn't valid. And, the Bedrock hook's docstring says IAM keys take precedence over a bearer token, but the real library does the opposite. Bearer token wins if both are set. This PR's new connection pages use the correct prefix and correct precedence, so they're right but the old docstrings inside the hook source code are still wrong and now contradict the new docs. Should be fixed in a follow up.
|
Yep, I also found that during working on these PRs. I want to keep these doc PRs as simple as possible. I've already been working follow PRs for it. Also fixed |
Azure OpenAI, Bedrock, and Vertex AI each have their own connection type and hook in this provider, with fields the generic pydanticai connection does not offer, but none of them appeared anywhere in the docs. The generic connection page meanwhile still taught Bedrock and Vertex AI setups that predate them, and its Vertex example relied on a credential fallback the underlying provider does not implement.
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.