---
title: "Gemini 3.8 Flash 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 77.5%, code mode 74.1% over four benchmarks; rank 10 of 32."
canonical: https://models.pydantic.dev/models/gemini-3.8-flash/pydantic_ai/
---

# Gemini 3.8 Flash 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 77.5%, code mode 74.1% over four benchmarks; rank 10 of 32.
>
> Markdown copy of https://models.pydantic.dev/models/gemini-3.8-flash/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-3.8-flash.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            | 77.5%        | –         |
| Score, the four with a code mode run | 71.3%        | 74.1%     |
| Cost per task, all six               | $0.19        | –         |
| Cost per task, the four              | $0.28        | $0.26     |

## 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)  | 70%          | 90%       | +20    | $0.23         | $0.095                   | 19 of 32 | https://models.pydantic.dev/models/gemini-3.8-flash/accounting_platform.md |
| [Pydantic AI Support Inbox](https://models.pydantic.dev/benchmarks/support_inbox.md)     | 40%          | 40%       | ±0     | $0.064        | $0.11                    | 17 of 32 | https://models.pydantic.dev/models/gemini-3.8-flash/support_inbox.md       |
| [Pydantic AI Transit Planner](https://models.pydantic.dev/benchmarks/transit_planner.md) | 90%          | 90%       | ±0     | $0.44         | $0.40                    | 10 of 32 | https://models.pydantic.dev/models/gemini-3.8-flash/transit_planner.md     |
| [Pydantic AI Seed Deck](https://models.pydantic.dev/benchmarks/seed_deck.md)             | 85.2%        | 76.3%     | −8.9   | $0.38         | $0.45                    | 12 of 32 | https://models.pydantic.dev/models/gemini-3.8-flash/seed_deck.md           |
| [Pydantic AI Companies House](https://models.pydantic.dev/benchmarks/companies_house.md) | 100%         | –         | –      | $0.031        | –                        | 1 of 32  | https://models.pydantic.dev/models/gemini-3.8-flash/companies_house.md     |
| [Pydantic AI Judge Accuracy](https://models.pydantic.dev/benchmarks/judge_accuracy.md)   | 80%          | –         | –      | $0.0084       | –                        | 7 of 32  | https://models.pydantic.dev/models/gemini-3.8-flash/judge_accuracy.md      |

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
This model's results range from 76% to 100% across five benchmarks: 100% on companies_house (tools only), 80% on judge_accuracy (tools only), 90% in both modes on transit_planner, 70% tools against 90% code mode on accounting_platform, and 85% tools against 76% code mode on seed_deck. Single-request extraction and judging tasks are cheap and clean. Long, data-heavy agent tasks expose incomplete coverage, slow step-by-step work and invented figures. Several passes hide problems the checks did not catch, such as invented deck figures on seed_deck and inconsistent zero/`null` handling on companies_house.

#### Strengths
- On companies_house it passed all 10 cases in one request each for about $0.31 total, scaling £000 figures, keeping signs and separating group from parent columns correctly.
- On accounting_platform it passed all four write tasks, voiding and reissuing in the right order and allocating payments oldest-due first, and applied the pricing rules correctly in every margin run.
- On transit_planner every run handled service days, repeat runs, interpolation, walk limits and the after-midnight shift, and it usually re-checked chosen legs against raw data.
- On judge_accuracy 47 of 48 key-point and deck-rubric verdicts matched the reference majority, each with a valid id and a one-sentence reason.
- On seed_deck both runs followed the founder's slide order and colours, got the core finance figures right, and passed `check_deck` on the first write.

#### Weaknesses
- On seed_deck both decks contain invented supporting numbers and contact details, and in tool calling it described a cancelled order as 'deferred'.
- On accounting_platform all four failures were month-wide invoice audits, where it opened too few invoices, missed duplicate lines, or wasted requests on excluded void invoices.
- On transit_planner it worked one statement per request, which caused the `tour` failure at the 80-request limit and left five passing runs using 71 to 78 of the 80 requests.
- On judge_accuracy it did not check replies against the customer account and gave boilerplate yes answers on the safety questions in 18 of 20 instances.
- On companies_house it was inconsistent about zero versus `null` and about empty sections, which the lenient check did not penalise.

#### Tool calling compared with code mode
- On accounting_platform code mode passed 9 against 7 and cost $0.95 against $2.30, because tool calling broke down when doing arithmetic over 384 invoices without help.
- On transit_planner pass counts were equal, but code mode solved `tour` in 58 requests with a router where tool calling ran out at 80; code mode's one failure came from float rounding.
- On seed_deck code mode scored lower (76% against 85%), cost 19% more, lost about ten requests to sandbox errors, and produced more invented figures.
- Across code-mode runs it repeatedly guessed response shapes and hit sandbox errors such as `next(generator)` failures and unsupported calls, usually recovering at the cost of one or more requests.
