Please add warning about function call messages order in official docs

Our production app recently went down for a couple of hours because we decided to insert part of our system prompt right above the last message in each request. Turns out this fails validation when the latest message is a tool one, since the new system message gets inserted between it and its matching function call and these types of messages need to be right next to each other. Afaik, there’s no mention of such a validation in the official docs. It just says this:

Call the model again by appending the function response as a new message, and let the model summarize the results back to the user.

https://platform.openai.com/docs/guides/function-calling/common-use-cases

“Appending” can be interpreted as “adding to the end of the array”. Imho, this should read something like this instead:

Call the model again after inserting the function response as a new message right after the function call one, and let the model summarize the results back to the user. The order of the messages is mandatory. Otherwise, the request will fail validation.

Also, there should be a visible warning that mentions this and other relevant validations when dealing with function call and result messages.