Skip to content

[Bug]: Gemini AI summaries fail with 400 due to thinkingConfig #261

Description

@b1ll0ddie123jw-art

What version of Degoog are you using?

Latest version from ghcr.io/degoog-org/degoog:latest

What platform is it deployed on?

Docker on Linux

What steps can reproduce the bug?

  1. Deploy degoog using the Docker image.
  2. Configure the AI Summary plugin to use a Gemini model.
  3. Perform a search that triggers an AI summary.
  4. The Gemini request fails with HTTP 400 "Request contains an invalid argument."

What is the expected behavior?

Gemini should successfully generate an AI summary of the search results.

What do you see instead?

The AI summary fails with an HTTP 400 error:

ai-summary:gemini bad response 400
{
"error": {
"code": 400,
"message": "Request contains an invalid argument."
}
}

Additional information

I investigated the request being sent to Gemini and found that the provider was including this in generationConfig:

thinkingConfig: opts.enableThinking
? { includeThoughts: true }
: { thinkingBudget: 0 },

Removing thinkingConfig from the request fixed the issue and Gemini AI summaries began working correctly.

The working generationConfig is:

generationConfig: {
maxOutputTokens: opts.maxTokens,
},

My suspicion is that this is related to newer Gemini models (I was using Gemini 3.6) no longer accepting the same thinkingConfig parameters used with older models such as Gemini 2.5.

I can't say for certain that the model version is the cause, but removing thinkingConfig resolved the 400 error.

I made the following change locally:

  • Removed the thinkingConfig block from the Gemini provider.
  • Confirmed that Gemini AI summaries work after restarting the degoog container.

Git commit containing the fix:
39c10d4 - "Fix Gemini AI summary requests"

Metadata

Metadata

Assignees

No one assigned

    Labels

    AcceptedWill likely be worked on for next releasebugOne or more bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions