Migration requires at least changing the model ID and rechecking the output budget, default thinking level, cache fields, sampling parameters, tool declarations, and multi-turn state. A Gemini 3.8 Flash request cannot be migrated to Hydrogen by changing only the model name.
Suitable task: Migrating Gemini API requests that use gemini-3.8-flash to gemini-4-hydrogen.
Unsuitable tasks: Tuning reasoning levels, implementing long outputs, general input/output patterns, and configuring individual features.
Model versions covered: Gemini 3.8 Flash → Gemini 4 Hydrogen (gemini-4-hydrogen).
Applicable clients, agents, or APIs: Google GenAI SDK, and the Gemini API's GenerateContent and Interactions APIs; the page says Hydrogen is available through both APIs.
Recommended reasoning level and parameters: Hydrogen defaults to thinking_level: "high". If migration needs to preserve existing behavior, check the change in defaults during evaluation. Tuning specific levels is outside this note's scope.
Request configuration migration checklist:
| Item | Gemini 3.8 Flash | Migration handling for Gemini 4 Hydrogen |
|---|---|---|
| Model ID | gemini-3.8-flash | Change to gemini-4-hydrogen |
| Context budget | Up to 1M input tokens, plus a 64K output budget | Input, thinking, and output share a 1,048,576-token context window; align the synchronous request's default/maximum output to 65,536 tokens |
| Default thinking level | Not listed in this migration note | Defaults to high; minimal is unsupported and using it returns an error |
| Explicit caching | Cache fields can be used | Remove cached_content from requests; explicit caching (cachedContents / caches.create) is unsupported |
| Sampling parameters | temperature, top_p, and top_k can be passed | Remove them from requests; in-range custom values are ignored, while out-of-range values return HTTP 400 |
| Tools and JSON output | No changes listed in the migration note | Declare native function-calling tools, or constrain JSON with structured outputs; do not rely on system instructions alone to request custom text-based tool calls when no tools are declared |
| Multi-turn state | No changes listed in the migration note | With the Interactions API, use previous_interaction_id; for client-managed GenerateContent history, return the previous model turns and thought signatures unchanged. Thought signatures from parallel functionCall parts cannot be copied between them |
Minimal request change:
model = "gemini-4-hydrogen"Also remove incompatible fields and check that the existing output limit does not contain a hard-coded value below 65,536. The page recommends removing such low limits or raising them to 65,536; do not mistake 65,536 for Hydrogen's full context capacity.
Change the model ID in the request to gemini-4-hydrogen.
Search for and remove cached_content, temperature, top_p, and top_k; check whether callers depend on the old behavior produced by these fields.
Check max_output_tokens: remove a hard-coded low limit or raise it to 65,536. Recalculate the total budget because input, thinking, and output now share a 1,048,576-token window.
Check tool and JSON requests: explicitly declare function-calling tools or use structured outputs; do not simulate undeclared tool calls with prompts alone.
Check multi-turn code: pass previous_interaction_id to the Interactions API; preserve previous model turns and thought signatures with GenerateContent.
Validate outputs, error handling, and request fields against the existing evaluation set. Since the default thinking level changes to high, include latency, token usage, and output differences in the migration evaluation.
The source's “Migrate from Gemini 3.8 Flash and earlier” section lists the model ID, unified context budget, default thinking level, explicit caching, sampling parameters, tools/structured outputs, multi-turn state, and long-output migration items.
The source says Hydrogen defaults to high and supports low, medium, high, and xhigh; minimal is rejected with an error. This note records only the default and compatibility, not a comparison of the levels.
The source says the 1,048,576-token window is shared by input, thinking, and output; synchronous responses support up to 65,536 tokens per request, for both streaming and non-streaming.
The source says implicit caching is enabled by default. Prompts of at least 4,096 tokens may qualify, and cached input tokens receive a 95% discount when a cache hit occurs.
The source also recommends using background execution or SDK client continuation for outputs longer than 64K; implementation details are covered by a long-output topic and are not expanded here.
These differences come from the official migration documentation visible in Google AI Studio on the collection date. The page does not provide a complete side-by-side Flash request schema or explain how every field in older requests behaves across all SDK versions; before migrating, verify against the SDK/API version actually in use. Pricing, rate limits, and level tuning are outside this checklist's scope.
Open the original URL in Google AI Studio and read “Migrate from Gemini 3.8 Flash and earlier” under “Migration checklist.” This note summarizes only the content visible on that page; no model was called and no migration code was run.
Gemini 4 Hydrogen