In this paper, we release accurate photometric redshifts for 1692 counterparts to Chandra sources in the central square degree of the Cosmic Evolution Survey (COSMOS) field. The availability of a large training set of spectroscopic redshifts that extends to faint magnitudes enabled photometric redshifts comparable to the highest quality results presently available for normal galaxies. We demonstrate that morphologically extended, faint X-ray sources without optical variability are more accurately described by a library of normal galaxies (corrected for emission lines) than by active galactic nucleus (AGN) dominated templates, even if these sources have AGN-like X-ray luminosities. Preselecting the library on the bases of the source properties allowed us to reach an accuracy σ_(Δz/(1+z(spec))~0.015 with a fraction of outliers of 5.8% for the entire Chandra-COSMOS sample. In addition, we release revised photometric redshifts for the 1735 optical counterparts of the XMM-detected sources over the entire 2 deg^2 of COSMOS. For 248 sources, our updated photometric redshift differs from the previous release by Δz > 0.2. These changes are predominantly due to the inclusion of newly available deep H-band photometry (H_(AB) = 24 mag). We illustrate once again the importance of a spectroscopic training sample and how an assumption about the nature of a source together, with the number and the depth of the available bands, influences the accuracy of the photometric redshifts determined for AGN. These considerations should be kept in mind when defining the observational strategies of upcoming large surveys targeting AGNs, such as eROSITA at X-ray energies and the Australian Square Kilometre Array Pathfinder Evolutionary Map of the Universe in the radio band