---
title: "Gemini 4 Carbon 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 66.7%, code mode 82.2% over four benchmarks; rank 21 of 32."
canonical: https://models.pydantic.dev/models/gemini-4-carbon/pydantic_ai/
---

# Gemini 4 Carbon 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 66.7%, code mode 82.2% over four benchmarks; rank 21 of 32.
>
> Markdown copy of https://models.pydantic.dev/models/gemini-4-carbon/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-carbon.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            | 66.7%        | –         |
| Score, the four with a code mode run | 62.5%        | 82.2%     |
| Cost per task, all six               | $0.51        | –         |
| Cost per task, the four              | $0.73        | $0.53     |

## 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.91         | $0.12                    | 2 of 32  | https://models.pydantic.dev/models/gemini-4-carbon/accounting_platform.md |
| [Pydantic AI Support Inbox](https://models.pydantic.dev/benchmarks/support_inbox.md)     | 60%          | 40%       | −20    | $0.18         | $0.24                    | 2 of 32  | https://models.pydantic.dev/models/gemini-4-carbon/support_inbox.md       |
| [Pydantic AI Transit Planner](https://models.pydantic.dev/benchmarks/transit_planner.md) | 100%         | 100%      | ±0     | $0.73         | $0.65                    | 1 of 32  | https://models.pydantic.dev/models/gemini-4-carbon/transit_planner.md     |
| [Pydantic AI Seed Deck](https://models.pydantic.dev/benchmarks/seed_deck.md)             | 0%           | 88.9%     | +88.9  | $1.10         | $1.14                    | 32 of 32 | https://models.pydantic.dev/models/gemini-4-carbon/seed_deck.md           |
| [Pydantic AI Companies House](https://models.pydantic.dev/benchmarks/companies_house.md) | 100%         | –         | –      | $0.082        | –                        | 1 of 32  | https://models.pydantic.dev/models/gemini-4-carbon/companies_house.md     |
| [Pydantic AI Judge Accuracy](https://models.pydantic.dev/benchmarks/judge_accuracy.md)   | 50%          | –         | –      | $0.047        | –                        | 21 of 32 | https://models.pydantic.dev/models/gemini-4-carbon/judge_accuracy.md      |

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
The model passed most cases across five benchmarks, with perfect scores on companies_house (tools 100%) and transit_planner (100% in both modes), 90%/100% on accounting_platform, and a split result on seed_deck (tools 0%, code mode 89%). Its answers were accurate when it finished; its failures came from time limits on large tool-calling workloads and from over-strict verdicts on judge_accuracy (50%). It tends to over-verify and make unneeded lookups, which adds requests and cost.

#### Strengths
- On accounting_platform it applied handbook rules (half-up rounding, split charges, net/gross tax, released allocations) correctly in all 19 answered runs, and summed 74 invoice lines exactly without a calculator.
- On companies_house it passed all 10 cases in a single request each, handling £000 scaling, signs, group-versus-parent columns and nil-versus-absent fields, including two tier-5 cases with about 150 scored fields.
- On transit_planner it handled service-day bitmasks, service changes, interpolation and walk tables in every run, and searched exhaustively (all 120 orders in `tour`).
- On seed_deck it ran research in parallel, asked founder questions that captured slide order and palette, and recomputed figures before writing.
- On judge_accuracy its reasons quoted specific evidence such as invoice ids, card endings and slide figures, and it was self-consistent across all 10 cases.

#### Weaknesses
- On accounting_platform in tool calling it loaded entire large datasets into context (676K–831K input tokens per request) and timed out on `large-wrong_invoices-1`.
- On seed_deck in tool calling it wrote a 74,324-character file in one tool argument (487 s) and began re-sending it in full, exceeding the 1200 s limit.
- On judge_accuracy all 5 failures were over-strict "no" verdicts, treating unsupported or polite statements as contradictions and adding requirements to questions.
- On transit_planner it left the reserved column `at` unquoted in 19 of 20 runs, and spent 3 to 15 extra requests re-checking after the answer was known.
- On companies_house it emitted zeros for one-sided dashes and inconsistent null shapes on unscored fields, and the run never tested recovery from a validation error.

#### Tool calling compared with code mode
- On accounting_platform code mode cost far less on large audits ($0.10 vs $1.51, $0.12 vs $3.69) and passed the case tool calling timed out on, though it cost slightly more on small cases.
- On seed_deck code mode passed while tool calling failed, because building the deck with templates and `html.replace` avoided re-emitting full HTML as a tool argument; cost was nearly equal ($1.14 vs $1.10).
- On transit_planner code mode used 13% fewer requests and cost 11% less, mainly on `timed_tour`, `meeting_point` and `tour`, but introduced sandbox errors such as `KeyError` and a 30-second time-out.
- Code mode hit sandbox limits on accounting_platform (100 nested-call cap) and seed_deck (unavailable `int.from_bytes`), each costing extra requests.
- Only tool calling was run on companies_house and judge_accuracy, so those benchmarks give no comparison.
