BerriAI/litellm · error · HTTPException

Failed to decrypt Vantage API key. Check your salt key confi

Error message

Failed to decrypt Vantage API key. Check your salt key configuration.

What it means

Raised when the stored Vantage api_key in the LiteLLM_Config table cannot be decrypted by decrypt_value_helper, which returns None on failure. Means the value was encrypted with a different or missing LITELLM_SALT_KEY than the one currently configured, so the stored ciphertext is unrecoverable until the salt key is corrected or the setting is re-initialized.

Source

Thrown at litellm/proxy/spend_tracking/vantage_endpoints.py:102

    vantage_config: Final = await ConfigRepository(prisma_client).table.find_first(
        where={"param_name": VANTAGE_SETTINGS_PARAM_NAME}
    )
    if vantage_config is None or vantage_config.param_value is None:
        return {}

    if isinstance(vantage_config.param_value, dict):
        settings = vantage_config.param_value
    elif isinstance(vantage_config.param_value, str):
        settings = json.loads(vantage_config.param_value)
    else:
        settings = dict(vantage_config.param_value)

    encrypted_api_key: Final = settings.get("api_key")
    if encrypted_api_key:
        decrypted_api_key = decrypt_value_helper(encrypted_api_key, key="vantage_api_key", exception_type="error")
        if decrypted_api_key is None:
            raise HTTPException(
                status_code=500,
                detail={"error": "Failed to decrypt Vantage API key. Check your salt key configuration."},
            )
        settings["api_key"] = decrypted_api_key

    encrypted_integration_token: Final = settings.get("integration_token")
    if encrypted_integration_token:
        decrypted_integration_token: Final = decrypt_value_helper(
            encrypted_integration_token,
            key="vantage_integration_token",
            exception_type="error",
        )
        if decrypted_integration_token is None:
            raise HTTPException(
                status_code=500,
                detail={"error": "Failed to decrypt Vantage integration token. Check your salt key configuration."},
            )
        settings["integration_token"] = decrypted_integration_token

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Ensure LITELLM_SALT_KEY is unchanged from when the Vantage API key was stored; re-save the key if the salt key rotated.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/spend_tracking/vantage_endpoints.py:102 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/1e11c1abe7d79f12. Report an issue: GitHub.