Azure OpenAI Setup
Base URL, deployments, and credential management for Azure OpenAI across Brainforge apps (platform, Slack assistant, hubspot-lead-nudge, GitHub Actions).
Policy: East US 2 only. All new Azure OpenAI deployments go on brainforge-openai-eastus2 (East US 2) from here on. Do not create deployments on brainforge-openai (East US) — that resource is legacy and we are deprecating it. Migrate remaining workloads to East US 2 and point every env var at East US 2. See azure-models-for-devs.md for the deploy checklist.
1. Resources
| Resource | Region | Status |
|---|---|---|
brainforge-openai-eastus2 | East US 2 | Use this only. All platform, Slack, Codex, GitHub Actions. |
brainforge-openai | East US | Legacy — deprecating. No new deployments or usage; migrate to East US 2. |
See azure-models-for-devs.md for the full deployment list, deploy-to–East-US-2 checklist, and env vars.
2. Environment Variables (East US 2 only)
Use the East US 2 key and base URL everywhere. Set AZURE_OPENAI_API_KEY to the same value as BRAINFORGE_OPENAI_EASTUS2_API_KEY so no code path uses the old region.
| Variable | Purpose | Used by |
|---|---|---|
BRAINFORGE_OPENAI_EASTUS2_API_KEY | East US 2 key (primary) | Platform, Slack assistant, CopilotKit, GitHub Actions |
AZURE_OPENAI_API_KEY | Set to East US 2 key (same as above) | Platform (Mastra), hubspot-lead-nudge — required; use East US 2 key |
AZURE_OPENAI_EASTUS2_BASE_URL | East US 2 base URL, e.g. https://brainforge-openai-eastus2.openai.azure.com | Slack assistant, document-council; set all platform *_BASE_URL to this |
AZURE_OPENAI_EASTUS2_CHAT_MODEL | East US 2 chat deployment (default: gpt-5.2) | GitHub Actions document-council workflow |
AZURE_OPENAI_EASTUS2_API_VERSION | Chat Completions API version (default: 2024-05-01-preview) | GitHub Actions document-council workflow |
DOCUMENT_COUNCIL_MAX_DOCS | Max doc files reviewed per run (default: 3) | GitHub Actions document-council workflow |
AZURE_RESPONSES_DEPLOYMENT | Deployment name for Responses API (default: gpt-5.2) | Slack assistant |
AZURE_GPT_4o_BASE_URL, AZURE_o4_MINI_BASE_URL, etc. | Set all to East US 2 base URL | Platform Mastra |
Slack assistant:
AZURE_OPENAI_EASTUS2_BASE_URL— e.g.https://brainforge-openai-eastus2.openai.azure.com(required)BRAINFORGE_OPENAI_EASTUS2_API_KEYorAZURE_OPENAI_API_KEY(both should be East US 2 key)
GitHub Actions document-council workflow (Azure-only):
- Workflow:
.github/workflows/document-council-on-pr.yml - Required secret:
BRAINFORGE_OPENAI_EASTUS2_API_KEY - Optional repo variables:
AZURE_OPENAI_EASTUS2_BASE_URL(defaults tohttps://brainforge-openai-eastus2.openai.azure.com)AZURE_OPENAI_EASTUS2_CHAT_MODEL(defaults togpt-5.2)AZURE_OPENAI_EASTUS2_API_VERSION(defaults to2024-05-01-preview)DOCUMENT_COUNCIL_MAX_DOCS(defaults to3)
The workflow intentionally avoids OPENAI_API_KEY and only uses East US 2 Azure credentials.
3. Checking Credits
Azure Sponsorship credits cannot be checked via CLI. Use:
- Balance: microsoftazuresponsorships.com → Check Your Balance
- Usage: Azure Portal → Cost Management → Usage + charges
- Startups portal: portal.startups.microsoft.com (if in Microsoft for Startups)
4. Azure CLI Commands
Prerequisites
az login
az versionCheck current setup
From repo root:
./apps/platform/scripts/azure-check.shOr manually:
az account show --output table
az account list --output table
az group list --output table
az cognitiveservices account list --output tableList deployments
az account set --subscription "1e40d527-4a83-4aa2-86fd-345bac08d96f"
# Canonical (East US 2)
az cognitiveservices account deployment list -g brainforge -n brainforge-openai-eastus2 -o table
# Legacy audit only (East US — deprecating)
az cognitiveservices account deployment list -g brainforge -n brainforge-openai -o tableCreate a new deployment
See azure-deployment-create.sh and azure-openai-deployment-options.md.
Example:
./apps/platform/scripts/azure-deployment-create.sh gpt-4o-mini gpt-4o-mini 2024-07-185. Credentials (1Password)
Azure OpenAI keys are stored in 1Password vault Brainforge AI Team.
op item list --vault "Brainforge AI Team"
op item get "Azure OpenAI" --vault "Brainforge AI Team"Use op read "op://Brainforge AI Team/Azure OpenAI/credential" for scripts.