Let $\{\xi _{1},\xi _{2},\dots \}$ be a sequence of independent random variables, and η be a counting random variable independent of this sequence. In addition, let $S_{0}:=0$ and $S_{n}:=\xi _{1}+\xi _{2}+\cdots +\xi _{n}$ for $n\geqslant 1$. We consider conditions for random variables $\{\xi _{1},\xi _{2},\dots \}$ and η under which the distribution functions of the random maximum $\xi _{(\eta )}:=\max \{0,\xi _{1},\xi _{2},\dots ,\xi _{\eta }\}$ and of the random maximum of sums $S_{(\eta )}:=\max \{S_{0},S_{1},S_{2},\dots ,S_{\eta }\}$ belong to the class of consistently varying distributions. In our consideration the random variables $\{\xi _{1},\xi _{2},\dots \}$ are not necessarily identically distributed.
Let $\{\xi _{1},\xi _{2},\dots \}$ be a sequence of independent random variables (not necessarily identically distributed), and η be a counting random variable independent of this sequence. We obtain sufficient conditions on $\{\xi _{1},\xi _{2},\dots \}$ and η under which the distribution function of the random sum $S_{\eta }=\xi _{1}+\xi _{2}+\cdots +\xi _{\eta }$ belongs to the class of $\mathcal{O}$-exponential distributions.