7. Given the hyperbola $\frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1(a>0, b>0)$ with left and right foci $F_{1}$ and $F_{2}$, respectively, a tangent line is drawn from point $F_{1}$ to the circle $x^{2}+y^{2}=a^{2}$, intersecting the right branch of the hyperbola at point $P$, and $\angle F_{1} P F_{2}=45^{\circ}$. Then the eccentricity of the hyperbola is $\qquad$
7. $\sqrt{3}$.

Let $\angle P F_{1} F_{2}=\theta$. Then $\angle P F_{2} F_{1}=135^{\circ}-\theta$. Let the point of tangency be $M$. In the right triangle $O F_{1} M$, $\sin \theta=\frac{a}{c}, \cos \theta=\frac{b}{c}\left(c=\sqrt{a^{2}+b^{2}}\right)$.
In $\triangle P F_{1} F_{2}$, by the Law of Sines, we have
$$
\begin{array}{l}
\frac{\left|P F_{1}\right|}{\sin \left(135^{\circ}-\theta\right)}=\frac{\left|P F_{2}\right|}{\sin \theta}=\frac{\left|F_{1} F_{2}\right|}{\sin 45^{\circ}}=2 \sqrt{2} c \\
\Rightarrow\left|P F_{1}\right|=2 \sqrt{2} c \sin \left(135^{\circ}-\theta\right) \\
\quad=2 \sqrt{2} c\left(\frac{\sqrt{2}}{2} \cos \theta+\frac{\sqrt{2}}{2} \sin \theta\right)=2 b+2 a \\
\Rightarrow\left|P F_{2}\right|=2 \sqrt{2} c \sin \theta=2 \sqrt{2} c \cdot \frac{a}{c}=2 \sqrt{2} a \\
\Rightarrow\left|P F_{1}\right|-\left|P F_{2}\right|=(2 b+2 a)-2 \sqrt{2} a=2 a \\
\Rightarrow b=\sqrt{2} a .
\end{array}
$$

Therefore, the eccentricity of the hyperbola is
$$
e=\frac{c}{a}=\sqrt{\frac{c^{2}}{a^{2}}}=\sqrt{1+\left(\frac{b}{a}\right)^{2}}=\sqrt{3} .
$$