4. Let the complex numbers be $z_{1}=-\sqrt{3}-\mathrm{i}, z_{2}=3+\sqrt{3} \mathrm{i}$, $z=(2+\cos \theta)+\mathrm{i} \sin \theta$.
Then the minimum value of $\left|z-z_{1}\right|+\left|z-z_{2}\right|$ is $\qquad$
4. $2+2 \sqrt{3}$.

From the problem, we know the points $Z_{1}(-\sqrt{3},-1), Z_{2}(3, \sqrt{3})$, and the moving point $Z:(x-2)^{2}+y^{2}=1$.

It is easy to see that points $Z_{1} 、 Z_{2}$ are outside the circle, the equation of the line $Z_{1} Z_{2}$ is $y=\frac{\sqrt{3}}{3} x$, and the line $Z_{1} Z_{2}$ is tangent to the circle.

Therefore, when $Z$ is at the point of tangency, $\left|z-z_{1}\right|+\left|z-z_{2}\right|$ reaches its minimum value, at this time, $\left|Z_{1} Z_{2}\right|=2+2 \sqrt{3}$.