BerriAI/litellm · error · ValueError
CustomSecretManagerException - config_file_path is required
Error message
CustomSecretManagerException - config_file_path is required to load custom secret manager
What it means
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.
Source
Thrown at litellm/secret_managers/custom_secret_manager_loader.py:33
def load_custom_secret_manager(config_file_path: str | None = None) -> None:
"""
Load and initialize a custom secret manager from a python file.
Similar to how custom guardrails are loaded - loads the class from
the custom_secret_manager field in key_management_settings.
Args:
config_file_path: Path to the config.yaml file
Raises:
ValueError: If required configuration is missing
ImportError: If the custom secret manager module cannot be loaded
"""
if not config_file_path:
raise ValueError("CustomSecretManagerException - config_file_path is required to load custom secret manager")
# Get the custom_secret_manager class path from settings
if litellm._key_management_settings is None:
raise ValueError(
"CustomSecretManagerException - key_management_settings is required with custom_secret_manager field"
)
custom_secret_manager_path: Final = getattr(litellm._key_management_settings, "custom_secret_manager", None)
if not custom_secret_manager_path:
raise ValueError(
"CustomSecretManagerException - custom_secret_manager field is required in key_management_settings"
)
# Split into file_name and class_name (e.g., "my_secret_manager.InMemorySecretManager")
_file_name, _class_name = custom_secret_manager_path.split(".")
verbose_proxy_logger.debug(
"Initializing custom secret manager: %s, file_name: %s, class_name: %s",View on GitHub (pinned to 77b7c6c40c)
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.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/secret_managers/custom_secret_manager_loader.py:33 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/78ab927eafa9a404.
Report an issue: GitHub.