7. The maximum value of the function $y=\frac{3-\sin x}{2-\cos x}$ is $\qquad$
7. $\frac{6+2 \sqrt{3}}{3}$.
The value of $y$ can be regarded as the slope of the line connecting two points $(2,3)$ and $(\cos x, \sin x)$ in the plane.

Notice that the trajectory of the point $(\cos x, \sin x)$ is a unit circle, and the point $(2,3)$ is outside the circle. Let the equation of the line passing through the point $(2,3)$ be $y-3=k(x-2)$, i.e., $y-k x+(2 k-3)=0$.

When the slope is maximum, the line is a tangent to the unit circle. Thus, the distance from the origin $(0,0)$ to the tangent line is 1, i.e.,
$$
\begin{array}{l}
|2 k-3|=\sqrt{k^{2}+1} \Rightarrow k=\frac{6+2 \sqrt{3}}{3} \text {. } \\
\text { Therefore, } y_{\max }=\frac{6+2 \sqrt{3}}{3} \text {. }
\end{array}
$$