Moved some provider retrieval logic out of driver into metal