
Gemini 4 Hydrogen Migration Guide: Move Your App Off Gemini 3.8 Flash Without Surprises
Also available in Hindi: यह लेख हिंदी में पढ़ें
Gemini 4 Hydrogen is Google's new fast model for everyday coding and agent work, and Google calls it the recommended upgrade from Gemini 3.8 Flash. It launched on 12 November 2026 in AI Studio and the Gemini API, on both the free and paid tiers. Changing the model name is easy. The settings around it are where apps break, so here is the checklist.
What you get
- Model ID
gemini-4-hydrogen, with one shared 1,048,576-token window for input, thinking and output. - Four thinking levels:
low,medium,high(the default) and a newxhigh. - Paid tier: $1.50 per million input tokens and $7.50 per million output tokens, flat across the whole window. Output includes thinking tokens.
- Google says it finishes tasks 2.5 times faster than 3.8 Flash at its default setting and makes far fewer fabricated claims. These are Google's own numbers, so test on your app.
The migration checklist
- Change the model string from
gemini-3.8-flashtogemini-4-hydrogen. - Remove low output caps. Hard-coded limits such as 8,192 can cut answers short, because the cap now covers thinking plus output. Raise it to 65,536 or remove it.
- Set the thinking level on purpose. Hydrogen defaults to
high, notmedium, and sendingminimalreturns an error. - Drop explicit caching.
cachedContentsandcaches.createare not supported. Implicit caching runs on prompts of at least 4,096 tokens and gives a 95% discount on cached input. - Delete
temperature,top_pandtop_k. The server ignores them. - Declare tools properly. Use function calling or structured output, not JSON tool calls invented in a system prompt, which can fail with
MALFORMED_FUNCTION_CALL.
Which thinking level to use
| Level | Good for |
|---|---|
low |
Fast chat, bulk processing |
medium |
Interactive coding, live UI work |
high |
Default: complex coding, agents, documents |
xhigh |
Hard multi-step problems only |
Google's advice: run your test set at all four levels, then keep the lowest one that meets your quality bar. xhigh costs more tokens and can overthink simple prompts.
Watch the bill
Google bills every token the model processes, including thinking. A higher default level can use more output tokens even with the same prompt. Compare a day of usage before and after. For replies longer than 64K tokens, set background to true and raise max_output_tokens.
Related reading: Gemini 2.5 retirement checklist, Gemini 4 Carbon explained, Gemini CLI tutorial and the Google AI Studio tool page.
Sources
- Introducing Gemini 4 Hydrogen, Google blog (12 Nov 2026)
- What's new in Gemini 4 Hydrogen, Gemini API docs
- Build with Gemini 4 Hydrogen, Google developer blog (12 Nov 2026)
- Google announces Gemini 4 Hydrogen, 9to5Google (12 Nov 2026)
FAQ
Is Gemini 4 Hydrogen free to try?
Yes. It is on the free tier of the Gemini API and in Google AI Studio, with rate limits.
Do I need to rewrite my prompts?
Usually not. Change the model ID and settings first, then test your prompts.
Should I use Hydrogen or Carbon?
Use Hydrogen for everyday coding and agent steps. Google suggests Carbon for the hardest planning and debugging, and the two can be mixed in one session.
Why did my answers get cut off after switching?
Check max_output_tokens. On Hydrogen it limits thinking and output together, so old low caps are too small.