Could you expose $wgMaxArticleSize through ApiQuerySiteinfo ?
This will allow bots to know before hand what's the maximum allowed size for an article, and be able to trim edits correctly.
My own need is the following:
One of the task of my bot is to update maintenance pages with a list of pages containing some types of errors, and sometimes the produced list is bigger than the maximum allowed size for an article (2MB), so the API returns a "contenttoobig" error. Is it possible to know what the limit is before hitting it ?
Currently, I'm trimming the result progressively until the API stops complaining about the size...
Original request through the mailing list: https://lists.wikimedia.org/pipermail/mediawiki-api/2016-June/003760.html