Azure OpenAI

Configure AzureOpenAI, Agno's model class for Azure-hosted OpenAI models.

The AzureOpenAI model provides access to Azure-hosted OpenAI models.

Parameters

ParameterTypeDefaultDescription
idstr"not-provided"The Azure deployment name passed as the model ID. Set this to your deployment name
namestr"AzureOpenAI"The name of the model
providerstr"Azure"The provider of the model
api_keyOptional[str]NoneThe API key for Azure OpenAI (defaults to AZURE_OPENAI_API_KEY env var)
api_versionOptional[str]"2024-10-21"The Azure OpenAI API version to use
azure_endpointOptional[str]NoneThe Azure endpoint, e.g. https://example.openai.azure.com (defaults to AZURE_OPENAI_ENDPOINT env var)
azure_deploymentOptional[str]NoneThe Azure deployment name (defaults to AZURE_OPENAI_DEPLOYMENT env var)
base_urlOptional[str]NoneFull base URL for the API, used in place of azure_endpoint plus azure_deployment
azure_ad_tokenOptional[str]NoneAzure Active Directory token for authentication, used instead of an API key
azure_ad_token_providerOptional[Any]NoneCallable that returns an Azure AD token, refreshed on each request

AzureOpenAI extends OpenAILike and accepts all of its parameters.