Skip to content

Gemini 4 Hydrogen · Coding

Gemini 4 Hydrogen for coding: our test runs

Gemini 4 Hydrogen ran our 5 coding prompts in llmwise, through the same pipeline your messages take. Here's every reply as it came, whether it passed, what it cost and what it counts as on Pro, next to the other models.

Based on 5 of our test runs on , through OpenRouter with the app's own prompt and settings.

Short answer

In our test runs on November 17, 2026, Gemini 4 Hydrogen passed 5 of 5 of our coding prompts (both hard ones): tied 1st of 27 models. Each reply counted as 1 message on Pro, where it has 125 a month, and cost $0.0061 to run on average.

Prompt by prompt

Each of the 5 coding prompts, and how Gemini 4 Hydrogen's reply did.

Gemini 4 Hydrogen on each coding prompt
PromptResultCostTime
Turn a title into a URL slugEverydayPassed: All 7 tests passed.$0.00294.9 s
Parse a duration like “1h 30m”EverydayPassed: All 10 tests passed.$0.00536.9 s
Merge overlapping intervalsEverydayPassed: All 7 tests passed.$0.00324.3 s
Evaluate an arithmetic expression, no evalHardPassed: All 15 tests passed.$0.010913.4 s
Parse CSV with quoted fieldsHardPassed: All 8 tests passed.$0.008110.2 s

Every coding reply from Gemini 4 Hydrogen

  1. Turn a title into a URL slug

    An everyday prompt: “Turn a title into a URL slug”, in full.

    Passed: All 7 tests passed.

    ```javascript
    function slugify(title) {
      return String(title)
        .normalize('NFKD')
        .replace(/[\u0300-\u036f]/g, '')
        .toLowerCase()
        .replace(/[^a-z0-9]+/g, '-')
        .replace(/^-+|-+$/g, '');
    }
    ```

    736 tokens in, 639 out (549 of them reasoning) · 4.9 s · $0.0029 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·

  2. Parse a duration like “1h 30m”

    An everyday prompt: “Parse a duration like “1h 30m””, in full.

    Passed: All 10 tests passed.

    ```javascript
    function parseDuration(text) {
      if (typeof text !== 'string') return null;
    
      const trimmed = text.trim();
      if (!trimmed) return null;
    
      const match = /^(?:(\d+)h)?(?:\s*(\d+)m)?(?:\s*(\d+)s)?$/.exec(trimmed);
      if (!match) return null;
    
      const hours = match[1] ? Number(match[1]) : 0;
      const minutes = match[2] ? Number(match[2]) : 0;
      const seconds = match[3] ? Number(match[3]) : 0;
    
      return hours * 3600 + minutes * 60 + seconds;
    }
    ```

    720 tokens in, 1,281 out (1,111 of them reasoning) · 6.9 s · $0.0053 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·

  3. Merge overlapping intervals

    An everyday prompt: “Merge overlapping intervals”, in full.

    Passed: All 7 tests passed.

    ```javascript
    function mergeIntervals(intervals) {
      if (intervals.length === 0) return [];
    
      const sorted = [...intervals].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
      const merged = [[sorted[0][0], sorted[0][1]]];
    
      for (let i = 1; i < sorted.length; i++) {
        const [start, end] = sorted[i];
        const last = merged[merged.length - 1];
    
        if (start <= last[1]) {
          last[1] = Math.max(last[1], end);
        } else {
          merged.push([start, end]);
        }
      }
    
      return merged;
    }
    ```

    698 tokens in, 716 out (532 of them reasoning) · 4.3 s · $0.0032 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·

  4. Evaluate an arithmetic expression, no eval

    A hard prompt: “Evaluate an arithmetic expression, no eval”, in full.

    Passed: All 15 tests passed.

    ```javascript
    function evaluate(expression) {
      if (typeof expression !== "string") {
        throw new Error("Expression must be a string");
      }
    
      let pos = 0;
      const len = expression.length;
    
      function skipSpaces() {
        while (pos < len && /\s/.test(expression[pos])) {
          pos++;
        }
      }
    
      function peek() {
        skipSpaces();
        return pos < len ? expression[pos] : null;
      }
    
      function parseExpression() {
        let value = parseTerm();
        while (true) {
          const op = peek();
          if (op === "+" || op === "-") {
            pos++;
            const right = parseTerm();
            value = op === "+" ? value + right : value - right;
          } else {
            break;
          }
        }
        return value;
      }
    
      function parseTerm() {
        let value = parseUnary();
        while (true) {
          const op = peek();
          if (op === "*" || op === "/") {
            pos++;
            const right = parseUnary();
            value = op === "*" ? value * right : value / right;
          } else {
            break;
          }
        }
        return value;
      }
    
      function parseUnary() {
        if (peek() === "-") {
          pos++;
          return -parseUnary();
        }
        return parsePower();
      }
    
      function parsePower() {
        const base = parsePrimary();
        if (peek() === "^") {
          pos++;
          const exponent = parseUnary();
          return base ** exponent;
        }
        return base;
      }
    
      function parsePrimary() {
        const ch = peek();
        if (ch === null) {
          throw new Error("Unexpected end of expression");
        }
    
        if (ch === "(") {
          pos++;
          const value = parseExpression();
          if (peek() !== ")") {
            throw new Error("Expected closing parenthesis");
          }
          pos++;
          return value;
        }
    
        const slice = expression.slice(pos);
        const match = /^(?:\d+(?:\.\d+)?|\.\d+)/.exec(slice);
        if (match) {
          pos += match[0].length;
          return Number(match[0]);
        }
    
        throw new Error(`Unexpected character '${ch}' at position ${pos}`);
      }
    
      const result = parseExpression();
      if (peek() !== null) {
        throw new Error(`Unexpected character '${peek()}' at position ${pos}`);
      }
      return result;
    }
    ```

    809 tokens in, 2,733 out (2,116 of them reasoning) · 13.4 s · $0.0109 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·

  5. Parse CSV with quoted fields

    A hard prompt: “Parse CSV with quoted fields”, in full.

    Passed: All 8 tests passed.

    ```javascript
    function parseCsv(text) {
      if (text.length === 0) {
        return [];
      }
    
      const rows = [];
      let row = [];
      let field = '';
      let inQuotes = false;
      let atFieldStart = true;
    
      for (let i = 0; i < text.length; i++) {
        const ch = text[i];
    
        if (inQuotes) {
          if (ch === '"') {
            if (text[i + 1] === '"') {
              field += '"';
              i++;
            } else {
              inQuotes = false;
            }
          } else {
            field += ch;
          }
        } else if (atFieldStart && ch === '"') {
          inQuotes = true;
          atFieldStart = false;
        } else if (ch === ',') {
          row.push(field);
          field = '';
          atFieldStart = true;
        } else if (ch === '\r' && text[i + 1] === '\n') {
          row.push(field);
          rows.push(row);
          row = [];
          field = '';
          atFieldStart = true;
          i++;
        } else if (ch === '\n') {
          row.push(field);
          rows.push(row);
          row = [];
          field = '';
          atFieldStart = true;
        } else {
          field += ch;
          atFieldStart = false;
        }
      }
    
      if (row.length > 0 || !atFieldStart) {
        row.push(field);
        rows.push(row);
      }
    
      return rows;
    }
    ```

    736 tokens in, 2,018 out (1,612 of them reasoning) · 10.2 s · $0.0081 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·

How it compares on coding

Gemini 4 Hydrogen beside the job's picks among every model. 25 models share the hard-problems pick, Gemini 4 Hydrogen among them.

Gemini 4 Hydrogen beside other models on coding
ModelPassedOn ProCost per reply
Gemini 3.8 FlashOur pick: hard problems (shared), best value5 of 5250 a month on Pro$0.0011
GPT-6 LunaOur pick: hard problems (shared), everyday5 of 560 a day on Pro$0.0001
Gemini 4 HydrogenOur pick: hard problems (shared)5 of 5125 a month on Pro$0.0061
On Pro: Pro's count on each model. Cost: what OpenRouter charged us per reply, on average.

Every limit is published. Paid plans also have a monthly fair-use limit on AI cost: Plus $3.75, Pro $7.50, Max $20, Ultra $42, Studio $85. Using every message on your plan at typical sizes stays under it; very large messages and heavy research use it faster. Every limit, explained.

Gemini 4 Hydrogen next to each model on coding

Gemini 4 Hydrogen against each model on the same 5 coding prompts. One run each, through OpenRouter: a wait depends on the provider and the load that day, so a lead under 10% counts as close.

  • Against Claude Fable 5.2: Gemini 4 Hydrogen answered 1.7× later (6.9 s to 4.1 s), cost 4.1× less, and passed 5 of 5 to its 5.

  • Against Claude Fable 5.1: Gemini 4 Hydrogen answered 1.5× later (6.9 s to 4.5 s), cost 5.5× less, and passed 5 of 5 to its 5.

  • Against Claude Opus 5.5: Gemini 4 Hydrogen answered 1.2× later (6.9 s to 5.7 s), cost 2.9× less, and passed 5 of 5 to its 5.

  • Against Claude Sonnet 5.5: Gemini 4 Hydrogen answered 2.8× later (6.9 s to 2.5 s), cost 1.2× more, and passed 5 of 5 to its 5.

  • Against Claude Sonnet 5: Gemini 4 Hydrogen answered 2.6× later (6.9 s to 2.6 s), cost 1.7× less, and passed 5 of 5 to its 5.

  • Against Claude Haiku 5.5: Gemini 4 Hydrogen answered 5.3× later (6.9 s to 1.3 s), cost 15.4× more, and passed 5 of 5 to its 5.

  • Against Claude Haiku 4.5: Gemini 4 Hydrogen answered 3.1× later (6.9 s to 2.2 s), cost 2.0× more, and passed 5 of 5 to its 3. Only Gemini 4 Hydrogen passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.

  • Against GPT-6.2 Astra: Gemini 4 Hydrogen answered 1.9× later (6.9 s to 3.5 s), cost 2.2× less, and passed 5 of 5 to its 5.

  • Against GPT-6 Astra: Gemini 4 Hydrogen answered 1.2× later (6.9 s to 5.8 s), cost 1.8× less, and passed 5 of 5 to its 5.

  • Against GPT-6.2 Sol: Gemini 4 Hydrogen answered 1.8× later (6.9 s to 3.8 s), cost 1.6× more, and passed 5 of 5 to its 5.

  • Against GPT-6.1 Sol: Gemini 4 Hydrogen answered 1.1× sooner (6.9 s to 7.9 s), cost 1.5× more, and passed 5 of 5 to its 5.

  • Against GPT-6 Sol: Gemini 4 Hydrogen answered 1.4× later (6.9 s to 4.8 s), cost 2.2× more, and passed 5 of 5 to its 5.

  • Against GPT-6.1 Terra: Gemini 4 Hydrogen answered within 10% of its time (6.9 s to 6.8 s), cost 4.6× more, and passed 5 of 5 to its 5.

  • Against GPT-6 Luna: Gemini 4 Hydrogen answered within 10% of its time (6.9 s to 7.3 s), cost 43.2× more, and passed 5 of 5 to its 5.

  • Against Gemini 4 Carbon: Gemini 4 Hydrogen answered 5.3× sooner (6.9 s to 36.4 s), cost 2.3× less, and passed 5 of 5 to its 5.

  • Against Gemini 4 Argon: Gemini 4 Hydrogen answered 1.1× sooner (6.9 s to 7.6 s), cost 2.4× more, and passed 5 of 5 to its 5.

  • Against Gemini 3.1 Pro (preview): Gemini 4 Hydrogen answered 2.3× sooner (6.9 s to 15.7 s), cost 2.1× less, and passed 5 of 5 to its 5.

  • Against Gemini 3.8 Flash: Gemini 4 Hydrogen answered 2.1× later (6.9 s to 3.3 s), cost 5.5× more, and passed 5 of 5 to its 5.

  • Against DeepSeek V4.1 Flash: Gemini 4 Hydrogen answered 2.0× later (6.9 s to 3.5 s), cost 4.2× more, and passed 5 of 5 to its 5.

  • Against DeepSeek V4 Pro: Gemini 4 Hydrogen answered 1.6× sooner (6.9 s to 11.3 s), cost 1.9× less, and passed 5 of 5 to its 5.

  • Against Grok 4.7: Gemini 4 Hydrogen answered 4.5× sooner (6.9 s to 31.2 s), cost 4.4× less, and passed 5 of 5 to its 5.

  • Against Kimi K3.1 Pro: Gemini 4 Hydrogen answered 1.1× sooner (6.9 s to 7.8 s), cost 1.2× less, and passed 5 of 5 to its 5.

  • Against Kimi K3: Gemini 4 Hydrogen answered 1.1× later (6.9 s to 6.2 s), cost 1.2× less, and passed 5 of 5 to its 5.

  • Against GLM 5.3: Gemini 4 Hydrogen answered 4.6× later (6.9 s to 1.5 s), cost 2.7× more, and passed 5 of 5 to its 3. Only Gemini 4 Hydrogen passed Parse a duration like “1h 30m”; Parse CSV with quoted fields.

  • Against GLM 5.3 Flash: Gemini 4 Hydrogen answered 6.4× later (6.9 s to 1.1 s), cost 23.4× more, and passed 5 of 5 to its 5.

  • Against Mistral Large 4: Gemini 4 Hydrogen answered 6.8× sooner (6.9 s to 46.9 s), cost 1.2× less, and passed 5 of 5 to its 5.

How these runs were done

Tests. Automatic. The function runs against the prompt's tests in a separate Node.js process with a time limit and no file, network or child-process access; it passes when every test passes.

How the runs were done, and every coding prompt.

Gemini 4 Hydrogen, and coding, elsewhere

Questions

Is Gemini 4 Hydrogen good for coding?

In our test runs it passed 5 of 5 coding prompts, tied 1st of the 27 models in llmwise. Every reply is on this page, so you can judge them yourself.

How many of my messages does a coding reply from Gemini 4 Hydrogen use?

1 message each on Pro, where it has 125 a month on Pro. The price of a message is fixed and shown before you send it, however long the reply.

How were these runs done?

The same way for every model: each prompt sent through llmwise's own pipeline, each reply checked the same way. The methods page has every prompt and how each is scored.

Claude, GPT, Gemini, DeepSeek, Grok, Kimi, GLM, and Mistral, in one chat.

See what a message costs before you send it. Every plan is month to month: cancel in two clicks. Sign in with an email link, no password.