Note that
$$h(t)=\frac{t^{2}-t+1}{t^{2}+t+1}=1-\frac{2t}{t^{2}+t+1}=1-\frac{2}{t+\frac{1}{t}+1}$$
Now by AGM inequality, for $t=e^x>0$, $t+\frac{1}{t}\in [2,+\infty)$ and therefore
$$f(\mathbb{R})=h((0,+\infty))=[1/3,1).$$
P.S. By solving the quadratic equation
$$(1-y)t^2-(1+y)t+(1-y)=0$$
(for $y=1$, we have that $t=0$), we get
$$t=\frac{1+y\pm \sqrt{-3+10y-3y^2}}{2(1-y)}$$
where the discriminant is non-negative when $\frac{1}{3}\le y\le 3$, but you should remember that $t=e^x$ has to be POSITIVE.
If, for example, for $y=3$, we get $t=-1<0$. So we have a further condition: at least one of the real solutions is positive.
Since their product is $1$, such condition is equivalent to the positivity of their sum, i. e. $(1+y)/(1-y)>0$, or $-1<y<1$.
Again we find that $y\in [1/3,1).$