BerriAI/litellm · error · ValueError

Unsupported URL scheme in {remote_url}

Error message

Unsupported URL scheme in {remote_url}

What it means

URL-scheme dispatch in _load_instance_from_remote_storage: the value carried a config_file_path (so remote loading is allowed) but its scheme is neither s3:// nor gcs://. Only those two object-storage schemes are supported for remote module loading.

Source

Thrown at litellm/proxy/types_utils/utils.py:94

    Args:
        remote_url (str): The s3:// or gcs:// URL
        config_file_path (str): Optional config file path for temp directory context

    Returns:
        Any: The loaded instance
    """
    try:
        from litellm._logging import verbose_proxy_logger

        # Parse the URL
        if remote_url.startswith("s3://"):
            storage_type = "s3"
            url_without_prefix = remote_url[5:]  # Remove 's3://'
        elif remote_url.startswith("gcs://"):
            storage_type = "gcs"
            url_without_prefix = remote_url[6:]  # Remove 'gcs://'
        else:
            raise ValueError(f"Unsupported URL scheme in {remote_url}")

        # Split bucket and path
        parts: Final = url_without_prefix.split("/", 1)
        if len(parts) < 2:
            raise ValueError(
                f"Invalid URL format: {remote_url}. Expected: {storage_type}://bucket-name/path/to/module.instance"
            )

        bucket_name: Final = parts[0]
        path_and_module: Final = parts[1]

        # Extract module path and instance name
        # Example: "loggers/custom_callbacks.proxy_handler_instance"
        # Handle case where user accidentally includes .py extension
        if path_and_module.endswith(".py"):
            module_name_without_py: Final = path_and_module[:-3]  # Remove .py
            raise ValueError(
                f"Invalid URL format in {remote_url}. "

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use a supported URL scheme (s3:// or gcs://) for the remote module URL.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/types_utils/utils.py:94 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/5f3232792f1aa93a. Report an issue: GitHub.