8. In a regular quadrilateral pyramid $S-A B C D$, the angle between a lateral face and the base is $\frac{\pi}{3}$. Then the ratio of the radius $R$ of the circumscribed sphere to the radius $r$ of the inscribed sphere $\left(\frac{R}{r}\right)$ is $\qquad$ .
8. $\frac{5}{2}$.

Let the side length of the base be $a$, then $r=\frac{a}{2} \tan \frac{\pi}{6}$. Draw $\mathrm{SO}_{1} \perp$ plane $A B C D$, with $O_{1}$ as the foot of the perpendicular. Let $S O_{1}=h$, and the center of the circumscribed sphere be $O$.
In the right triangle $\triangle O O_{1} C$, we have
$(h-R)^{2}+\left(\frac{\sqrt{2}}{2} a\right)^{2}=R^{2}$. Therefore, $R=\frac{h^{2}+\frac{a^{2}}{2}}{2 h}$.
Since $h=\frac{a}{2} \tan \frac{\pi}{3}$, we have,
$$
\frac{R}{r}=\frac{\frac{1}{4} \tan ^{2} \frac{\pi}{3}+\frac{1}{2}}{\tan \frac{\pi}{3}} \cdot \frac{1}{\frac{1}{2} \tan \frac{\pi}{6}}=\frac{5}{2} .
$$