InsightWorker Logo
  • contact@verticalserve.com
Docs / LLM providers / Azure OpenAI

Azure OpenAI

Same OpenAI models, hosted in your Azure tenant. Use this when corporate policy requires prompts stay in your Azure subscription (data residency, compliance, VPN-locked endpoints).

Configuration

~/.insightworker/.env:

LLM_PROVIDER=azure
AZURE_OPENAI_ENDPOINT=https://my-resource.openai.azure.com
AZURE_OPENAI_API_KEY=<from your Azure OpenAI resource>
AZURE_OPENAI_DEPLOYMENT=my-gpt-4o
AZURE_OPENAI_API_VERSION=2024-08-01-preview

Step 1 — Create the Azure OpenAI resource

  1. Azure PortalCreate a resourceAzure OpenAI
  2. Pick a region with the model you want (US East, EU West, etc.)
  3. Set pricing tier (Standard is fine for testing)
  4. Create

After provisioning, find on the resource overview:

  • EndpointAZURE_OPENAI_ENDPOINT
  • Keys and Endpoint tab → copy Key 1AZURE_OPENAI_API_KEY

Step 2 — Deploy a model

In your Azure OpenAI resource:

  1. Model deploymentsManage Deployments
  2. Create new deployment
  3. Pick the model (gpt-4o, gpt-5, etc.) — availability depends on region and your subscription tier
  4. Give it a deployment name (e.g. my-gpt-4o) → this goes into AZURE_OPENAI_DEPLOYMENT

The deployment name is what InsightWorker uses as the "model" — Azure routes by deployment name, not by underlying model id.

Step 3 — API version

AZURE_OPENAI_API_VERSION controls which API contract the SDK uses. Default 2024-08-01-preview works for most current models.

When you upgrade Azure resources or want newer features (e.g. Responses API support), bump the API version per Microsoft's docs.

Verify

curl https://my-resource.openai.azure.com/openai/deployments/my-gpt-4o/chat/completions?api-version=2024-08-01-preview \
  -H "api-key: $AZURE_OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Reply: pong"}],"max_tokens":10}'

If you get {"choices":[{"message":{"role":"assistant","content":"pong"}}]} — you're ready.

Where data goes

Azure OpenAI: prompts and responses stay in your Azure subscription, governed by your Azure tenant's data policies. Microsoft does not use API data to train the underlying OpenAI models. This is the regulated-customer-acceptable path.

Private endpoints

For zero internet egress, set up an Azure Private Endpoint for your Azure OpenAI resource. With a private DNS zone wired up, the standard endpoint hostname resolves to a private IP inside your VNet — InsightWorker requires no code change.

Common gotchas

SymptomCauseFix
404 on the deploymentWrong deployment nameUse the deployment name, not the underlying model ID
401 UnauthorizedWrong keyCheck Key 1 vs. Key 2; both work
API version errorsOlder API version doesn't support the modelBump AZURE_OPENAI_API_VERSION to latest
Rate limitedDefault Azure quota is lowRequest quota increase in Azure portal
Some GPT-5 features missingAzure rolls out features after OpenAIIf you need the latest GPT-5-pro, use OpenAI direct or Bedrock; Azure typically lags by weeks

See also


Source: docs/providers/azure-openai.md in the public repo. Open a PR with corrections.