Final update on the matter:
After removing the AI Gateway from the models I can confidently say that the issue is gone. Why did it start to happen is something I don’t understand.
But a few minutes ago I had a weekly automation posting a summary of the week and it failed with the same cutoff. I realized it was using another model which was still using AI Gateway. I’ve removed the gateway and triggered the summary like 3 times and not a single failure.
So, if your AI is getting cutoff before writing everything, and you happen to be using AI Gateway from Cloudflare, the first step is to query the model API directly!.