Terry Tao's argument generalizes to show that $f$ must be an isometry whenever $X$ has dimension greater than 1 and $Y$ is strictly convex. We start by proving a series of lemmas: **Lemma 1**: Let $x,y\in X$, and let $a,b\geq0$ be such that $a+b\geq\|x-y\|$ and $|a-b|\leq\|x-y\|$. Then there exists $z\in X$ such that $\|x-z\|=a$ and $\|y-z\|=b$. *Proof*: Let $S_a=\{z:\|x-z\|=a\}$; this is connected since $\dim X>1$. Note that $S_a$ intersects the line between $x$ and $y$ twice; our hypotheses on $a$ and $b$ imply that at one of these points $\|y-z\|\leq b$ and at the other $\|y-z\|\geq b$. Since $z\mapsto \|y-z\|$ is continuous on $S_a$, there must be some $z\in S_a$ such that $\|y-z\|=b$. **Lemma 2**: Suppose $f(0)=0$ and $x\in X$ is such that $\|x\|\in\mathbb{N}$. Then for all $n\in\mathbb{Z}$, $f(nx)=nf(x)$. *Proof*: See Terry Tao's answer; by strict convexity, any triangle in $Y$ for which the triangle inequality is an equality must lie on a line. **Lemma 3**: Suppose $\|x-z\|$ and $\|y-z\|$ are both integers and $\|x-y\|$ is rational. Then $\|f(x)-f(y)\|=\|x-y\|$. *Proof*: By translating, we may assume $z=0$ and $f(z)=0$. By Lemma 2, for all $n\in\mathbb{Z}$, $f(nx)=nf(x)$ and $f(ny)=nf(y)$. Letting $n$ be the denominator of $\|x-y\|$, we have $\|f(nx)-f(ny)\|=\|nx-ny\|$ since this is an integer, and the result follows by dividing by $n$. **Lemma 4**: Suppose $\|x-y\|$ is rational. Then $\|f(x)-f(y)\|=\|x-y\|$. *Proof*: Use Lemma 1 to find $z$ such that $\|x-z\|=\|y-z\|$ is some large integer and apply Lemma 3. We now prove that $f$ is an isometry. Fix $x,y\in X$. Use Lemma 1 to find $x'$ such that $\|x-x'\|$ is small and rational and $\|x'-y\|=\|x-y\|$. Use Lemma 1 again to find $y'$ such that $\|y-y'\|$ is small and rational and $\|x'-y'\|$ is rational and close to $\|x'-y\|=\|x-y\|$. By Lemma 4, $f$ preserves the distances $\|x-x'\|$, and $\|x'-y'\|$ and $\|y-y'\|$, and by the triangle inequality it follows that $\|f(x)-f(y)\|$ must be (arbitrarily) close to $\|x-y\|$.