Pydantic AI providers¶
See Executors for choosing between providers, backends, and custom executors.
Nighthawk delegates Natural block execution to an LLM. The model is selected through the model field of StepExecutorConfiguration using the provider:model format:
import nighthawk as nh
configuration = nh.StepExecutorConfiguration(model="openai-responses:gpt-5.6-luna")
The default model is openai-responses:gpt-5.6-luna. Recommended model for quality: openai-responses:gpt-5.6-terra.
Pydantic AI providers¶
Any provider that Pydantic AI supports works with Nighthawk. The model identifier is passed directly to a Pydantic AI Agent -- Nighthawk has no provider-specific code for these.
Examples:
OpenAI:
Anthropic (direct API):
AWS Bedrock:
Google Vertex AI:
Groq:
Installation¶
Install the provider dependencies that Pydantic AI requires:
OpenAI:
Anthropic (direct API):
AWS Bedrock:
Google Vertex AI:
Groq:
See the Pydantic AI documentation for the full list of providers, required extras, and credential setup.
Nighthawk transparently forwards all provider-specific configuration (temperature, top_p, streaming, tool_choice, etc.) to Pydantic AI via model_settings. Because provider-specific options are numerous and vary across providers, Nighthawk does not document them individually -- refer to the Pydantic AI documentation for provider-specific settings.
Model settings¶
Pydantic AI providers accept standard Pydantic AI model settings via the model_settings field:
configuration = nh.StepExecutorConfiguration(
model="openai-responses:gpt-5.6-luna",
model_settings={"temperature": 0.5},
)
Troubleshooting¶
ModuleNotFoundError for a provider
Install the required provider package. For example: pip install pydantic-ai-slim[openai]. See the installation section above for all provider extras.
ValueError: Invalid model identifier
The model identifier must be in provider:model format (e.g., openai-responses:gpt-5.6-luna). Check for typos or a missing provider prefix. See the Pydantic AI documentation for valid provider prefixes.
Provider authentication errors
Each Pydantic AI provider requires its own credentials (e.g., OPENAI_API_KEY for OpenAI). Nighthawk does not manage provider credentials -- see the Pydantic AI documentation for provider-specific credential setup.
In-memory authentication¶
Pydantic AI Providers accept caller-owned authentication clients or keys through Python constructors. Construct an authenticated Model and pass it through StepExecutorConfiguration.model; see Caller-authenticated models for the handoff and the configuration contract for ownership and serialization. The Docker host supplies its own credential input channel. This option does not remove environment-configured provider strings.