7. Given $F_{1}$ and $F_{2}$ are the left and right foci of the ellipse $C: \frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b$ $>0)$, and $P$ is a point on the ellipse $C$, and the incenter of $\triangle F_{1} P F_{2}$ is $I$. If there exists a real number $\lambda$ such that
$$
(1+\lambda) \overrightarrow{P F_{1}}+(1-\lambda) \overrightarrow{P F_{2}}=3 \overrightarrow{P I} \text {, }
$$
then the eccentricity of the ellipse $C$ is $\qquad$
7. $\frac{1}{2}$.

Since the incenter of $\triangle F_{1} P F_{2}$ is $I$, we have
$$
\left|F_{1} F_{2}\right| \overrightarrow{I P}+\left|P F_{1}\right| \overrightarrow{I F_{2}}+\left|P F_{2}\right| \overrightarrow{I F_{1}}=\mathbf{0} \text {. }
$$

Combining with the given conditions, we get
$$
\begin{array}{l}
(1+\lambda) \overrightarrow{I F_{1}}+(1-\lambda) \overrightarrow{I F_{2}}+\overrightarrow{I P}=\mathbf{0} \\
\Rightarrow \frac{1+\lambda}{\left|P F_{2}\right|}=\frac{1-\lambda}{\left|P F_{1}\right|}=\frac{1}{\left|F_{1} F_{2}\right|} \\
\Rightarrow\left|P F_{1}\right|+\left|P F_{2}\right|=2\left|F_{1} F_{2}\right| \\
\Leftrightarrow 2 a=4 c \Leftrightarrow e=\frac{1}{2} .
\end{array}
$$