Designing and building unique cage assemblies attract increasing interest from supramolecular chemists but remain synthetically challenging. Herein, we propose the use of a flexible vertex with adjustable angles to selectively form highly distorted tetrahedral and octahedral cages, for the first time, in which the flexible vertex forms from the synergistic effect of coordination and covalent interactions. The inherent interligand angle of the vertex can be modulated by guest anions present, which allows for the fine-tuning of different cage geometries. Furthermore, the reversible structural transformation between tetrahedral and octahedral cages was achieved by anion exchange monitored by mass spectrometric technique, the smaller anions favoring tetrahedral cages, while the larger anions supporting octahedral cages. Additionally, the KBr-based cage thin films exhibited prominent enhancement of their third-order NLO responses in two or three orders of magnitude compared to those obtained for their corresponding solutions. This work not only provides a new methodology to build irregular polyhedral structures in a controlled and tunable way but also provides access to new kinds of promising functional optical materials.