{"record":{"id":"f8dd7dee9304899c","repo":"BerriAI/litellm","slug":"missing-required-environment-variable-azure-stora-f8dd7d","errorCode":null,"errorMessage":"Missing required environment variable: AZURE_STORAGE_FILE_SYSTEM","messagePattern":"Missing required environment variable: AZURE_STORAGE_FILE_SYSTEM","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/azure_storage/azure_storage.py","lineNumber":46,"sourceCode":"        **kwargs,\n    ):\n        try:\n            verbose_logger.debug(\"AzureBlobStorageLogger: in init azure blob storage logger\")\n\n            # Env Variables used for Azure Storage Authentication\n            self.tenant_id = os.getenv(\"AZURE_STORAGE_TENANT_ID\")\n            self.client_id = os.getenv(\"AZURE_STORAGE_CLIENT_ID\")\n            self.client_secret = os.getenv(\"AZURE_STORAGE_CLIENT_SECRET\")\n            self.azure_storage_account_key: str | None = os.getenv(\"AZURE_STORAGE_ACCOUNT_KEY\")\n\n            # Required Env Variables for Azure Storage\n            _azure_storage_account_name: Final = os.getenv(\"AZURE_STORAGE_ACCOUNT_NAME\")\n            if not _azure_storage_account_name:\n                raise ValueError(\"Missing required environment variable: AZURE_STORAGE_ACCOUNT_NAME\")\n            self.azure_storage_account_name: str = _azure_storage_account_name\n            _azure_storage_file_system: Final = os.getenv(\"AZURE_STORAGE_FILE_SYSTEM\")\n            if not _azure_storage_file_system:\n                raise ValueError(\"Missing required environment variable: AZURE_STORAGE_FILE_SYSTEM\")\n            self.azure_storage_file_system: str = _azure_storage_file_system\n            self.azure_storage_endpoint_suffix: str = (\n                os.getenv(\"AZURE_STORAGE_ENDPOINT_SUFFIX\") or AZURE_STORAGE_DEFAULT_ENDPOINT_SUFFIX\n            )\n            self._service_client = None\n            # Time that the azure service client expires, in order to reset the connection pool and keep it fresh\n            self._service_client_timeout: float | None = None\n\n            # Internal variables used for Token based authentication\n            self.azure_auth_token: str | None = None  # the Azure AD token to use for Azure Storage API requests\n            self.token_expiry: datetime | None = None  # the expiry time of the currentAzure AD token\n\n            asyncio.create_task(self.periodic_flush())\n            self.flush_lock = asyncio.Lock()\n            self.log_queue: list[StandardLoggingPayload] = []\n            super().__init__(**kwargs, flush_lock=self.flush_lock)\n        except Exception as e:\n            verbose_logger.exception(","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/azure_storage/azure_storage.py#L28-L64","documentation":"Second hard requirement of AzureBlobStorageLogger: the file system (ADLS Gen2 container) name, read only from AZURE_STORAGE_FILE_SYSTEM. Checked immediately after the account name, so if you hit this error the account name was fine but the container name is missing. There is no constructor parameter; it must be in the environment.","triggerScenarios":"AZURE_STORAGE_ACCOUNT_NAME is set but AZURE_STORAGE_FILE_SYSTEM is not when the azure_storage callback initializes; container name misspelled or referencing a container that exists in a different account; empty-string value.","commonSituations":"Partial env setup (account configured, container forgotten); the container was created as a blob container instead of an ADLS Gen2 filesystem; renaming the container without updating env vars.","solutions":["Export AZURE_STORAGE_FILE_SYSTEM=<container-name> where the bare container/filesystem name is used (no slashes or URL)","Confirm the container exists in the same storage account and is enabled for hierarchical namespace (ADLS Gen2) if you use that path style","Set the auth variables (tenant/client id/secret or account key) if not already done","Restart the proxy/process so the callback re-initializes"],"exampleFix":"# before\nexport AZURE_STORAGE_ACCOUNT_NAME=mystorageaccount\n# AZURE_STORAGE_FILE_SYSTEM missing -> ValueError\n\n# after\nexport AZURE_STORAGE_ACCOUNT_NAME=mystorageaccount\nexport AZURE_STORAGE_FILE_SYSTEM=litellm-logs","handlingStrategy":"validation","validationCode":"import os\n\nfs = os.getenv(\"AZURE_STORAGE_FILE_SYSTEM\", \"\")\nif not fs:\n    raise RuntimeError(\"Missing required environment variable: AZURE_STORAGE_FILE_SYSTEM\")\nassert \"/\" not in fs, \"use the bare container/filesystem name\"","typeGuard":"def is_valid_file_system_name(v: str | None) -> bool:\n    return isinstance(v, str) and v != \"\" and \"/\" not in v and len(v) >= 3","tryCatchPattern":"try:\n    AzureBlobStorageLogger()\nexcept ValueError as e:\n    if \"AZURE_STORAGE_FILE_SYSTEM\" in str(e):\n        raise SystemExit(\"Set AZURE_STORAGE_FILE_SYSTEM to the ADLS Gen2 container name\") from e\n    raise","preventionTips":["Create the container before enabling the logger; the logger does not create it","Keep account name + file system in the same env block/deployment spec","If using ADLS Gen2, ensure hierarchical namespace is enabled on the account","Run a startup check for all AZURE_STORAGE_* variables when the callback is on"],"tags":["azure","azure-storage","logging-callback","environment-variables","configuration"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}