On the one hand, usual formulation is you only get one question, finding out which is the liar alone is easy but useless as then you're out of questions to actually get through the gate. On the other hand, unless you get the information about the behavior of the guards from a trusted source that isn't them you have no reason to believe them, and in fact they cannot relay the setup to you accurately without giving it away if you assume they're always like that as many do.
The full setup is that they can both tell you about the setup, but for the One Question, they follow the rules stipulated. Neither is actually bound to always lie and always tell the truth outside of the One Question.