---
title: "DeepSeek V4 Pro 0423"
description: "Open-weights text model from DeepSeek, released August 2026, with a 1M-token context window. It stands out for coding results and tool calling, but costs more than most of the registry."
canonical: https://pydantic.dev/models/list/deepseek-v4-pro/
---

# DeepSeek V4 Pro 0423

> Open-weights text model from DeepSeek, released August 2026, with a 1M-token context window. It stands out for coding results and tool calling, but costs more than most of the registry.
>
> Markdown copy of https://pydantic.dev/models/list/deepseek-v4-pro/. 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

Use it with Pydantic AI as `gateway/doubleword:deepseek-ai/DeepSeek-V4-Pro`.

## Spec sheet

- **Family:** DeepSeek
- **Released:** 13 Aug 2026
- **Weights:** open
- **Context window:** 1,000,000 tokens
- **Largest response:** 393,216 tokens
- **Accepts:** text
- **Tool calling:** yes
- **Knowledge cutoff:** unknown
- **Intelligence index:** 58.7 (rank 49)
- **Scores updated:** 2026-11-30
- **Price:** $1.74 input, $3.48 output, $2.17 blended per 1M tokens
- **Index points per $:** 27 (rank 59)
- **Speed:** 37 tokens/sec (rank 161)
- **Popularity:** rank 30 of 194 by usage
- **Pydantic AI Gateway:** built in

## Benchmarks

### Pydantic AI benchmarks

Our own benchmarks, each about 10 tasks run once with tool calling and once in code mode (https://pydantic.dev/models/codemode.md). Not part of the intelligence index. Cost is the mean cost of one task. For the combined score, code mode is compared over the four benchmarks run in both modes.

| Benchmark                                                                                      | Tool calling | Code mode | Change | Cost per task | Cost per task, code mode | Rank     | Runs                                                                  |
| ---------------------------------------------------------------------------------------------- | ------------ | --------- | ------ | ------------- | ------------------------ | -------- | --------------------------------------------------------------------- |
| [Pydantic AI Combined](https://pydantic.dev/models/benchmarks/pydantic_ai.md)                  | 71.6%        | 59.4%     | −3     | $0.27         | $0.40                    | 17 of 44 | https://pydantic.dev/models/list/deepseek-v4-pro/pydantic_ai.md       |
| [Pydantic AI - Billing ops](https://pydantic.dev/models/benchmarks/billing_ops.md)             | 90%          | 20%       | −70    | $0.23         | $0.11                    | 4 of 44  | https://pydantic.dev/models/list/deepseek-v4-pro/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 50%          | 70%       | +20    | $0.045        | $0.072                   | 12 of 44 | https://pydantic.dev/models/list/deepseek-v4-pro/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 40%          | 70%       | +30    | $0.90         | $0.78                    | 27 of 44 | https://pydantic.dev/models/list/deepseek-v4-pro/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 69.6%        | 77.8%     | +8.2   | $0.38         | $0.63                    | 29 of 44 | https://pydantic.dev/models/list/deepseek-v4-pro/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 90%          | –         | –      | $0.060        | –                        | 15 of 44 | https://pydantic.dev/models/list/deepseek-v4-pro/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 90%          | –         | –      | $0.011        | –                        | 2 of 44  | https://pydantic.dev/models/list/deepseek-v4-pro/llm_judge.md         |
| [Pydantic AI - Cyber Willing](https://pydantic.dev/models/benchmarks/cyber_willing.md)         | 100%         | –         | –      | $0.085        | –                        | 1 of 32  | https://pydantic.dev/models/list/deepseek-v4-pro/cyber_willing.md     |

### Other benchmarks


| Benchmark                | Score  | Rank among models tested | What it measures                                                                                 | Source                                    |
| ------------------------ | ------ | ------------------------ | ------------------------------------------------------------------------------------------------ | ----------------------------------------- |
| Intelligence index       | 58.7   | 49                       | Our composite of the benchmarks below, 0-100                                                     | Pydantic, from the sources credited below |
| GPQA Diamond             | 90.9%  | 32                       | Graduate-level science questions, multiple choice                                                | Epoch AI (CC BY 4.0)                      |
| OTIS Mock AIME           | 96.7%  | 35                       | Competition mathematics problems with exact answers                                              | Epoch AI (CC BY 4.0)                      |
| FrontierMath             | 45.3%  | 57                       | Original research-level mathematics problems, tiers 1 to 3                                       | Epoch AI (CC BY 4.0)                      |
| SimpleQA Verified        | 47%    | 36                       | Short factual questions answered from memory, without search                                     | Epoch AI (CC BY 4.0)                      |
| SciCode                  | 50%    | 49                       | Scientific programming problems written by researchers                                           | SciCode, via Epoch AI (CC BY 4.0)         |
| LMArena text             | 1451.3 | 40                       | Rating from blind human votes between pairs of chat responses                                    | LMArena (CC BY 4.0)                       |
| FrontierMath Tier 4      | 2.4%   | 62                       | Research-level mathematics problems, the hardest tier, with checkable answers                    | Epoch AI (CC BY 4.0)                      |
| Chess Puzzles            | 19%    | 66                       | Find the single best move in a chess position                                                    | Epoch AI (CC BY 4.0)                      |
| Mystery Game Puzzles     | 17%    | 54                       | Best-move puzzles in an undisclosed well-known game                                              | Epoch AI (CC BY 4.0)                      |
| ALE-Bench                | 1006.1 | 54                       | Hard optimisation contest problems, as a rating against human contestants                        | Sakana AI, via Epoch AI (CC BY 4.0)       |
| Epoch Capabilities Index | 150.2  | 63                       | Epoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index | Epoch AI (CC BY 4.0)                      |

## Providers and prices

US dollars per million tokens.

| Provider   | Gateway  | Pydantic AI string                               | Input | Cached input | Output |
| ---------- | -------- | ------------------------------------------------ | ----- | ------------ | ------ |
| DeepSeek   | BYOK     | `deepseek:deepseek-v4-pro`                       | $0.66 | $0.022       | $1.98  |
| Doubleword | built in | `gateway/doubleword:deepseek-ai/DeepSeek-V4-Pro` | $1.74 | –            | $3.48  |
| OpenRouter | BYOK     | `openrouter:deepseek/deepseek-v4-pro`            | $1.42 | $0.12        | $2.83  |
| Novita     | BYOK     | –                                                | $1.6  | $0.14        | $3.2   |
| Fireworks  | BYOK     | `fireworks:deepseek-v4-pro`                      | $1.74 | $0.14        | $3.48  |

## Use DeepSeek V4 Pro 0423 with Pydantic AI

### hello.py

Ask DeepSeek V4 Pro 0423 a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/doubleword:deepseek-ai/DeepSeek-V4-Pro', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)
```

### structured_output.py

Get validated, typed output from DeepSeek V4 Pro 0423 by giving the agent a Pydantic model. Run it with uv run structured_output.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic import BaseModel
from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'


class CityLocation(BaseModel):
    city: str
    country: str


agent = Agent('gateway/doubleword:deepseek-ai/DeepSeek-V4-Pro', output_type=CityLocation)

result = agent.run_sync('Where were the olympics held in 2012?')
print(result.output)
#> city='London' country='United Kingdom'
```

### tools.py

Give DeepSeek V4 Pro 0423 two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os
import random

from pydantic_ai import Agent, RunContext

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent(
    'gateway/doubleword:deepseek-ai/DeepSeek-V4-Pro',
    deps_type=str,
    instructions="You're a dice game, roll the die and see if it matches the user's guess.",
)


@agent.tool_plain
def roll_dice() -> str:
    """Roll a six-sided die and return the result."""
    return str(random.randint(1, 6))


@agent.tool
def get_player_name(ctx: RunContext[str]) -> str:
    """Get the player's name."""
    return ctx.deps


result = agent.run_sync('My guess is 4', deps='Anne')
print(result.output)
```

### streaming.py

Stream DeepSeek V4 Pro 0423's reply to the terminal as it is generated. Run it with uv run streaming.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import asyncio
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/doubleword:deepseek-ai/DeepSeek-V4-Pro')


async def main():
    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:
        async for text in response.stream_text(delta=True):
            print(text, end='', flush=True)


asyncio.run(main())
```

### pax.sh

Code with DeepSeek V4 Pro 0423 in your terminal using Pax, the Pydantic AI coding agent. On macOS, open a new terminal after installing, so pax isn't the system's archiver.

```sh
# uv tool install pydantic-ai-pax
export PYDANTIC_AI_GATEWAY_API_KEY='...'

pax -m 'gateway/doubleword:deepseek-ai/DeepSeek-V4-Pro'
```

### codex.sh

Run OpenAI's Codex CLI on DeepSeek V4 Pro 0423 through Pydantic AI Gateway.

```sh
# npm install -g @openai/codex
export PYDANTIC_AI_GATEWAY_API_KEY='...'

codex --model 'deepseek-ai/DeepSeek-V4-Pro' \
  -c model_provider='gateway' \
  -c model_providers.gateway.name='Pydantic AI Gateway' \
  -c model_providers.gateway.base_url='https://gateway.pydantic.dev/proxy/doubleword/v1' \
  -c model_providers.gateway.env_key='PYDANTIC_AI_GATEWAY_API_KEY'
```

### ai_sdk.ts

Call DeepSeek V4 Pro 0423 from TypeScript with the Vercel AI SDK, through Pydantic AI Gateway.

```ts
// npm install ai @ai-sdk/openai-compatible
import { createOpenAICompatible } from '@ai-sdk/openai-compatible'
import { generateText } from 'ai'

process.env.PYDANTIC_AI_GATEWAY_API_KEY = '...'

const doubleword = createOpenAICompatible({
  baseURL: 'https://gateway.pydantic.dev/proxy/doubleword',
  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,
})

const { text } = await generateText({
  model: doubleword('deepseek-ai/DeepSeek-V4-Pro'),
  system: 'Be concise, reply with one sentence.',
  prompt: 'Where does "hello world" come from?',
})
console.log(text)
```

## About DeepSeek V4 Pro 0423

DeepSeek V4 Pro 0423 costs $1.74 per million input tokens and $3.48 per million output tokens, has a 1M token context window and scores 58.7 on our intelligence index, #49 of 101.

DeepSeek V4 Pro 0423 is an open-weights model released in August 2026. Its standout result is coding, ranking 5th of 23 on SWE-bench Verified. Its overall Intelligence index of 60.6 is only just above the median of 59.5.

Its main weaknesses are price and research-level mathematics. The blended price of $2.18 per million tokens is about double the median, and its FrontierMath score sits well below the typical result.

It accepts text only but supports tool calling, structured output and a reasoning mode, with a 1M-token context window. Its intelligence-per-dollar rank of 68th of 194 suggests it suits coding-heavy work more than cost-sensitive general use.

**Strengths**

- 77.6% on SWE-bench Verified, 5th of 23
- 90.9% on GPQA Diamond, above the 89.8% median
- Supports tool calling, structured output and reasoning mode
- Open weights, available from five providers

**Weaknesses**

- 45.3% on FrontierMath, 60th of 80 and below the 64.6% median
- Blended price $2.18 per million tokens, about double the median
- Intelligence index 60.6, 53rd of 114, just above the 59.5 median

**Best for:** Coding agents and tool-using workflows where open weights and a large context window matter more than price.

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
The model is accurate on figures and rules in tool calling, scoring 90% on Billing ops, Structured output and LLM Judge, and 70% on Research & deck. Code mode varies widely: 20% on Billing ops, where it mostly resent identical `run_code` calls, against 78% on Research & deck and 70% on SQL data analysis. Its main recurring costs are long reasoning, repeated calls and running out of request budget on long tasks.

#### Strengths
- On Billing ops in tool calling, write tasks such as `large-correction-2` and `large-record_payment-1` matched expected changes exactly, including an existing same-day allocation.
- On Structured output it scaled £000 figures and handled bracket signs correctly in all 10 cases, and it reconciled totals to catch an unbracketed tax credit.
- On LLM Judge it answered each case in one request for about $0.11 in total, and disagreed with the reference-judge majority on only 1 of 65 verdicts.
- On Research & deck both modes used the restated revenue figures, followed the founder's exclusions and re-checked numbers before finishing.
- On SQL data analysis the code-mode passes used reusable search methods, such as backward latest-departure propagation for `arrive_by`.

#### Weaknesses
- On Billing ops in code mode, 6 cases looped on an identical `run_code` call, four of them until the 60-request limit, and three ended with made-up answers.
- On SQL data analysis, six runs exhausted the 80-request budget, five of them in tools mode, and SQL syntax errors such as unquoted `at` kept recurring.
- On Structured output it treated dash-shown lines inconsistently, which caused the one failure, and in 3 cases it split the final `accounts` call so the submissions were rejected.
- On LLM Judge it was lenient on `no_contradiction` and `no_false_promise`, answering yes after its own notes had flagged a doubtful sentence.
- On Research & deck the tools run never asked the founder about slide structure, and both modes guessed the cover photo by file size.

#### Tool calling compared with code mode
- On Billing ops, tool calling clearly won (9/10 against 2/10) because code mode failed to move on after receiving `run_code` results.
- On SQL data analysis, code mode passed 7/10 against 4/10 and used fewer requests (562 against 695) at lower cost ($7.83 against $8.97).
- On SQL data analysis the code-mode gain was uneven: `one_change` rose from 48 to 74 requests, and neither mode passed either tour case or the departure profile.
- On Research & deck, code mode passed where tools failed but cost more (30 requests and $0.63 against 17 and $0.38); this rests on one case per mode.

Prices come from [genai-prices](https://github.com/pydantic/genai-prices), in US dollars per million tokens. Benchmark scores come from Epoch AI and LMArena (CC BY 4.0), Browser Use, and our own Pydantic AI benchmarks (CC BY 4.0); the index and its sources are described at https://pydantic.dev/models/methodology.md. Data built 2026-11-30. This model from the API: `https://pydantic.dev/models/api/models/deepseek-v4-pro`. Compare it with others: `https://pydantic.dev/models/api/models?slug=deepseek-v4-pro,<other slug>`
