Tabbit
ResourcesBlogModels
Tabbit LogoTabbit

Tabbit — The AI Browser that Works for You

Topics

  • Best Browsers 2026: Rankings and Top Lists
  • AI Browser Guides and Resources
  • Browser Comparisons: Head-to-Head Guides
  • Browser Reviews and Explainers
  • Browser Alternatives
  • Browser Directory: Guides by Browser
  • Agentic Browser Resources
  • Browser Downloads and Install Guides
  • Browser Productivity Resources
  • SillyTavern Model Guides and Presets

Popular Guides

  • Best Browsers 2026: Top 10 Ranked & Compared
  • Best Free AI Browsers 2026: Plans & Prices Compared
  • Rabbit Browser: What It Is & Why Tabbit Is Better
  • Firefox vs Chrome 2026: Privacy, RAM & Speed Compared
  • Best Lightweight Browsers 2026: 7 Tested for RAM & Speed
  • AI Browser List 2026: 10 Browsers Compared
  • Neobrowser: Norton Neo, Download & Alternatives
  • Edge vs Chrome 2026: Speed, RAM & Battery Tested
  • Best Internet Browser for Android 2026
  • Best AI Browser 2026: Top 9 Tested & Ranked

Events

  • Tabbit Skill Competition
  • KPOP SBTI Fandom Personality Test
  • Tabbit Campus Creator Program
  • fifi's Picks: AI Skills for Research Papers
  • User Survey

About

  • Tabbit Blog
  • Press & Media
English
简体中文English
Showcases & prompts
MediaGemini 4 Hydrogen

Run Gemini 4 Hydrogen Agent with Background Long Decoding on Google Cloud

Original source

Google Cloud Gemini Enterprise Agent Platform

AuthorNot specified

Source date2026-11-12

Tabbit curation2026-11-12

Read original

One-sentence takeaway

For Agent tasks that require long generation without keeping the client connected, use the Interactions API with background=True to start server-managed long decoding, then check its status with the Interaction ID. This mode requires store=True.

Use cases

  • Suitable tasks: Generating very long reports, code, or proofs; asynchronous Agent jobs submitted through a task queue and queried later.

  • Unsuitable tasks: Tasks that need a short result immediately, or workflows that require the server not to store the Interaction.

  • Supported model version: gemini-4-hydrogen.

  • Supported client, Agent, or API: Google Cloud Gemini Enterprise Agent Platform Interactions API; Python Google Gen AI SDK.

  • Recommended reasoning level and parameters: For long decoding, set max_output_tokens above 65,536, up to a maximum of 1,048,576 minus the input token count; the example uses HIGH. Input and output share a 1,048,576-token limit.

Ready-to-use content

The example below starts a background Interaction and polls until it finishes. Replace PROJECT_ID with your Google Cloud project ID. Before making the call, authenticate with Agent Platform using ADC or an API key.

import time
from google import genai

client = genai.Client(
    enterprise=True,
    project="PROJECT_ID",
    location="global",
)

interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    input="Write a complete system migration implementation plan, including risks, rollback steps, and acceptance criteria.",
    background=True,
    store=True,
    generation_config={
        "max_output_tokens": 256000,
        "thinking_level": "high",
    },
)

while interaction.status in ("queued", "in_progress"):
    time.sleep(10)
    interaction = client.interactions.get(id=interaction.id)

print(f"Status: {interaction.status}")
print(interaction.output_text)

Install or upgrade the SDK:

pip install --upgrade "google-genai>=2.34.0"

Test or workflow steps

  1. Set up Agent Platform access in your Google Cloud project and authenticate with ADC or an API key.

  2. Install google-genai version 2.34.0 or later. The Interactions API in this version supports automatic SDK continuation; background mode is continued by the server.

  3. When creating the Interaction, set background=True and store=True, and set max_output_tokens to a budget greater than 65,536.

  4. Save the returned Interaction ID. While the background job runs, poll for the queued or in_progress status using client.interactions.get(id=...).

  5. When the task finishes, check its status and read output_text. To stop a task, cancel the background Interaction; after a checkpoint is reached, the service saves a continuation_token so execution can resume from that point.

Original evidence and data

  • Google's Cloud documentation example for background mode explicitly uses background=True, store=True, and max_output_tokens=256000, and calls interactions.get() every 10 seconds while the status is queued or in_progress.

  • In background mode, continuation is handled by the Agent Platform server, so the client does not need to keep a single request stream open. This mode requires the Interaction to be stored; the default server-side retention period is 7 days.

  • In background mode, a canceled task can resume from a checkpoint. Checkpoints are saved starting after 65,536 decoded tokens, then every additional 5,000 tokens.

  • Long decoding on Agent Platform is supported only on v1beta1. The Google Gen AI SDK uses v1beta1 by default; long decoding is unsupported if you explicitly switch to v1.

  • Source: Gemini 4 Hydrogen developer guide, page last updated 2026-11-12 UTC.

Limitations

  • background=True requires store=True, so it is unsuitable for workflows that prohibit server-side storage. The Interactions API's stateless mode requires store=False, with the caller managing continuation.

  • max_output_tokens counts thinking, tool calls, and the final answer. The combined input and output limit is 1,048,576 tokens, and the limit for a single foreground output segment is 65,536 tokens; server-managed background continuation can complete long output across segments.

  • Long decoding is supported only on Agent Platform v1beta1. Do not override the SDK's API version to v1 when deploying.

  • Interactions are retained for 7 days by default; handle job records according to the task's data-retention requirements. The source example also shows how to delete segments in reverse order.

  • The documentation labels Hydrogen as a short-cycle GA model and says retirement will be announced at least 45 days in advance; monitor model lifecycle announcements for production workflows.

Reproduction notes

Start a background Interaction using the example, then confirm that the initial creation returns an Interaction ID, the in-progress status can be queried, and the output can be read when the task finishes. To verify cancellation and resumption, call the cancellation endpoint while the task is running, then use the returned continuation_token and that Interaction to create a continuation request. This article summarizes the documented configuration steps; the request was not run in an actual Google Cloud project.

Curated by Tabbit

Prompts and showcases are summarized from public sources and Tabbit editorial notes. Check the original licensing and intended use before copying it.

Gemini 4 Hydrogen

Use in Tabbit

Gemini 4 Hydrogen

Related showcases & prompts

OfficialGoogle AI for Developers (Gemini API documentation)

Google Gemini API: Gemini 4 Hydrogen Model Configuration

OfficialGoogle AI Studio documentation

Google AI Studio: Migrating from Gemini 3.8 Flash to Gemini 4 Hydrogen

OfficialGoogle AI Studio Gemini API documentation

Google AI Studio: Gemini 4 Hydrogen's Four Thinking Levels

OfficialGoogle AI Studio Gemini API documentation

Google AI Studio: Locate Content in Long Videos with Gemini 4 Hydrogen

Gemini 4 Hydrogen

Related reviews

OfficialGoogle DeepMind2026-11-12

Google DeepMind's Official Capability Benchmarks: Gemini 4 Hydrogen

MediaAI IQ

Gemini 4 Hydrogen: AI IQ Scores and Benchmark Coverage

MediaPlotly Blog2026-11-12

Plotly Data Analytics Benchmark: Gemini 4 Hydrogen Scores 43/43

MediaArena WebDev Leaderboard2026-11-14

Gemini 4 Hydrogen (High): Arena WebDev Leaderboard