Skip to content

API no longer returns thought summaries with client.models.generate_content #1944

@danielpolatajko-apollo

Description

@danielpolatajko-apollo

Environment details

  • Programming language: Python 3.12.12
  • OS: MacOS Sequoia 15.7.3
  • Language runtime version: 3.12.12
  • Package version: 1.52.0

Steps to reproduce

  1. Run the Gemini "Thought summaries" doc example (below for ease) with model = gemini-3-pro-preview
  2. Observe no thought summary
from google import genai
from google.genai import types

client = genai.Client()
prompt = "What is the sum of the first 50 prime numbers?"
response = client.models.generate_content(
  model="gemini-3-pro-preview",
  contents=prompt,
  config=types.GenerateContentConfig(
    thinking_config=types.ThinkingConfig(
      include_thoughts=True
    )
  )
)

for part in response.candidates[0].content.parts:
  if not part.text:
    continue
  if part.thought:
    print("Thought summary:")
    print(part.text)
    print()
  else:
    print("Answer:")
    print(part.text)
    print()

The streaming client still returns thought summaries as expected, as does the webapp.

I also opened a community forum issue here

Metadata

Metadata

Assignees

Labels

api: gemini-apipriority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions