12. The maximum value of the function $y=\frac{x^{2}-2 x+3}{x^{2}+2 x+3}$ is $\qquad$ , the minimum value is $\qquad$
12. $2+\sqrt{3}, 2-\sqrt{3}$.

Eliminating the denominator gives $(y-1) x^{2}+2(y+1) x+3(y-1)=0$, when $y=1$, $x=0$; when $y \neq 1$, by $\Delta \geqslant 0$, we get $2-\sqrt{3} \leqslant y \leqslant 2+\sqrt{3}$.