---
title: "DeepSeek V4 Flash 0423 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 55.6%, code mode 43.5% over four benchmarks; rank 36 of 44."
canonical: https://pydantic.dev/models/list/deepseek-v4-flash/pydantic_ai/
---

# DeepSeek V4 Flash 0423 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 55.6%, code mode 43.5% over four benchmarks; rank 36 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/deepseek-v4-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/deepseek-v4-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            | 55.6%        | –         |
| Score, the four with a code mode run | 35.8%        | 43.5%     |
| Cost per task, all six               | $0.028       | –         |
| Cost per task, the four              | $0.041       | $0.065    |

## 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)             | 60%          | 70%       | +10    | $0.029        | $0.0080                  | 31 of 44 | https://pydantic.dev/models/list/deepseek-v4-flash/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 20%          | 20%       | ±0     | $0.0037       | $0.0040                  | 38 of 44 | https://pydantic.dev/models/list/deepseek-v4-flash/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 10%          | 10%       | ±0     | $0.085        | $0.11                    | 35 of 44 | https://pydantic.dev/models/list/deepseek-v4-flash/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 53.3%        | 74.1%     | +20.8  | $0.044        | $0.14                    | 38 of 44 | https://pydantic.dev/models/list/deepseek-v4-flash/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 100%         | –         | –      | $0.0032       | –                        | 1 of 44  | https://pydantic.dev/models/list/deepseek-v4-flash/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 90%          | –         | –      | $0.0007       | –                        | 2 of 44  | https://pydantic.dev/models/list/deepseek-v4-flash/llm_judge.md         |

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
DeepSeek V4 Flash is cheap and reliable on single-shot structured extraction and judging: 10 of 10 on Structured output and 9 of 10 on LLM Judge, nearly all in one request. It is weak on multi-step analysis over many records. It scored 60–70% on Billing ops and 10% on SQL data analysis, and failed both Research & deck runs. When a problem calls for an algorithm, it tends to trace by hand, skip lookups it needs, or run out of its request budget.

#### Strengths
- On Structured output it passed all 10 cases for about $0.032 in total, scaled £000 figures correctly, and never mixed up group and parent columns.
- On LLM Judge each verdict took one `final_result` call costing under $0.001, and its reasons quoted specific details such as invoice numbers and slide figures.
- On Billing ops all 4 change runs matched the expected diff exactly, including a multi-step void, credit-note, re-invoice and pay sequence, and half-up rounding was correct in every margin run.
- On Research & deck it gathered data with parallel reads, used the restated revenue and cash figures correctly, and kept iterating on `check_deck` feedback until it returned `ok`.

#### Weaknesses
- On Billing ops 3 of 4 tutor-margin runs never called `get_client`, so they ignored `is_taxable` and took tax out of lessons for non-taxable clients.
- On SQL data analysis it passed 2 of 20 cases and hit the 80-request limit in 9, because it traced lines one query at a time and filtered out untimed calls and repeat runs.
- On Research & deck it placed images it could not see without telling the founder, and the tools deck kept invented claims such as '37% below next competitor'.
- On LLM Judge its one failure came after it spotted a real inconsistency and then decided 'I'm overthinking this', and it leaned lenient on borderline questions.
- On Billing ops large-wrong_invoices-1 it gave up with a partial answer in tools mode and hit the 60-request limit in code mode.

#### Tool calling compared with code mode
- On Billing ops code mode scored 70% against 60% for tools, solved large-missed_billed-1 with a systematic join, and ran large-duplicate_lines-1 for $0.0058 against $0.1288 in tools mode.
- On Research & deck code mode came closer (74% against 53%): it ran its own figure audit and followed six rounds of founder feedback, at $0.14 and 75 requests against $0.044 and 17 for tools.
- On SQL data analysis code mode gave no gain, with the same 1 pass, 6 request-limit failures against 3, and about 25% higher cost, because it used `run_code` as a wrapper around single SQL queries.
- On SQL data analysis saturday_direct, code mode treated `run_sql` results capped at 200 rows as complete, which hid an earlier tram and gave a worse answer than the tools run.
- On Billing ops the model split fetches across many small `run_code` calls, which used up the request budget, and neither mode guarded against the `is_taxable` mistake.
