{"record":{"id":"523d66449f6ac9ba","repo":"BerriAI/litellm","slug":"invalid-url-format-remote-url-expected-stora","errorCode":null,"errorMessage":"Invalid URL format: {remote_url}. Expected: {storage_type}://bucket-name/path/to/module.instance","messagePattern":"Invalid URL format: (.+?)\\. Expected: (.+?)://bucket-name/path/to/module\\.instance","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/types_utils/utils.py","lineNumber":99,"sourceCode":"        Any: The loaded instance\n    \"\"\"\n    try:\n        from litellm._logging import verbose_proxy_logger\n\n        # Parse the URL\n        if remote_url.startswith(\"s3://\"):\n            storage_type = \"s3\"\n            url_without_prefix = remote_url[5:]  # Remove 's3://'\n        elif remote_url.startswith(\"gcs://\"):\n            storage_type = \"gcs\"\n            url_without_prefix = remote_url[6:]  # Remove 'gcs://'\n        else:\n            raise ValueError(f\"Unsupported URL scheme in {remote_url}\")\n\n        # Split bucket and path\n        parts: Final = url_without_prefix.split(\"/\", 1)\n        if len(parts) < 2:\n            raise ValueError(\n                f\"Invalid URL format: {remote_url}. Expected: {storage_type}://bucket-name/path/to/module.instance\"\n            )\n\n        bucket_name: Final = parts[0]\n        path_and_module: Final = parts[1]\n\n        # Extract module path and instance name\n        # Example: \"loggers/custom_callbacks.proxy_handler_instance\"\n        # Handle case where user accidentally includes .py extension\n        if path_and_module.endswith(\".py\"):\n            module_name_without_py: Final = path_and_module[:-3]  # Remove .py\n            raise ValueError(\n                f\"Invalid URL format in {remote_url}. \"\n                f\"Don't include '.py' extension and you must specify the instance name. \"\n                f\"Expected format: {storage_type}://{bucket_name}/{module_name_without_py}.instance_name \"\n                f\"(e.g., {storage_type}://{bucket_name}/{module_name_without_py}.proxy_handler_instance)\"\n            )\n","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/types_utils/utils.py#L81-L117","documentation":"The remote URL parsed to a supported scheme but split on '/' produced no path segment after the bucket name (e.g. 's3://my-bucket'), so there is no module path and instance name to load. The URL must contain bucket plus a dotted module.instance path.","triggerScenarios":"Thrown at litellm/proxy/types_utils/utils.py:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Format the URL as <storage>://bucket-name/path/to/module.instance, e.g. s3://my-bucket/handlers/my_module.proxy_handler_instance."],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}