Context. The abundances of the three main isotopes of oxygen are altered in the course of the CNO-cycle. When the first dredge-up mixes the burning products to the surface, the nucleosynthesis processes can be probed by measuring oxygen isotopic ratios. Aims. By measuring 16O/17O and 16O/18O in red giants of known mass we compare the isotope ratios with predictions from stellar and galactic evolution modelling. Methods. Oxygen isotopic ratios were derived from the K-band spectra of six red giants. The sample red giants are open cluster members with known masses of between 1.8 and 4.5 Msun . The abundance determination employs synthetic spectra calculated with the COMARCS code. The effect of uncertainties in the nuclear reaction rates, the mixing length, and of a change in the initial abundance of the oxygen isotopes was determined by a set of nucleosynthesis and mixing models using the FUNS code. Results. The observed 16O/17O ratios are in good agreement with the model results, even if the measured values do not present clear evidence of a variation with the stellar mass. The observed 16O/18O ratios are clearly lower than the predictions from our reference model. Variations in nuclear reaction rates and mixing length parameter both have only a very weak effect on the predicted values. The 12C/13C ratios of the K giants studied implies the absence of extra-mixing in these objects. Conclusions. A comparison with galactic chemical evolution models indicates that the 16O/18O abundance ratio underwent a faster decrease than predicted. To explain the observed ratios, the most likely scenario is a higher initial 18O abundance combined with a lower initial 16 O abundance. Comparing the measured 18 O/17 O ratio with the corresponding value for the ISM points towards an initial enhancement of 17O as well. Limitations imposed by the observations prevent this from being a conclusive result.