---
title: "Claude Sonnet 5 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 69.8%, code mode 62.2% over four benchmarks; rank 19 of 32."
canonical: https://models.pydantic.dev/models/claude-sonnet-5/pydantic_ai/
---

# Claude Sonnet 5 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 69.8%, code mode 62.2% over four benchmarks; rank 19 of 32.
>
> Markdown copy of https://models.pydantic.dev/models/claude-sonnet-5/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/claude-sonnet-5.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            | 69.8%        | –         |
| Score, the four with a code mode run | 59.7%        | 62.2%     |
| Cost per task, all six               | $0.68        | –         |
| Cost per task, the four              | $0.98        | $0.79     |

## 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)  | 60%          | 60%       | ±0     | $0.60         | $0.094                   | 27 of 32 | https://models.pydantic.dev/models/claude-sonnet-5/accounting_platform.md |
| [Pydantic AI Support Inbox](https://models.pydantic.dev/benchmarks/support_inbox.md)     | 50%          | 40%       | −10    | $0.094        | $0.11                    | 10 of 32 | https://models.pydantic.dev/models/claude-sonnet-5/support_inbox.md       |
| [Pydantic AI Transit Planner](https://models.pydantic.dev/benchmarks/transit_planner.md) | 40%          | 60%       | +20    | $1.09         | $1.24                    | 24 of 32 | https://models.pydantic.dev/models/claude-sonnet-5/transit_planner.md     |
| [Pydantic AI Seed Deck](https://models.pydantic.dev/benchmarks/seed_deck.md)             | 88.9%        | 88.9%     | ±0     | $2.15         | $1.72                    | 6 of 32  | https://models.pydantic.dev/models/claude-sonnet-5/seed_deck.md           |
| [Pydantic AI Companies House](https://models.pydantic.dev/benchmarks/companies_house.md) | 100%         | –         | –      | $0.10         | –                        | 1 of 32  | https://models.pydantic.dev/models/claude-sonnet-5/companies_house.md     |
| [Pydantic AI Judge Accuracy](https://models.pydantic.dev/benchmarks/judge_accuracy.md)   | 80%          | –         | –      | $0.017        | –                        | 7 of 32  | https://models.pydantic.dev/models/claude-sonnet-5/judge_accuracy.md      |

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
Across five benchmarks the model completed structured extraction and narrow, well-specified tasks reliably, but it applied rules incompletely on broader audits, routing searches and factual checks. Scores were 100% on companies_house, 89% on seed_deck in both modes, and 80% on judge_accuracy. It scored 60% in both modes on accounting_platform, and 40% with tools versus 60% in code mode on transit_planner. No failures in any benchmark were attributed to the provider.

#### Strengths
- On companies_house it passed all 10 cases across five tiers, separating group and parent figures, converting £000 amounts and handling signs correctly at about $0.103 per case.
- On accounting_platform it passed invoice correction, payment recording, invoice-total lookup, duplicate detection and billed-missed detection in 10/10 runs, including oldest-first payment allocation.
- On judge_accuracy it extracted explicit quantities and procedural facts accurately and caught details such as milestones on the wrong slide and integrations invented for an account with none.
- On seed_deck both modes combined financial data, documents and founder preferences into eight slides and repaired checker findings to reach acceptance.
- On companies_house it recovered on the immediate retry after argument-structure validation errors, and the extracted amounts did not change.

#### Weaknesses
- On accounting_platform it failed all four general invoice-audit runs and three of four margin runs, omitting tax exemptions, duplicate-line rules and missed-student exclusions.
- On transit_planner four runs exhausted the 80-request budget and others excluded untimed calls or narrowed candidates prematurely, with repeated SQL errors from an unquoted `at`.
- On seed_deck the tools-mode deck passed despite claiming 46% recovery where growth was 113.0% and despite inconsistent chart bar heights, which shows that format checks were stronger than content checks.
- On judge_accuracy it produced false positives and false negatives from loose or over-strict readings, and some passing explanations misattributed sources.
- On companies_house passing runs still showed weaknesses: a combined debtors total despite a no-computation rule, `null` returned where `0` was expected, and omitted zero-valued rows.

#### Tool calling compared with code mode
- On accounting_platform code mode cost $0.9434 versus $6.0302 for tools, using 135 requests versus 72, with accuracy unchanged at 6/10 because it fixed one failure and introduced a debt-sign error.
- On transit_planner code mode passed 6/10 versus 4/10 by resolving untimed stops and walking links, but requests rose from 471 to 542 and cost from $10.8879 to $12.3752.
- On seed_deck code mode used 70 requests versus 32 at 20% lower cost ($1.7170 versus $2.1459), and gave more traceable calculations and data-generated charts.
- Across accounting_platform and transit_planner, code mode added sandbox-specific failures, including exceeding the 100 nested-call limit, unsupported `time.time()` and a memory-limit reset.
