{"record":{"id":"cbf7498a84d213ed","repo":"BerriAI/litellm","slug":"invalid-module-specification-in-remote-url-expe","errorCode":null,"errorMessage":"Invalid module specification in {remote_url}. Expected: path/to/module.instance_name","messagePattern":"Invalid module specification in (.+?)\\. Expected: path/to/module\\.instance_name","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/types_utils/utils.py","lineNumber":121,"sourceCode":"        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(\n            \"Loading custom logger from %s: bucket=%s, object_key=%s, instance=%s\",\n            storage_type,\n            bucket_name,\n            object_key,\n            instance_name,\n        )\n\n        import tempfile\n\n        # Create temporary file for the downloaded module using the actual module name","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/types_utils/utils.py#L103-L139","documentation":"The path portion of the remote URL has no dot separating module path from instance name (or ends without an instance), so module.instance cannot be split. The URL must name both the Python module and the exported instance, e.g. s3://bucket/loggers/custom_callbacks.proxy_handler_instance.","triggerScenarios":"Thrown at litellm/proxy/types_utils/utils.py:121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Specify the module as path/to/module.instance_name after the bucket 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"}