BerriAI/litellm · error · ValueError

Filesystem does not exist

Error message

Filesystem {self.azure_storage_file_system} does not exist

What it means

Error "Filesystem {self.azure_storage_file_system} does not exist" thrown in BerriAI/litellm.

Solutions

  1. Create the filesystem/container in Azure Blob Storage, or correct the configured file system name.

When it happens

Trigger: Thrown at litellm/llms/base_llm/files/azure_blob_storage_backend.py:262 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/d16f15cc62154d4c. Report an issue: GitHub.

Appendix: source

Thrown at litellm/llms/base_llm/files/azure_blob_storage_backend.py:262

            if self.azure_storage_account_key:
                # Use Azure SDK (reuse logger's service client)
                return await self._download_file_with_account_key(file_path)
            else:
                # Use REST API (reuse logger's token management)
                return await self._download_file_with_azure_ad(file_path)

        except Exception as e:
            verbose_logger.exception("Error downloading file from Azure Blob Storage: %s", e)
            raise

    async def _download_file_with_account_key(self, file_path: str) -> bytes:
        """Download file using Azure SDK with account key."""
        # Reuse the logger's service client method
        service_client: Final = await self.get_service_client()
        file_system_client: Final = service_client.get_file_system_client(file_system=self.azure_storage_file_system)
        # Ensure filesystem exists (should already exist, but check for safety)
        if not await file_system_client.exists():
            raise ValueError(f"Filesystem {self.azure_storage_file_system} does not exist")
        file_client: Final = file_system_client.get_file_client(file_path)
        # Download file
        download_response: Final = await file_client.download_file()
        file_content: Final = await download_response.readall()
        return file_content

    async def _download_file_with_azure_ad(self, file_path: str) -> bytes:
        """Download file using REST API with Azure AD token."""
        # Reuse the logger's token management
        await self.set_valid_azure_ad_token()

        from litellm.constants import AZURE_STORAGE_MSFT_VERSION
        from litellm.llms.custom_httpx.http_handler import (
            get_async_httpx_client,
            httpxSpecialProvider,
        )

        async_client: Final = get_async_httpx_client(llm_provider=httpxSpecialProvider.LoggingCallback)

View on GitHub (pinned to 77b7c6c40c)