4. Given the complex numbers $z_{1}=\sin \alpha+2 \mathrm{i}, z_{2}=1+\mathrm{i} \cos \alpha$ (where $\alpha$ is a real number, $\mathrm{i}$ is the imaginary unit). Then the minimum value of $\frac{13-\left|z_{1}+\mathrm{i} z_{2}\right|^{2}}{\left|z_{1}-\mathrm{i} z_{2}\right|}$ is $\qquad$
4. 2 .

Let
$$
\left|z_{1}-\mathrm{i} z_{2}\right|=\sqrt{(\sin \alpha+\cos \alpha)^{2}+1^{2}}=\sqrt{2+\sin 2 \alpha}=t,
$$

then $t \in[1, \sqrt{3}]$, and at this time we have
$$
\left|z_{1}+\mathrm{i} z_{2}\right|=(\sin \alpha-\cos \alpha)^{2}+3^{2}=10-\sin 2 \alpha=12-t^{2},
$$

so
$$
\frac{13-\left|z_{1}+\mathrm{i} z_{2}\right|^{2}}{\left|z_{1}-\mathrm{i} z_{2}\right|}=\frac{1+t^{2}}{t} \geqslant 2 .
$$

When $t=1$, i.e., $\alpha=k \pi-\frac{\pi}{4}(k \in \mathbf{Z})$, the equality holds.