Reduce code duplication for plugin negotiation