fix: prevent Gemini 3.7 Flash errors for minimal reasoning (#18989)