Skip to content

Document the dedicated pydantic-ai vendor connection types - #71774

Merged
Lee-W merged 1 commit into
apache:mainfrom
astronomer:docs-common-ai-vendor-connections
Aug 19, 2026
Merged

Document the dedicated pydantic-ai vendor connection types#71774
Lee-W merged 1 commit into
apache:mainfrom
astronomer:docs-common-ai-vendor-connections

Conversation

@Lee-W

@Lee-W Lee-W commented Aug 18, 2026

Copy link
Copy Markdown
Member

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?
  • Yes (please specify the tool below)

Generated-by: [Tool Name] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {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.

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.
@Lee-W
Lee-W force-pushed the docs-common-ai-vendor-connections branch from 7c6ac10 to acb4c78 Compare August 19, 2026 06:51
@Lee-W
Lee-W marked this pull request as ready for review August 19, 2026 07:19

@amoghrajesh amoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good but I observed something which I wanna flag

  1. The Vertex hook has a bug. When someone sets "vertexai": true in 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.

  2. 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 recognizes google-cloud: - google-vertex isn'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.

@Lee-W

Lee-W commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

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 PydanticAIBedrockHook's docstring in this PR — bearer token now documented as taking precedence over IAM keys, matching BedrockProvider.__init__.

@Lee-W
Lee-W merged commit d6af65e into apache:main Aug 19, 2026
130 of 133 checks passed
@Lee-W
Lee-W deleted the docs-common-ai-vendor-connections branch August 19, 2026 08:59
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