---
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 4 of 32."
canonical: https://models.pydantic.dev/models/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 4 of 32.
>
> Markdown copy of https://models.pydantic.dev/models/gemini-4-hydrogen/pydantic_ai/. Index for agents: https://models.pydantic.dev/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://models.pydantic.dev/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://models.pydantic.dev/select.md
- Search models by name: `GET https://models.pydantic.dev/api/search?query=<text>`
- List, filter and sort models: `GET https://models.pydantic.dev/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://models.pydantic.dev/api/models/<slug>`
- Any other question about the models: `GET https://models.pydantic.dev/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://models.pydantic.dev/mcp`. More: https://models.pydantic.dev/usage.md

About the benchmark: https://models.pydantic.dev/benchmarks/pydantic_ai.md. The model's page: https://models.pydantic.dev/models/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://models.pydantic.dev/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 Accounting](https://models.pydantic.dev/benchmarks/accounting_platform.md)  | 90%          | 100%      | +10    | $0.58         | $0.079                   | 2 of 32  | https://models.pydantic.dev/models/gemini-4-hydrogen/accounting_platform.md |
| [Pydantic AI Support Inbox](https://models.pydantic.dev/benchmarks/support_inbox.md)     | 60%          | 60%       | ±0     | $0.11         | $0.16                    | 2 of 32  | https://models.pydantic.dev/models/gemini-4-hydrogen/support_inbox.md       |
| [Pydantic AI Transit Planner](https://models.pydantic.dev/benchmarks/transit_planner.md) | 100%         | 90%       | −10    | $0.38         | $0.36                    | 1 of 32  | https://models.pydantic.dev/models/gemini-4-hydrogen/transit_planner.md     |
| [Pydantic AI Seed Deck](https://models.pydantic.dev/benchmarks/seed_deck.md)             | 85.9%        | 92.6%     | +6.7   | $0.71         | $0.57                    | 9 of 32  | https://models.pydantic.dev/models/gemini-4-hydrogen/seed_deck.md           |
| [Pydantic AI Companies House](https://models.pydantic.dev/benchmarks/companies_house.md) | 100%         | –         | –      | $0.060        | –                        | 1 of 32  | https://models.pydantic.dev/models/gemini-4-hydrogen/companies_house.md     |
| [Pydantic AI Judge Accuracy](https://models.pydantic.dev/benchmarks/judge_accuracy.md)   | 70%          | –         | –      | $0.032        | –                        | 14 of 32 | https://models.pydantic.dev/models/gemini-4-hydrogen/judge_accuracy.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: accounting_platform (tools 90%, code mode 100%), seed_deck (tools 86%, code mode 93%), companies_house (tools 100%), judge_accuracy (tools 70%) and transit_planner (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 companies_house 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 accounting_platform 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 seed_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 transit_planner 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 judge_accuracy 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 accounting_platform `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 judge_accuracy 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 transit_planner 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 seed_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 companies_house 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 accounting_platform 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 accounting_platform 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 seed_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 transit_planner 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 transit_planner code mode also hit sandbox limits such as `time.monotonic()`, `date.timetuple()` and `next()` on a generator.
