Let me first discuss Lie algebra bundles. If I understand the question right, then we are given a smooth vector bundle $E\to M$ together with a fiber respecting smooth fiberwise bilinear mapping $[\;,\;]:E\times_M E \to E$ which is fiberwise a Lie algebra structure. The question now is: when is the Lie algebra isomorphism class of the Lie algebras $E_x$ locally constant on $M$? This is the case if the Lie algebra is rigid: This means that the orbit through the Lie algebra structure on $\mathbb R^n$ (the typical fiber) of $\operatorname{GL}(n)$ in $L^2_{\text{skew}}(\mathbb R^n\times \mathbb R^n,\mathbb R^n)$ under the action $(A,F)\mapsto A\circ F\circ (A^{-1}\times A^{-1})$ is open in the real subvariety of Lie algebra structures (i.e., also satisfying the Jacobi identity). Semisimple Lie algebras are rigid. Nilpotent and solvable ones are not, in general: These have real moduli which may change in a smooth way with $x\in M$. So the isomorphism class of the Lie algebra $E_x$ is locally constant in $M$ around a rigid Lie algebra $E_x$. By exponentiation this result carries over to fiber bundles with a smooth Lie group structure. For information on rigid Lie algebras see papers by Michel Goze. One recent paper is: - [MR1868184](https://mathscinet.ams.org/mathscinet-getitem?mr=1868184) Goze, Michel; Ancochea Bermudez, Jose Maria. [On the classification of rigid Lie algebras](https://www.sciencedirect.com/science/article/pii/S0021869301988805). J. Algebra 245 (2001), no. 1, 68–91