  Oxygen abundance measurements are important for understanding stellar
structure and evolution. Measured in Cepheids, they further provide clues on
the metallicity gradient and chemo-dynamical evolution in the Galaxy. However,
most of the abundance analyses of Cepheids to date have been based on
one-dimensional (1D) hydrostatic model atmospheres. Here, we test the validity
of this approach for the key oxygen abundance diagnostic, the \ion{O}{I}
$777\,\mathrm{nm}$~triplet lines. We carry out 2D non-LTE radiative transfer
clculations across two different 2D radiation hydrodynamics simulations of
Cepheid atmospheres, having stellar parameters of $T_\mathrm{eff}= 5600$ K,
solar chemical compositions, and $\log\,g= 1.5$ and $2.0$, corresponding to
pulsation periods of 9 and 3 days, respectively. We find that the 2D non-LTE
versus 1D LTE abundance differences range from $-1.0$~dex to $-0.25$~dex
depending on pulsational phase. The 2D non-LTE versus 1D non-LTE abundance
differences range from $-0.2$~dex to $0.8$~dex. The abundance differences are
smallest when the Cepheid atmospheres are closest to hydrostatic equilibrium,
corresponding to phases of around $0.3$ to $0.8$, and we recommend these phases
for observers deriving the oxygen abundance from \ion{O}{I} $777\,\mathrm{nm}$
triplet with 1D hydrostatic models.
