personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix Gemini JSON output tests hitting token limit

Gemini 3's implicit thinking consumes part of max_output_tokens budget.
With 100 tokens, ~92 went to thinking leaving insufficient tokens for
JSON output, causing MAX_TOKENS finish reason. Increased to 500 tokens.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+4 -2
+4 -2
tests/integration/test_gemini_generate.py
··· 102 102 os.environ["JOURNAL_PATH"] = journal_path 103 103 104 104 # Test JSON output mode 105 + # Note: Gemini 3 uses implicit thinking which consumes part of max_output_tokens 105 106 response = gemini_generate( 106 107 "Create a JSON object with fields 'name' (value: 'test') and 'number' (value: 42)", 107 108 model=GEMINI_FLASH, 108 109 json_output=True, 109 110 temperature=0.1, 110 - max_output_tokens=100, 111 + max_output_tokens=500, 111 112 ) 112 113 113 114 assert response is not None ··· 420 421 os.environ["JOURNAL_PATH"] = journal_path 421 422 422 423 # Test async JSON output mode 424 + # Note: Gemini 3 uses implicit thinking which consumes part of max_output_tokens 423 425 response = await gemini_agenerate( 424 426 "Create a JSON object with fields 'status' (value: 'success') and 'value' (value: 100)", 425 427 model=GEMINI_FLASH, 426 428 json_output=True, 427 429 temperature=0.1, 428 - max_output_tokens=100, 430 + max_output_tokens=500, 429 431 ) 430 432 431 433 assert response is not None