Same issue here - **gemini-2.5-flash streaming stops prematurely with finish_reason=STOP in development environment, but works fine in production with identical code**. Input/output well within limits, no safety issues. Development environment has more complex context which seems to trigger this bug. Tried prompt completion instructions and prefix rotation with limited success. Any other workarounds?
JAEEUN_JUNG
345
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Empty response.text from Gemini 2.5 Pro, despite no safety and max_tokens issues | 17 | 2626 | November 24, 2025 | |
| Intermittent failure with FinishReason STOP | 2 | 876 | September 15, 2025 | |
| Gemini 2.5 Pro on Vertex sometimes returns empty string | 8 | 784 | November 6, 2025 | |
| Gemini 3.0 Pro preview with empty response.text | 9 | 1043 | March 12, 2026 | |
| Gemini 3.0 Pro Preview: Empty responses | 6 | 725 | February 3, 2026 |