# AI topic summarize hangs (Gemini)

**URL:** <https://meta.discourse.org/t/ai-topic-summarize-hangs-gemini/366847>\
**Category:** Product Support\
**Created:** [May 20, 2025, 12:46pm UTC](https://meta.discourse.org/t/ai-topic-summarize-hangs-gemini/366847 "2025-05-20T12:46:13Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

A user, [Parker1090](/t/-/366847/1), is experiencing issues with the AI topic summarization feature using the Google Gemini 2.0 Flash plugin, which results in a hang and a 400 error related to an invalid JSON payload, specifically a problem with the `response_schema`. The error message points to an unrecognized `json_schema` field in the Gemini configuration. [KhoiUSA](/t/-/366847/2) provided a link to a similar issue ([Summarize Topic with AI loads indefinitely, In valid JSON Payload Received?](https://meta.discourse.org/t/summarize-topic-with-ai-loads-indefinitely-invalid-json-payload-received/365587)) with a possible solution and [Parker1090](/t/-/366847/3) confirmed that the workaround fixes the issue temporarily.

<div class="post-metadata">

**Author:** ![Parker1090](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/parker1090/32/119862_2.png) [@Parker1090](https://meta.discourse.org/u/Parker1090)\
**Post date:** [May 20, 2025, 12:46pm UTC](https://meta.discourse.org/t/ai-topic-summarize-hangs-gemini/366847/1 "2025-05-20T12:46:13Z")

</div>

Hello!

We’ve set up the AI plugin with Google Gemini 2.0 Flash and enabled summarize, spam detection, and AI helper.

Helper and spam seem to work fine - no problems at all there.

However, the summarize just hangs

 ![The image displays a gray bar chart under the title "Topic summary," with multiple bars of varying lengths, and a placeholder text mentioning the summary of topic using AI below the chart. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/5/2/8/528827277eb110bbc4538932601fb7d92345eeab.png)

Error log shows the below -

```plaintext
DiscourseAi::Completions::Endpoints::Gemini: status: 400 - body: {
  "error": {
    "code": 400,
    "message": "Invalid value at 'generation_config.response_schema.type' (type.googleapis.com/google.ai.generativelanguage.v1beta.Type), \"json_schema\"\nInvalid JSON payload received. Unknown name \"json_schema\" at 'generation_config.response_schema': Cannot find field.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "generation_config.response_schema.type",
            "description": "Invalid value at 'generation_config.response_schema.type' (type.googleapis.com/google.ai.generativelanguage.v1beta.Type), \"json_schema\""
          },
          {
            "field": "generation_config.response_schema",
            "description": "Invalid JSON payload received. Unknown name \"json_schema\" at 'generation_config.response_schema': Cannot find field."
          }
        ]
      }
    ]
  }
}

```

I have no experience with this, so any input is appreciated. It’s only the summarize feature that’s not working, everything else seems fine.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![KhoiUSA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/khoiusa/32/373010_2.png) [@KhoiUSA](https://meta.discourse.org/u/KhoiUSA)\
**Post date:** [May 20, 2025, 1:34pm UTC](https://meta.discourse.org/t/ai-topic-summarize-hangs-gemini/366847/2 "2025-05-20T13:34:13Z")

</div>

I recently encountered this as well, and a solution has been posted here that may help you: [Summarize Topic with AI loads indefinitely, Invalid JSON Payload Received?](https://meta.discourse.org/t/summarize-topic-with-ai-loads-indefinitely-invalid-json-payload-received/365587)

---

<div class="post-metadata">

**Author:** ![Parker1090](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/parker1090/32/119862_2.png) [@Parker1090](https://meta.discourse.org/u/Parker1090)\
**Post date:** [May 20, 2025, 1:38pm UTC](https://meta.discourse.org/t/ai-topic-summarize-hangs-gemini/366847/3 "2025-05-20T13:38:53Z")

</div>

Ah, perfect. That does fix the issue for me. Hopefully the update will resolve it completely, but the workaround works for the time being.

Appreciate that 👍

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [June 19, 2025, 1:39pm UTC](https://meta.discourse.org/t/ai-topic-summarize-hangs-gemini/366847/4 "2025-06-19T13:39:29Z")

</div>

Closed on June 19, 2025, 1:39pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
