# Gemini 4 Hydrogen vs Claude Sonnet 5.5 for Agent Workloads (https://reapi.ai/resources/gemini-4-hydrogen-vs-claude-sonnet-5-5)

Evaluating **Gemini 4 Hydrogen vs Claude Sonnet 5.5** for production agents reveals a clean workhorse split across vendor cards and independent evaluations. On Google DeepMind's November 12, 2026 launch table, Gemini 4 Hydrogen takes 7 of 10 rows across knowledge work, reasoning, and business automation at 25% below Anthropic's direct per-token rates<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. Claude Sonnet 5.5, shipped September 28, 2026, takes all 3 remaining rows, and every one sits inside a shell or desktop: Terminal-Bench 4.1 (63.9% vs 57.0%), Terminal-Bench-Science 0.1 (59.9% vs 51.4%), and OSWorld-2.1 (83.9% vs 77.6%)<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-4">\[4]</a></sup>. Artificial Analysis confirms that boundary independently, putting Sonnet 5.5 ahead on Terminal-Bench 4.0 (64% vs 54%) and 1 point higher on its Intelligence Index (55 at `max` vs Hydrogen's 54 at `xhigh`), while estimating Hydrogen at roughly 32% of Sonnet 5.5's cost per task<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>.

Gateway pricing adds a twist vendor rate cards hide. On December 3, 2026 live quotes, [Claude Sonnet 5.5](/models/claude-sonnet-5-5) on reAPI's default `claude` group bills $1.40 input / $7.00 output per 1M tokens (30% off Anthropic's $2.00 / $10.00 direct schedule), undercutting default-group [Gemini 4 Hydrogen](/models/gemini-4-hydrogen) at $1.50 / $7.50 by 6.7%<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>. Yet Hydrogen also exposes discounted reAPI groups down to $0.225 / $1.125 per 1M tokens, skips explicit cache-write surcharges, and accepts native video, audio, PDF, and Office inputs<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-7">\[7]</a></sup>. Rather than forcing one model across an entire agent graph, route extraction, classification, and document intake to Gemini 4 Hydrogen while reserving Claude Sonnet 5.5 for shell-driven repository edits and GUI automation.

![Minimalist brushed-brass balance beam holding an opalescent crystal teardrop opposite a warm sandstone stepped cube in an alabaster studio illustrating Gemini 4 Hydrogen vs Claude Sonnet 5.5](https://cdn.reapi.ai/media/blog/gemini-4-hydrogen-vs-claude-sonnet-5-5/hero-v1.png)

## Gemini 4 Hydrogen vs Claude Sonnet 5.5 across agent benchmarks

The two models separate cleanly by execution surface. Where an agent parses documents, charts, SaaS workflows, or long multimodal bundles, Gemini 4 Hydrogen leads<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. Where an agent iterates inside a terminal against compilers and tests, or operates desktop GUIs from screenshots, Claude Sonnet 5.5 stays ahead across every reported table<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-3">\[3]</a></sup>.

| Benchmark or aggregate                 | Gemini 4 Hydrogen | Claude Sonnet 5.5  | Source and scope                                     |
| -------------------------------------- | ----------------- | ------------------ | ---------------------------------------------------- |
| Terminal-Bench 4.1 (cheating-adjusted) | 57.0%             | **63.9%**          | Google launch table (+6.9 pts Sonnet 5.5)            |
| Terminal-Bench 4.0                     | 54%               | **64%**            | Artificial Analysis independent run (+10 pts)        |
| Terminal-Bench-Science 0.1             | 51.4%             | **59.9%**          | Google launch table (+8.5 pts Sonnet 5.5)            |
| OSWorld-2.1 (offline subset)           | 77.6%             | **83.9%**          | Google launch table, desktop computer use            |
| SWE-sweep                              | **13.5%**         | 3.1%               | Google launch table, bug repair without regressions  |
| Agents' Last Exam v1.1                 | **71.6%**         | 60.4%              | Google launch table (Epoch noted grading flaws)      |
| AutomationBench-AA                     | **76.1%**         | 71.8%              | Google launch table, SaaS business automation        |
| Vending-Bench 2                        | **$14,549**       | $11,165            | Google launch table, simulated final bank balance    |
| HLE-Diamond                            | **58.8%**         | 53.3%              | Google launch table, general reasoning               |
| Chartography                           | **66.6%**         | 61.6%              | Google launch table (matches Anthropic Sonnet score) |
| MKA                                    | **53.4%**         | 52.0%              | Google launch table, visual knowledge work           |
| AA Intelligence Index                  | 54 (`xhigh`)      | **55** (`max`)     | Artificial Analysis (Hydrogen `high` scores 51)      |
| BenchLM Coding (BenchAlign v6.0)       | 78.1 (#14/181)    | **86.4** (#6/181)  | BenchLM Dec 2, 2026 supported lane                   |
| BenchLM Knowledge (BenchAlign v6.0)    | **77.4** (#9/158) | 63.1 (#34/158)     | BenchLM Dec 2, 2026 supported lane                   |
| BenchLM Agentic (BenchAlign v6.0)      | 81.6 (#12/183)    | **81.8** (#10/183) | BenchLM Dec 2, 2026 supported lane (tie)             |

*Compiled from Google's Hydrogen launch card via DataCamp and kie.ai, Artificial Analysis index results, and BenchLM's December 2, 2026 BenchAlign v6.0 comparison<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-3">\[3]</a></sup>.*

Three methodological caveats keep a **Gemini 4 Hydrogen vs Claude Sonnet 5.5** benchmark review grounded. First, Google's launch card never states which of Sonnet 5.5's 5 effort levels it tested (`high` is the API default)<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-4">\[4]</a></sup>. Second, Hydrogen's widest leads carry real scrutiny: Epoch flagged serious grading weaknesses in the public Agents' Last Exam v1.1 tasks it audited, Vending-Bench 2 reports a simulated bank balance rather than a pass rate, and SWE-sweep scores (13.5% vs 3.1%) stay low in absolute terms for both models<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. Third, BenchLM's December 2, 2026 synthesis across 16 shared results places Hydrogen at 79.0/100 (rank #11, 90% interval 74.8 to 83.2) versus Sonnet 5.5 at 77.7/100 (rank #13, 90% interval 73.6 to 81.7), meaning overlapping intervals rule out a universal winner even while category splits stay sharp: Sonnet 5.5 leads Coding by 8.3 points, Hydrogen leads Knowledge by 14.3 points and FrontierMath v2 Tier 4 by 7.3 points (87.805% vs 80.488%), FrontierMath v2 Tiers 1 to 3 sits within 0.7 points (88.772% vs 88.070%), and Agentic is effectively tied<sup><a href="#ref-3">\[3]</a></sup>.

Public speed evidence is asymmetric. Artificial Analysis clocks Hydrogen at 188 output tokens per second (1.3 minutes per index task at `low`, 13.7 minutes at `xhigh`), Agent Arena records Hydrogen (`high`) at a 7.3-second typical step time, and Google cites 2.5x higher speed and over 5x fewer fabricated claims versus Gemini 3.8 Flash<sup><a href="#ref-2">\[2]</a></sup>. No verified head-to-head throughput figure for Sonnet 5.5 appears in the reviewed benchmarks, leaving the circulating 2.4x speed ratio unconfirmed<sup><a href="#ref-2">\[2]</a></sup>.

## Live reAPI pricing versus direct vendor rate cards

On direct vendor rate cards, **Gemini 4 Hydrogen vs Claude Sonnet 5.5** reduces to a uniform 25% discount for Hydrogen across input, output, cached reads, and Batch<sup><a href="#ref-1">\[1]</a></sup>. Google prices Hydrogen flat across its 1,048,576-token window at $1.50 input, $7.50 output (including thinking), $0.075 cached read, and $0.75 / $3.75 Batch, alongside a rate-limited free tier in Google AI Studio<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. Anthropic lists Sonnet 5.5 across its 1M window at $2.00 input, $10.00 output, $0.10 cached read, $2.50 (5-minute) or $4.00 (1-hour) cache write, and $1.00 / $5.00 Batch<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-4">\[4]</a></sup>. At direct rates, a balanced workload (1M input / 250K output) totals $3.38 on Hydrogen versus $4.50 on Sonnet 5.5, and a generation-heavy workload (1M / 4M) totals $31.50 versus $42.00<sup><a href="#ref-1">\[1]</a></sup>. After December 1, 2026 doubled Carbon and Argon pricing, Hydrogen's discount inside Google's own lineup also widened from 25% to 75% (detailed in our [Gemini 4 Neon, Carbon, Hydrogen, and Argon breakdown](/resources/gemini-4-neon-vs-carbon-hydrogen-argon))<sup><a href="#ref-2">\[2]</a></sup>.

Live reAPI quotes fetched December 3, 2026 (1 credit = $0.001, settled on actual token usage with a 300-second refresh) alter that ordering<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>.

| Model and billing route                    | Wire model ID                   | Input / 1M | Output / 1M | Cache read / 1M |        Cache write / 1M |
| ------------------------------------------ | ------------------------------- | ---------: | ----------: | --------------: | ----------------------: |
| Gemini 4 Hydrogen (Google direct)          | `gemini-4-hydrogen`             |      $1.50 |       $7.50 |          $0.075 |          N/A (implicit) |
| Gemini 4 Hydrogen (reAPI `gemini` default) | `gemini-4-hydrogen`             |      $1.50 |       $7.50 |          $0.075 |          N/A (implicit) |
| Gemini 4 Hydrogen (reAPI `gemini-0.55`)    | `gemini-4-hydrogen:gemini-0.55` |     $0.825 |      $4.125 |        $0.04125 |          N/A (implicit) |
| Gemini 4 Hydrogen (reAPI `gemini-0.4`)     | `gemini-4-hydrogen:gemini-0.4`  |      $0.60 |       $3.00 |           $0.03 |          N/A (implicit) |
| Gemini 4 Hydrogen (reAPI `gemini-0.15`)    | `gemini-4-hydrogen:gemini-0.15` |     $0.225 |      $1.125 |        $0.01125 |          N/A (implicit) |
| Claude Sonnet 5.5 (Anthropic direct)       | `claude-sonnet-5-5`             |      $2.00 |      $10.00 |           $0.10 | $2.50 (5m) / $4.00 (1h) |
| Claude Sonnet 5.5 (reAPI `claude` default) | `claude-sonnet-5-5`             |      $1.40 |       $7.00 |           $0.07 |                   $1.75 |
| Claude Sonnet 5.5 (reAPI `claude-0.5`)     | `claude-sonnet-5-5:claude-0.5`  |      $1.00 |       $5.00 |           $0.05 |                   $1.25 |
| Claude Opus 5.5 (reAPI `claude` default)   | `claude-opus-5-5`               |      $2.80 |      $14.00 |           $0.14 |                   $3.50 |
| Claude Opus 5.5 (reAPI `claude-0.5`)       | `claude-opus-5-5:claude-0.5`    |      $2.00 |      $10.00 |           $0.10 |                   $2.50 |

*Direct rates via DataCamp and Claude Platform Docs; live reAPI group rates fetched December 3, 2026 at 10:05 to 10:06 UTC<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-4">\[4]</a></sup><sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup>.*

On reAPI's default groups, `claude-sonnet-5-5` ($1.40 / $7.00 / $0.07 cache read) undercuts default `gemini-4-hydrogen` ($1.50 / $7.50 / $0.075) by 6.7% because the default `claude` group applies a 30% discount off official Anthropic pricing<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>. Choosing discounted reAPI groups flips the ranking back hard: `gemini-4-hydrogen:gemini-0.4` ($0.60 / $3.00) runs 40% below `claude-sonnet-5-5:claude-0.5` ($1.00 / $5.00), and `gemini-4-hydrogen:gemini-0.15` ($0.225 / $1.125) cuts unit rates 77.5% below `claude-0.5`<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>.

Sticker rates still miss thinking-token spend. Artificial Analysis's Intelligence Index v5.0.2 weights input, cache hit, cache write, reasoning, and answer tokens across 9 evaluations (including AA-Briefcase v1.1, AutomationBench-AA, Terminal-Bench 4.1, FrontierCode-AA 2.0, AA-Omniscience v1.1, GDP.pdf, HLE-Diamond, CritPt v2 Hard Subset, and Terminal-Bench-Science 0.1)<sup><a href="#ref-5">\[5]</a></sup>. Under that full-task meter, Hydrogen averages $1.87 per task at `high` and $3.16 at `xhigh`, about 32% of Sonnet 5.5's top-effort task cost (versus Claude Opus 5.5 at $3.46 on `high` and $10.04 on `max`)<sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-5">\[5]</a></sup>. Turning a 25% direct token discount into a 68% task-level reduction shows how steeply Sonnet 5.5's output volume expands at `max` effort<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. As r/GeminiAI developers also point out, flat-rate consumer account subscriptions change individual cost math relative to metered API billing<sup><a href="#ref-6">\[6]</a></sup>.

## Prompt caching economics under stable and churning prefixes

Prompt caching differentiates **Gemini 4 Hydrogen vs Claude Sonnet 5.5** far more than their matching 95% cache-read discount suggests<sup><a href="#ref-1">\[1]</a></sup>. Hydrogen supports implicit caching only: shared prefixes of at least 4,096 tokens automatically qualify for $0.075 per 1M reads (direct and reAPI default `gemini`) with zero cache-write surcharge, though without explicit TTL locks you must inspect usage fields to verify hit rates<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-7">\[7]</a></sup>. Sonnet 5.5 uses explicit caching, charging a 1.25x write rate for 5-minute TTLs ($2.50 direct, $1.75 reAPI `claude`, $1.25 `claude-0.5`) or 2x for 1-hour TTLs ($4.00 direct) to guarantee deterministic pinning and $0.10 direct ($0.07 `claude`, $0.05 `claude-0.5`) reads<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-8">\[8]</a></sup>.

| Agent workload shape                                                               | Hydrogen (Direct / `gemini`) | Sonnet 5.5 (Direct 5m) | Sonnet 5.5 (reAPI `claude`) | Hydrogen (`gemini-0.4` / `0.15`) | Sonnet 5.5 (`claude-0.5`) |
| ---------------------------------------------------------------------------------- | ---------------------------: | ---------------------: | --------------------------: | -------------------------------: | ------------------------: |
| Stable loop: 100K prefix, 1,000 hits, 5K fresh in, 1K out/turn                     |                       $22.65 |                 $30.25 |                  **$21.18** |            **$9.06** / **$3.40** |                    $15.13 |
| High-churn batch: 100 docs x 100K prefix, 2 follow-ups each, 1M fresh in, 500K out |                   **$21.75** |                 $34.00 |                      $23.80 |            **$8.70** / **$3.26** |                    $17.00 |

*Derived from published direct rates (DataCamp) and December 3, 2026 live reAPI group rates, assuming cache hits on repeated prefix reads; implicit hits on Hydrogen depend on prefix warmth<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>.*

On reAPI's default groups, prefix churn flips the winner. In a stable 1,000-turn coding session reusing one 100K-token repository prefix, Sonnet 5.5's single write costs $0.175 on `claude`, letting its $0.07 read, $1.40 fresh-input, and $7.00 output rates land at $21.18 versus $22.65 for default-group Hydrogen<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>. Switch to an extraction pipeline ingesting 100 distinct 100K-token files with only 2 follow-up queries each, and Sonnet 5.5's 10M cache-write tokens alone cost $25.00 direct or $17.50 on reAPI `claude`, lifting total spend to $34.00 direct and $23.80 on reAPI `claude` versus $21.75 for Hydrogen (assuming implicit hits on immediate follow-ups)<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>. Explicit caching rewards immutable repo harnesses; implicit caching avoids write penalties on rotating document queues.

## Gemini 4 Hydrogen and Claude Sonnet 5.5 tool calls and thinking controls

Reliable tool loops require respecting five wire-level differences in **Gemini 4 Hydrogen vs Claude Sonnet 5.5**.

First, neither model allows disabling reasoning completely. Hydrogen requires one of 4 thinking levels (`LOW`, `MEDIUM`, `HIGH` default, `XHIGH`) billed as output<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. On Claude Sonnet 5.5, Anthropic's Models API (`GET /v1/models`) reports `thinking.types.disabled.supported` as `false` (sending disabled thinking returns HTTP 400) while reporting `thinking.types.between_tools.supported` as `true`<sup><a href="#ref-4">\[4]</a></sup>. Enabling `between_tools` skips upfront deliberation before a deterministic first lookup and shifts thinking until tool results arrive<sup><a href="#ref-4">\[4]</a></sup>. Both models also support parallel file reads and search batching when exploring repositories<sup><a href="#ref-1">\[1]</a></sup>.

Second, Anthropic exposes structured capability discovery via `GET /v1/models`, separating `capabilities.server_tools` (web search and code execution availability) from top-level `code_execution` (whether server-executed code can call other request tools programmatically)<sup><a href="#ref-4">\[4]</a></sup>.

Third, both models break if a harness flattens multi-turn tool state into plain text. On reAPI's native GenerateContent endpoint (`POST https://api.reapi.ai/v1beta/models/gemini-4-hydrogen:generateContent`, streaming via `:streamGenerateContent?alt=sse` with `x-goog-api-key`), SSE emits JSON frames ending at EOF with no OpenAI `[DONE]` sentinel, and clients must preserve full `content.parts`, including `thoughtSignature` alongside `functionCall` and `functionResponse` parts<sup><a href="#ref-7">\[7]</a></sup>. On reAPI's Claude endpoint (`POST https://api.reapi.ai/v1/messages` with `x-api-key`, or OpenAI-compatible `/v1/chat/completions` with Bearer auth), callers must preserve signed thinking and tool blocks across turns; compatibility mode retains them via `message.anthropic_content` and `anthropic_event`<sup><a href="#ref-8">\[8]</a></sup>.

Fourth, long-output mechanics diverge. Sonnet 5.5 produces up to 128K output tokens per synchronous request (300K on Anthropic Batch beta) inside its 1M context<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-4">\[4]</a></sup>. Hydrogen shares one unified 1,048,576-token pool across input, thinking, and output, with 65,536 tokens per hop on Google direct and Long Decode covering the remainder<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. On reAPI, `gemini-4-hydrogen` documents 32,768-token JSON and 65,536-token streaming caps per request; a thinking-only hop can return `continuationToken` with `CONTINUATION` or `MAX_TOKENS` and empty text<sup><a href="#ref-7">\[7]</a></sup>. Because reAPI performs zero automatic retries or continuations, clients explicitly resend the original `contents` plus the opaque token (raising `maxOutputTokens` after `MAX_TOKENS`), and JavaScript Google SDK callers should set `automaticContinuation: false` with 1 retry attempt (detailed in our [Gemini 4 Hydrogen API tutorial](/resources/gemini-4-hydrogen-api-tutorial))<sup><a href="#ref-7">\[7]</a></sup>.

Fifth, modalities and lifecycles set hard infrastructure boundaries. Hydrogen natively ingests text, images, video, audio, PDFs, `.docx`, `.pptx`, `.xlsx`, and OpenDocument files, removing media preprocessing stages<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. Sonnet 5.5 accepts text and images natively, but brings multi-cloud availability across Amazon Bedrock, Microsoft Foundry, Google Cloud, and AWS plus a June 2026 knowledge cutoff and September 28, 2027 earliest retirement date, versus Hydrogen's short-term GA status with a 45-day minimum retirement notice<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-4">\[4]</a></sup>.

## Routing between Gemini 4 Hydrogen and Claude Sonnet 5.5

Splitting traffic across **Gemini 4 Hydrogen vs Claude Sonnet 5.5** aligns each tier with its verified strengths and billing profile.

* **Extraction, classification, and multimodal intake on Gemini 4 Hydrogen:** Route PDFs, Office files, audio or video summaries, chart extraction, and SaaS workflow triage to `gemini-4-hydrogen` at `LOW` or `MEDIUM` thinking (`HIGH` for dense synthesis)<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup>. This captures Hydrogen's lead on BenchLM Knowledge (77.4 vs 63.1), AutomationBench-AA (76.1% vs 71.8%), and Chartography (66.6% vs 61.6%) without cache-write penalties while enabling discounted reAPI groups like `gemini-0.4` ($0.60 / $3.00) or `gemini-0.15` ($0.225 / $1.125)<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-3">\[3]</a></sup><sup><a href="#ref-7">\[7]</a></sup>.
* **Repository edits, terminal debugging, and GUI loops on Claude Sonnet 5.5:** Reserve `claude-sonnet-5-5` for shell-bound coding agents, test-driven patches, scientific terminal jobs, and desktop automation where it leads Terminal-Bench 4.1 (63.9% vs 57.0%), Terminal-Bench 4.0 (64% vs 54%), BenchLM Coding (86.4 vs 78.1), and OSWorld-2.1 (83.9% vs 77.6%)<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-3">\[3]</a></sup>. Pin warm repo prefixes with explicit caching and use `thinking: { type: "between_tools" }` for deterministic first-step lookups<sup><a href="#ref-4">\[4]</a></sup><sup><a href="#ref-8">\[8]</a></sup>.
* **Escalation ceiling on Claude Opus 5.5 or Gemini 4 Carbon:** After repeated test failures, avoid pushing Sonnet 5.5 to `max` effort; escalate over `/v1/messages` to [Claude Opus 5.5](/models/claude-opus-5-5) ($2.80 / $14.00 default or $2.00 / $10.00 on `claude-0.5`; see [Claude Sonnet 5.5 vs Claude Opus 5.5](/resources/claude-sonnet-5-5-vs-claude-opus-5-5) for escalation thresholds)<sup><a href="#ref-4">\[4]</a></sup><sup><a href="#ref-9">\[9]</a></sup>. Google Antigravity teams can mirror this split using Orchestrator across Carbon and Hydrogen, which approached Carbon's Terminal-Bench 4.0 score with 24% less quota and 19% faster completion<sup><a href="#ref-2">\[2]</a></sup>.

Using one key from [API Keys](/settings/apikeys), a single router dispatches extraction steps to Hydrogen's native endpoint and repository edits to Claude's native Messages endpoint without hidden retries<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup><sup><a href="#ref-9">\[9]</a></sup>:

```ts
type AgentTask =
  | { kind: 'extract' | 'classify'; prompt: string; group?: string; highDepth?: boolean }
  | { kind: 'repo_edit' | 'terminal'; prompt: string; priorFailures?: number; betweenTools?: boolean };

const REAPI_KEY = process.env.REAPI_API_KEY!;

export async function dispatchAgentStep(task: AgentTask) {
  if (task.kind === 'extract' || task.kind === 'classify') {
    const modelId = task.group ? `gemini-4-hydrogen:${task.group}` : 'gemini-4-hydrogen';
    const response = await fetch(
      `https://api.reapi.ai/v1beta/models/${modelId}:generateContent`,
      {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'x-goog-api-key': REAPI_KEY,
        },
        body: JSON.stringify({
          contents: [{ role: 'user', parts: [{ text: task.prompt }] }],
          generationConfig: {
            maxOutputTokens: 8192,
            thinkingConfig: { thinkingLevel: task.highDepth ? 'HIGH' : 'LOW' },
          },
        }),
      },
    );
    if (!response.ok) throw new Error(`Hydrogen HTTP ${response.status}: ${await response.text()}`);
    // Check candidate.finishReason and candidate.continuationToken explicitly before continuing.
    return response.json();
  }

  const escalateToOpus = (task.priorFailures ?? 0) >= 2;
  const response = await fetch('https://api.reapi.ai/v1/messages', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': REAPI_KEY,
    },
    body: JSON.stringify({
      model: escalateToOpus ? 'claude-opus-5-5' : 'claude-sonnet-5-5',
      max_tokens: 8192,
      thinking: !escalateToOpus && task.betweenTools
        ? { type: 'between_tools' }
        : { type: 'adaptive' },
      messages: [{ role: 'user', content: task.prompt }],
    }),
  });
  if (!response.ok) throw new Error(`Claude HTTP ${response.status}: ${await response.text()}`);
  return response.json();
}
```

When escalating across models, never replay Hydrogen's `thoughtSignature` parts into Claude or Sonnet 5.5's signed thinking blocks into Opus 5.5<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>. Summarize the task spec, attempted patch, and exact test trace into a fresh user turn instead.

## Validating your split on production traces

Before finalizing a traffic ratio for **Gemini 4 Hydrogen vs Claude Sonnet 5.5**, replay representative historical tickets separated into document/extraction jobs and shell/repository jobs. Record every billed component (fresh input, cached reads, explicit cache writes, thinking-inclusive output, and Hydrogen continuation hops) alongside pass rates against your automated test suite<sup><a href="#ref-1">\[1]</a></sup><sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>. Weigh lifecycle policy alongside unit economics, balancing Hydrogen's 45-day minimum retirement notice against Sonnet 5.5's September 28, 2027 earliest retirement date<sup><a href="#ref-2">\[2]</a></sup><sup><a href="#ref-4">\[4]</a></sup>. Verify current 300-second group quotes on the [Gemini 4 Hydrogen](/models/gemini-4-hydrogen) and [Claude Sonnet 5.5](/models/claude-sonnet-5-5) model pages, create one key in [API Keys](/settings/apikeys), and lock your routing split to measured cost per accepted task<sup><a href="#ref-7">\[7]</a></sup><sup><a href="#ref-8">\[8]</a></sup>.

## References

1. <span id="ref-1" />Tom Farnschläder, DataCamp. *Gemini 4 Hydrogen vs Claude Sonnet 5.5: Benchmarks, Pricing, and a Hands-On Test.* Checked December 3, 2026 from [datacamp.com/blog/gemini-4-hydrogen-vs-claude-sonnet-5-5](https://www.datacamp.com/blog/gemini-4-hydrogen-vs-claude-sonnet-5-5)
2. <span id="ref-2" />Maya Chen, kie.ai. *Gemini 4 Hydrogen vs Claude Sonnet 5.5: 7 of 10 Benchmarks.* Checked December 3, 2026 from [kie.ai/blog/gemini-4-hydrogen-vs-claude-sonnet-5-5](https://kie.ai/blog/gemini-4-hydrogen-vs-claude-sonnet-5-5)
3. <span id="ref-3" />BenchLM. *Claude Sonnet 5.5 vs Gemini 4 Hydrogen: Benchmarks & Cost.* Checked December 3, 2026 from [benchlm.ai/compare/claude-sonnet-5-5-vs-gemini-4-hydrogen](https://benchlm.ai/compare/claude-sonnet-5-5-vs-gemini-4-hydrogen)
4. <span id="ref-4" />Anthropic. *Models overview - Claude Platform Docs.* Checked December 3, 2026 from [platform.claude.com/docs/en/models/overview](https://platform.claude.com/docs/en/models/overview)
5. <span id="ref-5" />Artificial Analysis. *Gemini 4 Neon vs Claude Opus 5.5: Release Comparison and Intelligence Index v5.0.2 Methodology.* Checked December 3, 2026 from [artificialanalysis.ai/models/comparisons/gemini-4-neon-vs-claude-opus-5-5](https://artificialanalysis.ai/models/comparisons/gemini-4-neon-vs-claude-opus-5-5)
6. <span id="ref-6" />r/GeminiAI Community Discussion. *Gemini 4 hydrogen: better than Claude Sonnet and GPT?* Checked December 3, 2026 from [reddit.com/r/GeminiAI/comments/1xwbrj9/gemini\_4\_hydrogen\_better\_than\_claude\_sonnet\_and](https://www.reddit.com/r/GeminiAI/comments/1xwbrj9/gemini_4_hydrogen_better_than_claude_sonnet_and/)
7. <span id="ref-7" />reAPI. *Gemini 4 Hydrogen API and Live Group Pricing.* Checked December 3, 2026 from [reapi.ai/models/gemini-4-hydrogen](https://reapi.ai/models/gemini-4-hydrogen)
8. <span id="ref-8" />reAPI. *Claude Sonnet 5.5 API and Live Group Pricing.* Checked December 3, 2026 from [reapi.ai/models/claude-sonnet-5-5](https://reapi.ai/models/claude-sonnet-5-5)
9. <span id="ref-9" />reAPI. *Claude Opus 5.5 API and Live Group Pricing.* Checked December 3, 2026 from [reapi.ai/models/claude-opus-5-5](https://reapi.ai/models/claude-opus-5-5)
