BerriAI/litellm · error · ProxyException

Authentication Error({e})

Error message

Authentication Error({e})

What it means

Error-conversion point in model delete: an HTTPException raised inside the try block is re-wrapped as a ProxyException with type auth_error and the original detail (or this generic 'Authentication Error' fallback) as the message; the underlying e is interpolated for the log.

Source

Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1655

                    user_api_key_dict=user_api_key_dict,
                    table_name=LitellmTableNames.PROXY_MODEL_TABLE_NAME,
                    before_value=result.model_dump_json(exclude_none=True),
                    after_value=None,
                    litellm_changed_by=user_api_key_dict.user_id,
                    litellm_proxy_admin_name=LITELLM_PROXY_ADMIN_NAME,
                )
            )
            return {"message": f"Model: {result.model_id} deleted successfully"}
        else:
            raise HTTPException(
                status_code=500,
                detail={"error": "Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature."},
            )

    except Exception as e:
        verbose_proxy_logger.exception("Failed to delete model. Due to error - %s", e)
        if isinstance(e, HTTPException):
            raise ProxyException(
                message=getattr(e, "detail", f"Authentication Error({e})"),
                type=ProxyErrorTypes.auth_error,
                param=getattr(e, "param", "None"),
                code=getattr(e, "status_code", status.HTTP_400_BAD_REQUEST),
            )
        elif isinstance(e, ProxyException):
            raise e
        raise ProxyException(
            message="Authentication Error, " + str(e),
            type=ProxyErrorTypes.auth_error,
            param=getattr(e, "param", "None"),
            code=status.HTTP_400_BAD_REQUEST,
        )


async def delete_team_model_alias(
    public_model_name: str,
    prisma_client: PrismaClient,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Check the provider credentials in litellm_params (API key, base URL).
  2. Check proxy server logs for the underlying auth error.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/model_management_endpoints.py:1655 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/3c19236c79c58565. Report an issue: GitHub.