---
title: "Gemini 4 Hydrogen on Pydantic AI Combined"
description: "The mean of the six Pydantic AI benchmarks; code mode is compared over the four that have a code mode run. Tool calling 84.3%, code mode 85.6% over four benchmarks; rank 5 of 44."
canonical: https://pydantic.dev/models/list/gemini-4-hydrogen/pydantic_ai/
---

# Gemini 4 Hydrogen on Pydantic AI Combined

> The mean of the six Pydantic AI benchmarks; code mode is compared over the four that have a code mode run. Tool calling 84.3%, code mode 85.6% over four benchmarks; rank 5 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/gemini-4-hydrogen/pydantic_ai/. Index for agents: https://pydantic.dev/models/llms.txt

**Agents: use the API for model information.** It answers a question in one request, where the pages need several.

- Choose a model for an agent: `POST https://pydantic.dev/models/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://pydantic.dev/models/select.md
- Search models by name: `GET https://pydantic.dev/models/api/search?query=<text>`
- List, filter and sort models: `GET https://pydantic.dev/models/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://pydantic.dev/models/api/models/<slug>`
- Any other question about the models: `GET https://pydantic.dev/models/api/ask?query=<question>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of all but the single model. An `OPTIONS` request to any endpoint returns its schema. The same five are tools of the MCP server at `https://pydantic.dev/models/mcp`. More: https://pydantic.dev/models/usage.md

About the benchmark: https://pydantic.dev/models/benchmarks/pydantic_ai.md. The model's page: https://pydantic.dev/models/list/gemini-4-hydrogen.md

## Scores

Cost is the mean cost of one task. Code mode is compared with tool calling over the four benchmarks run in both modes (https://pydantic.dev/models/codemode.md).

|                                      | Tool calling | Code mode |
| ------------------------------------ | ------------ | --------- |
| Score, all six benchmarks            | 84.3%        | –         |
| Score, the four with a code mode run | 84%          | 85.6%     |
| Cost per task, all six               | $0.31        | –         |
| Cost per task, the four              | $0.44        | $0.29     |

## Each benchmark

| Benchmark                                                                                      | Tool calling | Code mode | Change | Cost per task | Cost per task, code mode | Rank     | Runs                                                                    |
| ---------------------------------------------------------------------------------------------- | ------------ | --------- | ------ | ------------- | ------------------------ | -------- | ----------------------------------------------------------------------- |
| [Pydantic AI - Billing ops](https://pydantic.dev/models/benchmarks/billing_ops.md)             | 90%          | 100%      | +10    | $0.58         | $0.079                   | 4 of 44  | https://pydantic.dev/models/list/gemini-4-hydrogen/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 60%          | 60%       | ±0     | $0.11         | $0.16                    | 3 of 44  | https://pydantic.dev/models/list/gemini-4-hydrogen/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 100%         | 90%       | −10    | $0.38         | $0.36                    | 1 of 44  | https://pydantic.dev/models/list/gemini-4-hydrogen/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 85.9%        | 92.6%     | +6.7   | $0.71         | $0.57                    | 14 of 44 | https://pydantic.dev/models/list/gemini-4-hydrogen/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 100%         | –         | –      | $0.060        | –                        | 1 of 44  | https://pydantic.dev/models/list/gemini-4-hydrogen/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 70%          | –         | –      | $0.032        | –                        | 18 of 44 | https://pydantic.dev/models/list/gemini-4-hydrogen/llm_judge.md         |

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
This model passed most cases across five benchmarks: Billing ops (tools 90%, code mode 100%), Research & deck (tools 86%, code mode 93%), Structured output (tools 100%), LLM Judge (tools 70%) and SQL data analysis (tools 100%, code mode 90%). It reads source data thoroughly and re-checks figures before answering, and it recovers from tool errors on the next call. Its failures came from incomplete coverage of large datasets, over-strict judgments, and one ambiguous rule interpretation.

#### Strengths
- In Structured output it passed 10 of 10 cases in a single `accounts` call each, keeping group and parent figures apart, scaling £000 accounts by 1,000 and getting signs right in every case.
- In Billing ops all four change cases passed, with corrections run as `update_attendance`, `void_invoice` and `create_invoice` in order and payments allocated oldest due date first.
- In Research & deck both runs read every text, CSV, table, PDF and image before asking the founder, and recomputed the £4.40m run-rate and 39.4% gross margin before using them.
- In SQL data analysis it handled service days, repeats, untimed-call interpolation and after-midnight trips correctly in both modes, and fixed every tool error on the next call.
- In LLM Judge each reason cited the specific slide, invoice, date or quoted phrase it relied on, and 23 of 24 seed-deck verdicts matched the reference majority.

#### Weaknesses
- In Billing ops `large-wrong_invoices-1` with tool calling it fetched only about 30 of 384 invoices and relied on shortcuts, finding 6 of 12 wrong invoices.
- In LLM Judge all three failures were over-strict "no" verdicts, while some "yes" verdicts on contradiction and false-promise questions did not address the claims in question.
- In SQL data analysis at least 11 of 20 runs hit a DuckDB parser error from an unquoted `at` column, and the code-mode `tour` failure came from modelling the 15-minute stay rule differently.
- In Research & deck the tool-calling run never asked about slide order or naming, re-sent the whole 51,967-character deck after `check_deck` already returned `ok`, and both final notes ran to 2,200–2,900 characters.
- In Structured output it returned 0 where `null` was likely intended in three cases and omitted a zero line, though the checks did not penalise these.

#### Tool calling compared with code mode
- In Billing ops code mode was about 7x cheaper ($0.79 vs $5.76) and passed the large audit that tool calling failed, because it joined records in the sandbox instead of pulling thousands into context.
- In Billing ops code mode guessed nonexistent pagination keys (`has_more`, `next_page`) in five cases, and on small lookups tool calling was slightly cheaper and used 1 to 2 fewer requests.
- In Research & deck code mode cost $0.57 against $0.71 despite five more requests, but re-extracted the same PDFs in separate calls because each sandbox call started fresh.
- In SQL data analysis code mode ran the hardest cases in 28–31 requests versus 35–37 with tools, but cost more on simple cases due to 60–115k-character SVGs.
- In SQL data analysis code mode also hit sandbox limits such as `time.monotonic()`, `date.timetuple()` and `next()` on a generator.
