---
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 11 of 44."
canonical: https://pydantic.dev/models/list/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 11 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/gemini-3.8-flash/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-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://pydantic.dev/models/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 - Billing ops](https://pydantic.dev/models/benchmarks/billing_ops.md)             | 70%          | 90%       | +20    | $0.23         | $0.095                   | 21 of 44 | https://pydantic.dev/models/list/gemini-3.8-flash/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 40%          | 40%       | ±0     | $0.064        | $0.11                    | 22 of 44 | https://pydantic.dev/models/list/gemini-3.8-flash/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 90%          | 90%       | ±0     | $0.44         | $0.40                    | 11 of 44 | https://pydantic.dev/models/list/gemini-3.8-flash/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 85.2%        | 76.3%     | −8.9   | $0.38         | $0.45                    | 16 of 44 | https://pydantic.dev/models/list/gemini-3.8-flash/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 100%         | –         | –      | $0.031        | –                        | 1 of 44  | https://pydantic.dev/models/list/gemini-3.8-flash/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 80%          | –         | –      | $0.0084       | –                        | 9 of 44  | https://pydantic.dev/models/list/gemini-3.8-flash/llm_judge.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 Structured output (tools only), 80% on LLM Judge (tools only), 90% in both modes on SQL data analysis, 70% tools against 90% code mode on Billing ops, and 85% tools against 76% code mode on Research & 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 Research & deck and inconsistent zero/`null` handling on Structured output.

#### Strengths
- On Structured output 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 Billing ops 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 SQL data analysis 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 LLM Judge 47 of 48 key-point and deck-rubric verdicts matched the reference majority, each with a valid id and a one-sentence reason.
- On Research & 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 Research & deck both decks contain invented supporting numbers and contact details, and in tool calling it described a cancelled order as 'deferred'.
- On Billing ops 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 SQL data analysis 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 LLM Judge it did not check replies against the customer account and gave boilerplate yes answers on the safety questions in 18 of 20 instances.
- On Structured output 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 Billing ops 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 SQL data analysis 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 Research & 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.
