llama-index-llms-azure-openai
llama-index llms azure openai integration
What it is and what it does
This package bridges LlamaIndex applications to Azure OpenAI's managed language models. It wraps Azure's OpenAI API behind LlamaIndex's standard LLM interface, letting you use Azure-hosted GPT models (like gpt-35-turbo-16k) for text completion, streaming, and chat without rewriting your LlamaIndex code.
The package handles Azure-specific authentication through azure-identity, manages HTTP requests via httpx, and depends on llama-index-core and llama-index-llms-openai for the core LLM abstraction. You configure it with an Azure endpoint, API key, API version, and the name of your deployed model engine, then call standard methods like complete(), stream_complete(), chat(), and stream_chat() just as you would with any LlamaIndex LLM.
Use it for:
- Build RAG or agentic applications using Azure-hosted GPT models within LlamaIndex's framework
- Migrate existing OpenAI-based LlamaIndex code to run on Azure's managed infrastructure
- Stream long-form completions or multi-turn conversations through Azure OpenAI endpoints
- Integrate Azure OpenAI into enterprise applications that require Azure's compliance and security posture
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Azure OpenAI language models into LlamaIndex applications, enabling text completion, streaming, and chat interactions through Azure's managed OpenAI service.
Yes, if you are already using LlamaIndex and need to connect to Azure OpenAI models. The package is actively maintained, has no known vulnerabilities, and integrates cleanly with LlamaIndex's standard LLM interface. Install friction is low. You will need valid Azure OpenAI credentials and a deployed model to use it.
Install
llama-index-llms-azure-openai on PyPI
pip
pip install llama-index-llms-azure-openaiuv
uv add llama-index-llms-azure-openaipoetry
poetry add llama-index-llms-azure-openaiInstalling llama-index-llms-azure-openai
Before you install
Low install friction with a pure-Python wheel. Maintenance status is active. Depends on llama-index-core and llama-index-llms-openai, plus azure-identity and httpx for Azure authentication and HTTP operations.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
import os
os.environ["OPENAI_API_KEY"] = "<your-api-key>"
os.environ["AZURE_OPENAI_ENDPOINT"] = "https://<your-resource-name>.openai.azure.com/"
os.environ["OPENAI_API_VERSION"] = "2023-07-01-preview"
from llama_index.llms.azure_openai import AzureOpenAI
llm = AzureOpenAI(engine="my-engine", model="gpt-35-turbo-16k", temperature=0.0)
response = llm.complete("The sky is a beautiful blue and")
print(response)
Requires an active Azure OpenAI resource with a deployed model and valid API credentials (endpoint, key, and API version).
Verify before relying
- Whether the package maintains backward compatibility across Azure OpenAI API versions beyond 2023-07-01-preview
- Performance characteristics when handling large-scale concurrent requests through Azure endpoints
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — azure-identity, httpx, llama-index-core, llama-index-llms-openai |
| Maintenance | actively maintained — 98 days since the last release |
| First released | |
| Downloads | 625,087/month — #5,697 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: llama_index_llms_azure_openai-0.5.5-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
llama-index-llms-openaiIntegrates OpenAI's language models into…
permissive · top 1,000 on PyPI
llama-index-llms-bedrockIntegrates AWS Bedrock LLMs into LlamaIndex,…
permissive · top 15,000 on PyPI
llama-index-llms-litellmIntegrates LiteLLM with LlamaIndex to provide…
permissive · top 15,000 on PyPI
llama-index-llms-ollamaIntegrates local Ollama language models with…
permissive · top 15,000 on PyPI
ai21Python SDK for accessing AI21 Labs' language…
unclear · top 15,000 on PyPI
llama-index-llms-google-genaiIntegrates Google's Gemini models into…
permissive · top 15,000 on PyPI
llama-index-llms-openai-likeProvides a thin wrapper to use…
permissive · top 15,000 on PyPI
llama-index-embeddings-azure-openaiIntegrates Azure OpenAI's embedding models with…
permissive · top 15,000 on PyPI
llama-index-llms-langchainBridges LlamaIndex with LangChain LLM…
permissive · top 15,000 on PyPI
llama-index-llms-bedrock-converseIntegrates AWS Bedrock's Converse API with…
permissive · top 15,000 on PyPI