{
  "id": "llm/azure-openai-deployment-not-found",
  "signature": "openai.NotFoundError: Resource not found. Deployment '<deployment-name>' does not exist.",
  "signature_zh": "openai.NotFoundError：未找到资源。部署 '<deployment-name>' 不存在。",
  "regex": "Resource not found.*Deployment.*does not exist",
  "domain": "llm",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Azure OpenAI endpoint URL or deployment name is misconfigured: the deployment may have been deleted, renamed, or the resource group/region in the endpoint URL does not match the actual deployment location.",
  "root_cause_type": "generic",
  "root_cause_zh": "Azure OpenAI 端点 URL 或部署名称配置错误：部署可能已被删除、重命名，或者端点 URL 中的资源组/区域与实际部署位置不匹配。",
  "versions": [
    {
      "version": "openai==1.30.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "azure-identity==1.16.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "azure-ai-openai==1.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error is about the deployment name, not the API key; a valid key with a wrong deployment still fails.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The deployment is tied to a specific model; changing the model in code doesn't change the deployment's actual model.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The endpoint URL must match the exact resource; a wrong region or resource name will still cause NotFoundError.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify the deployment name in Azure Portal: go to Azure OpenAI Studio > Deployments > copy the exact deployment name (case-sensitive). Then set `openai.Deployment('your-deployment-name')`.",
      "success_rate": 0.95,
      "how": "Verify the deployment name in Azure Portal: go to Azure OpenAI Studio > Deployments > copy the exact deployment name (case-sensitive). Then set `openai.Deployment('your-deployment-name')`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "List all deployments programmatically: `from openai import AzureOpenAI; client = AzureOpenAI(api_key=key, api_version='2023-12-01-preview', azure_endpoint=endpoint); deployments = client.deployments.list(); print([d.id for d in deployments])`",
      "success_rate": 0.9,
      "how": "List all deployments programmatically: `from openai import AzureOpenAI; client = AzureOpenAI(api_key=key, api_version='2023-12-01-preview', azure_endpoint=endpoint); deployments = client.deployments.list(); print([d.id for d in deployments])`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure the `azure_endpoint` includes the full resource URL (e.g., `https://my-resource.openai.azure.com/`) and matches the region where the deployment was created.",
      "success_rate": 0.98,
      "how": "Ensure the `azure_endpoint` includes the full resource URL (e.g., `https://my-resource.openai.azure.com/`) and matches the region where the deployment was created.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify the deployment name in Azure Portal: go to Azure OpenAI Studio > Deployments > copy the exact deployment name (case-sensitive). Then set `openai.Deployment('your-deployment-name')`.",
    "List all deployments programmatically: `from openai import AzureOpenAI; client = AzureOpenAI(api_key=key, api_version='2023-12-01-preview', azure_endpoint=endpoint); deployments = client.deployments.list(); print([d.id for d in deployments])`",
    "Ensure the `azure_endpoint` includes the full resource URL (e.g., `https://my-resource.openai.azure.com/`) and matches the region where the deployment was created."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model",
  "official_doc_section": null,
  "error_code": "DeploymentNotFound",
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-12-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}