  This paper extends the correspondence between discrete Cluster Integrable
Systems and BPS spectra of five-dimensional $\mathcal{N}=1$ QFTs on
$\mathbb{R}^4\times S^1$ by proving that algebraic solutions of the integrable
systems are exact solutions for the system of TBA equations arising from the
BPS spectral problem. This statement is exemplified in the case of M-theory
compactifications on local del Pezzo Calabi-Yau threefolds, corresponding to
q-Painlev\'e equations and $SU(2)$ gauge theories with matter. A degeneration
scheme is introduced, allowing to obtain closed-form expression for the BPS
spectrum also in systems without algebraic solutions. By studying the example
of local del Pezzo 3, it is shown that when the region in moduli space
associated to an algebraic solution is a ``wall of marginal stability'', the
BPS spectrum contains states of arbitrarily high spin, and corresponds to a 5d
uplift of a four-dimensional nonlagrangian theory.
