Supported model providers

Every pydantic-ai model call in this provider, from an operator, a decorator or the hook, reaches its model through one Airflow connection, and the provider: prefix on the model name picks the vendor. Switching vendors is a connection change, not a Dag change. Find your vendor below, install the extra, create the connection type shown, and set the model name with that prefix.

Vendor

Model prefix

Install

Connection type

Credentials

OpenAI

openai:

[openai]

pydanticai

API key in Password

Anthropic

anthropic:

[anthropic]

pydanticai

API key in Password

Google Gemini API

google:

[google]

pydanticai

API key in Password, or GOOGLE_API_KEY in the environment

Google Vertex AI

google-cloud:

[google]

pydanticai_vertex (Pydantic AI (Google Vertex AI) connection)

Service account or Application Default Credentials

AWS Bedrock

bedrock:

[bedrock]

pydanticai_bedrock (Pydantic AI (AWS Bedrock) connection), or pydanticai with AWS credentials in the environment

IAM keys, profile or role

Azure OpenAI

azure:

[openai]

pydanticai_azure (Pydantic AI (Azure OpenAI) connection)

API key in Password, resource endpoint in Host

Groq

groq:

pydantic-ai-slim[groq]

pydanticai

API key in Password

Mistral AI

mistral:

pydantic-ai-slim[mistral]

pydanticai

API key in Password

DeepSeek

deepseek:

[openai]

pydanticai

API key in Password

Ollama, vLLM and other OpenAI-compatible servers

openai:

[openai]

pydanticai with the server URL in Host (Self-hosted models)

Usually none

Snowflake Cortex

snowflake:

pydantic-ai-slim[snowflake]

pydanticai

SNOWFLAKE_ACCOUNT and SNOWFLAKE_TOKEN in the worker environment; leave Password empty

TypeSafe Jev (classifier, does not write text)

typesafe:

[typesafe]

pydanticai (Classifier models)

API key in Password

[name] in the Install column is an extra of this provider, installed as pip install "apache-airflow-providers-common-ai[name]". The Groq, Mistral and Snowflake entries name the matching pydantic-ai-slim extra instead, because this provider does not ship one for them.

Any other vendor that pydantic-ai supports (Cohere, OpenRouter, Hugging Face and more) works the same way: install the pydantic-ai-slim extra named on that vendor’s pydantic-ai page, create a pydanticai connection, and use the prefix from that page.

Where the model name goes

Set the model on the connection’s Model field in provider:model form, for example anthropic:claude-sonnet-5. An operator’s model_id overrides it for that task, so one connection can serve several models from the same vendor. The generic pydanticai connection has no vendor of its own, so a bare model name without a prefix is rejected; the Azure, Bedrock and Vertex connection types each supply their own prefix and accept a bare name. Pydantic AI connection has every field and the full resolution order.

Reliability across vendors

A connection can name other connections to fail over to when its vendor is unavailable, so one task can span OpenAI and Anthropic without a code change. See Provider fallback.

Using a model outside an operator

Using the hook directly: PydanticAIHook returns the pydantic-ai Agent or Model behind a connection for use in a plain @task. LangChain models: LangChainHook does the same for LangChain chat and embedding models, which have their own langchain connection type.

Pages in this section

Was this entry helpful?