(Heads up: I used Gemini to help troubleshoot and write this report, but I’ve personally tested and verified the results below. Thank you!)
gemini-4-argon returns thinking summaries and thinking-token counts for normal responses, but both disappear when I require structured JSON—even when calling Google directly without the Python SDK.
What I tested
Both requests used:
"thinkingConfig": {
"thinkingLevel": "MEDIUM",
"includeThoughts": true
}
The prompt was identical:
Find the smallest positive integer that leaves remainder 1 when divided by 2, 3, 4, 5, and 6, and is divisible by 7.
The only difference was adding these settings to the structured JSON request:
"responseMimeType": "application/json",
"responseSchema": {
"type": "OBJECT",
"properties": {
"answer": {"type": "INTEGER"},
"explanation": {"type": "STRING"}
},
"required": ["answer", "explanation"]
}
What happened
- Normal response: returned a thought summary and 255 thinking tokens.
- Structured JSON: returned no thought summary, and
thoughtsTokenCountwas entirely absent—not explicitlynull. - Both requests succeeded with HTTP 200.
I reproduced this using google-genai versions 1.73.1 and 2.32.0, then confirmed it with direct REST requests to:
https://generativelanguage.googleapis.com/v1beta/models/gemini-4-argon:generateContent
For comparison, gemini-3.8-flash returned thinking information with the same structured-output settings in my Python tests.
My production workflow requires schema-constrained JSON, and having reasoning token transparency would be helpful for anticipating project costs. Is there a workaround that preserves the required JSON structure?
Direct REST test output
==================================================
TEST: normal_answer
HTTP status: 200
USAGE DIRECTLY FROM GOOGLE:
{
"promptTokenCount": 67,
"candidatesTokenCount": 483,
"totalTokenCount": 805,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 67
}
],
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 483
}
],
"thoughtsTokenCount": 255
}
Thought summaries found: 1
Model version: gemini-4-argon
Response ID: GWzaavPZJtHV_uMPgJX-iAo
==================================================
TEST: structured_json
HTTP status: 200
USAGE DIRECTLY FROM GOOGLE:
{
"promptTokenCount": 237,
"candidatesTokenCount": 239,
"totalTokenCount": 476,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 237
}
],
"candidatesTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 239
}
]
}
Thought summaries found: 0
Model version: gemini-4-argon
Response ID: JWzaaqapN6zVjMcPvaLEuA8
I can provide the complete request bodies and raw responses if helpful. Thanks for taking a look.