---
title: "Qwen3.8 27B 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 56.9%, code mode 32.3% over four benchmarks; rank 34 of 44."
canonical: https://pydantic.dev/models/list/qwen3.8-27b/pydantic_ai/
---

# Qwen3.8 27B 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 56.9%, code mode 32.3% over four benchmarks; rank 34 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/qwen3.8-27b/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/qwen3.8-27b.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            | 56.9%        | –         |
| Score, the four with a code mode run | 47.9%        | 32.3%     |
| Cost per task, all six               | $0.18        | –         |
| Cost per task, the four              | $0.26        | $0.14     |

## 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%          | 30%       | −40    | $0.16         | $0.014                   | 21 of 44 | https://pydantic.dev/models/list/qwen3.8-27b/billing_ops.md       |
| [Pydantic AI - Customer support](https://pydantic.dev/models/benchmarks/customer_support.md)   | 40%          | 20%       | −20    | $0.031        | $0.038                   | 22 of 44 | https://pydantic.dev/models/list/qwen3.8-27b/customer_support.md  |
| [Pydantic AI - SQL data analysis](https://pydantic.dev/models/benchmarks/sql_data_analysis.md) | 0%           | 0%        | ±0     | $0.24         | $0.15                    | 38 of 44 | https://pydantic.dev/models/list/qwen3.8-27b/sql_data_analysis.md |
| [Pydantic AI - Research & deck](https://pydantic.dev/models/benchmarks/research_deck.md)       | 81.5%        | 79.3%     | −2.2   | $0.63         | $0.37                    | 19 of 44 | https://pydantic.dev/models/list/qwen3.8-27b/research_deck.md     |
| [Pydantic AI - Structured output](https://pydantic.dev/models/benchmarks/structured_output.md) | 80%          | –         | –      | $0.033        | –                        | 30 of 44 | https://pydantic.dev/models/list/qwen3.8-27b/structured_output.md |
| [Pydantic AI - LLM Judge](https://pydantic.dev/models/benchmarks/llm_judge.md)                 | 70%          | –         | –      | $0.012        | –                        | 18 of 44 | https://pydantic.dev/models/list/qwen3.8-27b/llm_judge.md         |

## How it did on the Pydantic AI benchmarks

Written by an LLM from reviews of every run.

#### Overall
The model does well on single-request extraction and judging tasks (Structured output 80%, LLM Judge 70%) and on a long document-building task (Research & deck 81% tools, 79% code mode). It does poorly on multi-step agentic work. Its main failure is calling `final_result` too early with empty, placeholder or invented values, often right after stating a next step it never takes. This drove most failures in Billing ops and SQL data analysis, where it scored 0 of 20.

#### Strengths
- In Structured output it extracted several hundred expected money figures with none wrong, including £000 scaling, signs, and keeping group and parent columns separate.
- In LLM Judge every one of the 25 key-point verdicts in support cases matched the judge majority, and every case ended in one valid `final_result` call.
- In Research & deck both modes reached `check_deck` = `ok`, used the restated September revenue, and checked figures to the rounding shown.
- In Billing ops tool mode, `large-correction-2` and `large-record_payment-1` matched the expected diff exactly, including void → credit → reissue.
- In SQL data analysis its reasoning often got the rules right and found its own bugs, such as a `0x7FFF` mask that should have been `0x1FFFF`, even though no case passed.

#### Weaknesses
- In SQL data analysis 10 cases ended with `final_result` holding `legs: []` or zero times, and 8 cases submitted invented ids such as `P1a2b3c` or the example run id copied from DATA.md.
- In Billing ops 8 of 10 failures were placeholder or invented final answers, such as `ids: []` sent while it was saying "continue with page 2".
- In Structured output both failures were a guessed `accounts_type` of `small` instead of `full`, one sent after its own threshold check had shown the company was not small.
- In LLM Judge all three failures came from reaching the majority answer and then switching after speculating about what the benchmark designer had planted.
- In Billing ops tool mode it fetched about 384 invoices one at a time, putting up to 648k characters into context and ending in an HTTP 400.

#### Tool calling compared with code mode
- In Billing ops tool calling scored 70% against 30% in code mode, and code mode often invented answers within 1–3 requests without making any calls.
- In Billing ops code mode was cheaper on large scans when the model kept at the task, and `large-duplicate_lines-1` passed only in code mode, at $0.04.
- In Research & deck code mode cost 41% less ($0.37 against $0.63) by patching the deck instead of rewriting it, but it skipped asking the founder about slide order and had seven failed `run_code` calls.
- In SQL data analysis both modes scored 0%; code mode was cheaper ($1.50 against $2.37) but invented more answers (6 against 2) and added sandbox errors such as the missing `heapq`.
- Across benchmarks, code mode sometimes produced corrupted arguments, such as code cut off at `name=` or text with `\r` injected.
