# Summarize Topic with AI loads indefinitely, Invalid JSON Payload Received?

**URL:** https://meta.discourse.org/t/summarize-topic-with-ai-loads-indefinitely-invalid-json-payload-received/365587
**Category:** Bug
**Tags:** ai
**Created:** [May 10, 2025, 1:48pm UTC](https://meta.discourse.org/t/summarize-topic-with-ai-loads-indefinitely-invalid-json-payload-received/365587 "2025-05-10T13:48:18Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [May 16, 2025, 12:24pm UTC](https://meta.discourse.org/t/summarize-topic-with-ai-loads-indefinitely-invalid-json-payload-received/365587/10 "2025-05-16T12:24:57Z")

</div>

The Gemini error was fixed in:

[https://github.com/discourse/discourse-ai/pull/1340](https://github.com/discourse/discourse-ai/pull/1340)

It was expecting a slightly different format for the JSON schema. Also, we’ll now treat the completion as plain text if the model doesn’t return valid JSON when asked to.

---

_[View the full topic](https://meta.discourse.org/t/summarize-topic-with-ai-loads-indefinitely-invalid-json-payload-received/365587)._
