Parsoid is expecting that when it sends a bit of wikitext over for parsing, such as <math>e^2</math>, that this will be rendered with the wikitext parser. Without sending the contentmodel=wikitext parameter mediawiki will choose the content model based on the title, which in the case of Flow topics is not wikitext.
This bug surfaced due to <math> tags failing in Flow.
As suggested i think the easiest fix is just pass an explicit contentmodel=wikitext with the api requests.
Version: unspecified
Severity: normal