Connecting planet formation and astrochemistry: C/Os and N/Os of warm giant planets and Jupiter analogues