{"record":{"id":"7a4eb84c92ffb038","repo":"BerriAI/litellm","slug":"missing-azure-document-intelligence-endpoint-set","errorCode":null,"errorMessage":"Missing Azure Document Intelligence Endpoint - Set AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT environment variable or pass api_base parameter","messagePattern":"Missing Azure Document Intelligence Endpoint - Set AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT environment variable or pass api_base parameter","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure_ai/ocr/document_intelligence/transformation.py","lineNumber":233,"sourceCode":"        Validate environment and return headers for Azure Document Intelligence.\n\n        Authentication uses Ocp-Apim-Subscription-Key header.\n        \"\"\"\n        # Get API key from environment if not provided\n        if api_key is None:\n            api_key = get_secret_str(AZURE_DOCUMENT_INTELLIGENCE_API_KEY_ENV_VAR)\n\n        if api_key is None:\n            raise ValueError(\n                \"Missing Azure Document Intelligence API Key - Set AZURE_DOCUMENT_INTELLIGENCE_API_KEY environment variable or pass api_key parameter\"\n            )\n\n        # Validate API base/endpoint is provided\n        if api_base is None:\n            api_base = get_secret_str(\"AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT\")\n\n        if api_base is None:\n            raise ValueError(\n                \"Missing Azure Document Intelligence Endpoint - Set AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT environment variable or pass api_base parameter\"\n            )\n\n        headers = {\n            \"Ocp-Apim-Subscription-Key\": api_key,\n            \"Content-Type\": \"application/json\",\n            **headers,\n        }\n\n        return headers\n\n    def get_complete_url(\n        self,\n        api_base: str | None,\n        model: str,\n        optional_params: dict,\n        litellm_params: dict | None = None,\n        **kwargs,","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/azure_ai/ocr/document_intelligence/transformation.py#L215-L251","documentation":"Error \"Missing Azure Document Intelligence Endpoint - Set AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT environment variable or pass api_base parameter\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure_ai/ocr/document_intelligence/transformation.py:233 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT or pass api_base."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}