Gemini 4 Argon thinkingBudget 400: Fix for Flutter (2026)

Your gemini-3.x code set a thinking budget and it worked. On gemini-4-argon that same parameter returns HTTP 400 — and MINIMAL does too. Here's the exact error, why Argon rejects it, and the three-step Dart fix using thinking levels.

Last updated: October 21, 2026 You swapped the model string to gemini-4-argon , redeployed, and now every request dies with HTTP 400. The thinkingBudget that worked fine on gemini-3.x is the reason your feature is down — and ThinkingLevel.minimal dies the same way. This is the gemini 4 argon thinkingbudget 400 error, and the fix takes three steps: delete the budget, set a thinking level, and verify against the right backend. 🎬 Watch: Gemini 4 Argon beginner tutorial: 3 thinking levels (3:49), API key + pricing chapters The 3:49 chapter covers the low/medium/high thinking levels that replace thinkingBudget — the exact migration this article fixes. No error-specific video exists yet. 21:00 ⏱ 21:00 · mikeyno-code — click to play inline, or watch on YouTube . gemini 4 argon thinkingbudget 400 error: what the failure looks like The failing request looks completely normal — right up until the server rejects it: final model = FirebaseAI.googleAI().generativeModel( model: 'gemini-4-argon', generationConfig: GenerationConfig( thinkingConfig: ThinkingConfig.withThinkingBudget(4096), // ❌ 400 ), ); final response = await model.generateContent([Content.text('Explain sealed classes.')]); // FirebaseAIException: 400 INVALID_ARGUMENT — thinking budget not supported The same happens with ThinkingConfig.withThinkingLevel(ThinkingLevel.minimal) . Both fail at request time — generateContent and generateContentStream alike. Nothing is wrong with your key, your project, or your prompt: the *parameter itself* is rejected during server-side validation. In Flutter the failure surfaces as a FirebaseAIException carrying the 400 status and an INVALID_ARGUMENT reason — your try/catch around the model call is where you'll see it, not in flutter analyze , which stays green…

Explore