When rendering math equations in LaTeX, the AI assistant sometimes renders it properly and sometimes it doesn't. For example, take the following chat:
https://kagi.com/assistant/51249a16-a92c-4898-b1a4-9787687b554e
It doesn't render the following code:
$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} xn = f(0) + f'(0)x + \frac{f"(0)}{2!}x2 + \frac{f"(0)}{3!}x3 + \dots$
However, within the same output, it appears to properly render other LaTeX code. Hopefully you can help me figure out what's wrong!

I've tested the outputted LaTeX code in rendering tools and it appears to be valid.
The AI assistant properly renders all valid LaTeX code.