In a recent study, we have observed that by imposing a truncated T-duality transformation on the circular reduction of the bosonic couplings in the heterotic theory at four- and six-derivative orders, we can calculate these couplings in a particular YM gauge where the YM potential vanishes but its field strength remains non-zero. Importantly, the coupling constants are independent of the gauge choice, so these results are valid across different YM gauge choices.In this work, we explore the cosmological reduction of these couplings when the YM gauge fields belong to the Cartan subalgebra of SO(32) or E8 × E8. We demonstrate that after applying appropriate one-dimensional field redefinitions and total derivative terms, the couplings can be expressed in a proposed O(9, 25)-invariant canonical form, which is the extension of the canonical O(9, 9)-invariant form for just the NS-NS fields proposed by Hohm and Zwiebach. This O(9, 25)-invariant expression is in terms of the trace of the first time derivative of the generalized metric, which encompasses both the YM field and the NS-NS fields.