Azure OpenAI embedder
Embeds through an Azure OpenAI deployment over the OpenAI-compatible wire format. Selected via EMBEDDING_PROVIDER=azure_openai.
Enable it
bash
EMBEDDING_PROVIDER=azure_openai
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_EMBEDDING_DEPLOYMENT=your-embedding-deployment
AZURE_OPENAI_API_KEY=...
AZURE_OPENAI_API_VERSION=2024-02-01
EMBEDDING_DIMS=1536Configuration
| Variable | Default | Description |
|---|---|---|
EMBEDDING_PROVIDER | openai | Set to azure_openai. |
AZURE_OPENAI_ENDPOINT | none | Resource endpoint; a trailing slash is trimmed. |
AZURE_OPENAI_EMBEDDING_DEPLOYMENT | none | Deployment name, which identifies the model and is used as the reported model. |
AZURE_OPENAI_API_KEY | none | Sent as the api-key header. Calls fail at runtime if unset. |
AZURE_OPENAI_API_VERSION | 2024-02-01 | API version query parameter. |
EMBEDDING_DIMS | 1536 | Vector dimension; must match the embedding model. |
Notes
- Azure diverges from stock OpenAI on two axes: the URL carries the deployment name and an
api-versionquery parameter, and auth uses theapi-keyheader rather than a Bearer token. - The deployment name identifies the model on Azure and is kept as the reported model, so
EMBEDDING_DIMSmust match whatever model that deployment serves. - Shares the OpenAI-compatible request loop: 429 and 5xx and network errors retry with backoff, other 4xx fail fast, and a final failure raises for a clean 503.