{"record":{"id":"be94f08d52ed1db4","repo":"BerriAI/litellm","slug":"invalid-url-format-in-remote-url-don-t-include","errorCode":null,"errorMessage":"Invalid URL format in {remote_url}. Don't include '.py' extension and you must specify the instance name. Expected format: {storage_type}://{bucket_name}/{module_name_without_py}.instance_name (e.g., {storage_type}://{bucket_name}/{module_name_without_py}.proxy_handler_instance)","messagePattern":"Invalid URL format in (.+?)\\. Don't include '\\.py' extension and you must specify the instance name\\. Expected format: (.+?)://(.+?)/(.+?)\\.instance_name \\(e\\.g\\., (.+?)://(.+?)/(.+?)\\.proxy_handler_instance\\)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/types_utils/utils.py","lineNumber":111,"sourceCode":"        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\n        # Split by last dot to separate module from instance\n        module_parts: Final = path_and_module.split(\".\")\n        if len(module_parts) < 2:\n            raise ValueError(f\"Invalid module specification in {remote_url}. Expected: path/to/module.instance_name\")\n\n        instance_name: Final = module_parts[-1]\n        module_path: Final = \".\".join(module_parts[:-1])\n\n        # Create object key (file path in bucket)\n        object_key: Final = f\"{module_path}.py\"\n\n        verbose_proxy_logger.debug(","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/types_utils/utils.py#L93-L129","documentation":"Error \"Invalid URL format in {remote_url}. Don't include '.py' extension and you must specify the instance name. Expected format: {storage_type}://{bucket_name}/{module_name_without_py}.instance_name (e.g., {storage_type}://{bucket_name}/{module_name_without_py}.proxy_handler_instance)\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/types_utils/utils.py:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the '.py' extension and append the instance name, e.g. s3://bucket/module_name.instance_name."],"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-14T00:17:10.932Z"}