With the diversified development for network service in terms of quality of service, bandwidth, and noise tolerance, variable-bandwidth gridless optical networks (V-GON) have become a promising technology for future networking. Unlike traditional elastic optical networks, which use orthogonal frequency division multiplexing for flexible allocation of subcarriers, V-GON adopts wave division multiplexing with variable modulation format and adjustable bandwidth, which can provide a more convenient way of data transmission. One of the key issues for V-GON is routing and spectrum allocation (RSA) due to the complexity of multi-channels. With complex modulation formats and different center wavelengths, an RSA algorithm needs to assign center frequencies, bandwidths, and modulation formats for each connection and also needs to consider the noise tolerance of the path. In this paper, we focus on optimizing routing, modulation format, and spectrum allocation by deep reinforcement learning to meet the demands of noise tolerance at different speeds. We proposed a reinforcement learning model to realize the availability forecast. The model can predict the feasibility of a pre-allocated optical spectrum. We conduct a numerical simulation to validate the performance. The results show that the proposed Graph Neural Network-Optical Path Availability Prediction algorithm can improve network efficiency, and utilization of spectral resources, and reduce the blocking ratio, which can support dynamic connectivity and interference reduction. In NSFNET network topology our proposed GNN-OPAP algorithm model reduces the loss by 95.88% compared to the DNN model and 64.23% compared to the LSTM model. In 4*mesh network topology, our proposed GNN-OPAP algorithm model reduces the loss by 16.14% compared to the DNN model and 76.33% to the LSTM model. This research provides new insights into the RSA problems in V-GON and provides a powerful reference for designing and optimizing future optical communication networks.