7. The function
$$
f(x)=x+\cos x-\sqrt{3} \sin x
$$

passes through a point on its graph where the slope of the tangent line is $k$. Then the range of values for $k$ is $\qquad$ .
$\begin{array}{l}\text { 7. }[-1,3] \text {. } \\ f^{\prime}(x)=1-\sin x-\sqrt{3} \cos x \\ =1-2 \sin \left(x+\frac{\pi}{3}\right) \in[-1,3]\end{array}$