{"record":{"id":"78ab927eafa9a404","repo":"BerriAI/litellm","slug":"customsecretmanagerexception-config-file-path-is","errorCode":null,"errorMessage":"CustomSecretManagerException - config_file_path is required to load custom secret manager","messagePattern":"CustomSecretManagerException - config_file_path is required to load custom secret manager","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/secret_managers/custom_secret_manager_loader.py","lineNumber":33,"sourceCode":"\n\ndef load_custom_secret_manager(config_file_path: str | None = None) -> None:\n    \"\"\"\n    Load and initialize a custom secret manager from a python file.\n\n    Similar to how custom guardrails are loaded - loads the class from\n    the custom_secret_manager field in key_management_settings.\n\n    Args:\n        config_file_path: Path to the config.yaml file\n\n    Raises:\n        ValueError: If required configuration is missing\n        ImportError: If the custom secret manager module cannot be loaded\n    \"\"\"\n\n    if not config_file_path:\n        raise ValueError(\"CustomSecretManagerException - config_file_path is required to load custom secret manager\")\n\n    # Get the custom_secret_manager class path from settings\n    if litellm._key_management_settings is None:\n        raise ValueError(\n            \"CustomSecretManagerException - key_management_settings is required with custom_secret_manager field\"\n        )\n\n    custom_secret_manager_path: Final = getattr(litellm._key_management_settings, \"custom_secret_manager\", None)\n\n    if not custom_secret_manager_path:\n        raise ValueError(\n            \"CustomSecretManagerException - custom_secret_manager field is required in key_management_settings\"\n        )\n\n    # Split into file_name and class_name (e.g., \"my_secret_manager.InMemorySecretManager\")\n    _file_name, _class_name = custom_secret_manager_path.split(\".\")\n    verbose_proxy_logger.debug(\n        \"Initializing custom secret manager: %s, file_name: %s, class_name: %s\",","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/secret_managers/custom_secret_manager_loader.py#L15-L51","documentation":"Config guard in load_custom_secret_manager: the caller requested a custom secret manager but passed no config_file_path, so there is no filesystem anchor from which to resolve the manager's Python module. Sentinel ValueError raised on a missing function argument.","triggerScenarios":"Thrown at litellm/secret_managers/custom_secret_manager_loader.py:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set config_file_path in the proxy config pointing to the YAML file that defines the custom secret manager.","Ensure the path is readable by the LiteLLM process."],"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"}