Skip to main content

Azure OpenAI Setup

LlamaCloud supports Azure OpenAI as an alternative provider of models to OpenAI. This page guides you through the necessary configuration changes to integrate Azure OpenAI with your LlamaCloud deployment.

  • A valid Azure OpenAI account
  • Access & Quota to the supported models:
    • gpt-4o-mini
    • gpt-4o
    • gpt-4.1
    • gpt-4.1-small
    • gpt-4.1-mini

Connecting to Azure OpenAI

Please refer to your Azure OpenAI account to get the following information:

  • apiKey
  • endpoint
  • apiVersion
  • deploymentName
    • Note: LlamaCloud will default to the using the underlying model name as the deployment name if there is no custom deployment name specified.

Azure OpenAI models can be configured with their own set of environment variables. For each model supported by LlamaCloud, the environment variables are named as follows:

  • AZURE_OPENAI_<MODEL_NAME>_ prefix for all environment variables
  • _API_KEY is the deployment API key
    • This is a unique key per model
  • _BASE_URL: This is the Azure OpenAI endpoint. You can find this in your Resource Configuration at the resource's home page.
    • The endpoint is in the format of https://<your-azure-openai-resource>.openai.azure.com
    • It can also be found in the code snippet provided by Azure OpenAI after creating a new deployment.
  • _DEPLOYMENT_NAME: This is the Name of the model deployment, not the Model Name.
  • _API_VERSION: This is the apiVersion variable found in the first code snippet.
    • This is not to be confused with the model version.

Here are all the configurable environment variable group by model:

GPT 4o mini:

  • AZURE_OPENAI_GPT_4O_MINI_API_KEY
  • AZURE_OPENAI_GPT_4O_MINI_BASE_URL
  • AZURE_OPENAI_GPT_4O_MINI_DEPLOYMENT_NAME
  • AZURE_OPENAI_GPT_4O_MINI_API_VERSION

GPT 4o:

  • AZURE_OPENAI_GPT_4O_API_KEY
  • AZURE_OPENAI_GPT_4O_BASE_URL
  • AZURE_OPENAI_GPT_4O_DEPLOYMENT_NAME
  • AZURE_OPENAI_GPT_4O_API_VERSION

GPT 4.1

  • AZURE_OPENAI_GPT_4_1_API_KEY
  • AZURE_OPENAI_GPT_4_1_BASE_URL
  • AZURE_OPENAI_GPT_4_1_DEPLOYMENT_NAME
  • AZURE_OPENAI_GPT_4_1_API_VERSION

GPT 4.1-mini

  • AZURE_OPENAI_GPT_4_1_MINI_API_KEY
  • AZURE_OPENAI_GPT_4_1_MINI_BASE_URL
  • AZURE_OPENAI_GPT_4_1_MINI_DEPLOYMENT_NAME
  • AZURE_OPENAI_GPT_4_1_MINI_API_VERSION

GPT 4.1-nano

  • AZURE_OPENAI_GPT_4_1_NANO_API_KEY
  • AZURE_OPENAI_GPT_4_1_NANO_BASE_URL
  • AZURE_OPENAI_GPT_4_1_NANO_DEPLOYMENT_NAME
  • AZURE_OPENAI_GPT_4_1_NANO_API_VERSION

Helm Chart Configuration

There are two ways to configure the Azure OpenAI integration:

  • Directly in the values.yaml file
  • Using an existing secret

Here's an example of how to configure the Azure OpenAI integration directly in the values.yaml file for LlamaParse:


llamaParse:
config:
azureOpenAi:
enabled: true
key: "gpt-4.1"
endpoint: "https://<your-azure-openai-endpoint>.openai.azure.com"
deploymentName: "gpt-4.1" # Optional, will default to the underlying model name if not specified
apiVersion: "2024-12-01-preview" # Optional, will default to the latest version if not specified

Use this only if you want to configure a single Azure OpenAI deployment for a single model.

Using an existing secret

Use this if you want to configure multiple Azure OpenAI deployments for multiple models. You can create a secret object with as many of the environment variables noted above as needed.

llamaParse:
config:
azureOpenAi:
enabled: true
existingSecret: "your-azure-openai-secret"