// Merge into ~/.config/opencode/opencode.json (copy keys by hand; do not commit secrets).
// Resource: brainforge-openai (East US — legacy). Key: AZURE_OPENAI_EASTUS_API_KEY
// OpenCode Desktop: baseURL must be https://<resource>.openai.azure.com/openai (no trailing /v1) so the client does not build .../openai/v1/v1/... against regional cognitive URLs. Keep resourceName for apps that validate it. Alternatively export AZURE_RESOURCE_NAME=brainforge-openai (Dock does not load shell exports).
// Only gpt-5.4 and gpt-5.4-mini are defined here; extend `models` from azure-models-for-devs if you add deployments on brainforge-openai.
// Platform chat/deployments policy vs OpenCode: see knowledge/engineering/azure-models-for-devs.md
{
  "model": "azure-eastus/gpt-5.4",
  "small_model": "azure-eastus/gpt-5.4-mini",
  "agent": {
    "build": { "model": "azure-eastus/gpt-5.4" },
    "plan": { "model": "azure-eastus/gpt-5.4-mini" }
  },
  "provider": {
    "azure-eastus": {
      "npm": "@ai-sdk/openai",
      "name": "Azure OpenAI (East US — legacy)",
      "options": {
        "baseURL": "https://brainforge-openai.openai.azure.com/openai",
        "resourceName": "brainforge-openai",
        "apiKey": "{env:AZURE_OPENAI_EASTUS_API_KEY}",
        "queryParams": { "api-version": "2024-05-01-preview" }
      },
      "models": {
        "gpt-5.4": {
          "name": "GPT-5.4 (vision)",
          "limit": { "context": 200000, "output": 32768 },
          "modalities": { "input": ["text", "image"], "output": ["text"] }
        },
        "gpt-5.4-mini": {
          "name": "GPT-5.4 mini (vision)",
          "limit": { "context": 200000, "output": 32768 },
          "modalities": { "input": ["text", "image"], "output": ["text"] }
        }
      }
    }
  }
}
