---
title: "DeepSeek V4 Pro 0423 on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 80%; rank 2 of 20."
canonical: https://models.pydantic.dev/models/deepseek-v4-pro/accounting_platform/
---

# DeepSeek V4 Pro 0423 on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 80%; rank 2 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/deepseek-v4-pro/accounting_platform/. 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>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of the first three. An `OPTIONS` request to any endpoint returns its schema. The same four 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/accounting_platform.md. The model on every Pydantic AI benchmark: https://models.pydantic.dev/models/deepseek-v4-pro.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 90%   | 9 of 10      | $2.33 | 103      | 654        | 47.4 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed 17 of 20 runs: 9/10 with tool calling and 8/10 in code mode. Every failure was a "wrong invoices" audit, which requires recomputing every invoice line against lessons, attendance and tax rules. All other task types passed in both modes. These were simple lookups, balance owed, payment allocation, invoice correction, tutor margin, and duplicate or missed-billed detection.

#### Where it does well

- **Simple lookups and writes:** invoice totals, the amount owed after allocations (85204), oldest-due-first payment allocation (37626 + 12500), and the void-and-reissue correction (17100). These took 2–9 requests and cost about $0.005–0.02. In both modes the resulting changes matched the expected answer exactly.
- **Tutor margin calculations:** both modes got the correct answers, 65045 and 120741. Code mode showed more care: it applied the billable status rules, used half-up rounding, removed tax only from gross lines for taxable clients, and checked its result with a second Decimal-based implementation.
- **Exhaustive sweeps:** it paged correctly through all 4 pages (394 invoices) and excluded void invoices.

#### Mistakes it makes

- **Narrow audits:** in large-wrong_invoices-1 (tools), it checked only for tax charged to non-taxable clients. It examined about 4 of roughly 390 invoices in detail and missed 9 of the 12 errors. In small-wrong_invoices-1 (code), it recomputed each line in isolation and never looked for duplicate billing, so it missed INV-00158 (4050).
- **Guessing instead of fetching:** in code mode it inferred `is_taxable` for 139 clients from tax amounts. In small-tutor_margin-3 it hardcoded a taxability flag it had never seen, and the answer was right partly by luck.
- **Thin verification and no visible working:** the transcripts often show neither the arithmetic nor a check of truncated allocation results.
- **Wasted calls:** it repeated `list_lessons` calls, exceeded the 100-id and 100-nested-call limits, and assumed a field name that turned out to be wrong.

#### Tool calling compared with code mode

|                | Tools | Code mode |
| -------------- | ----- | --------- |
| Passed         | 9/10  | 8/10      |
| Total requests | 103   | 160       |
| Total cost     | $2.33 | $0.75     |

- **Large scans:** code mode was much cheaper. duplicate_lines cost $0.10 against $0.62 with tools, and missed_billed cost $0.10 against $0.90. With tool calling, duplicate_lines needed about 390 separate `get_invoice` calls and found duplicates by reading lines by eye.
- **Small tasks:** the two modes cost about the same.
- **Request count:** code mode can use many requests. In large-wrong_invoices-1 it lost state, refetched data, ran trivial snippets, and hit the 60-request cap without giving an answer.

Choose code mode for bulk data work, but watch the request budget. Neither mode is yet reliable for full invoice audits.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent called get_invoice for INV-00084 and reported its stored total of 89700 pence, which matches the expected answer. ($0.0071, 2 requests, 5 s)
- Right: Used the one tool call that was needed, get_invoice, and read the invoice's stored 'total' field (89700) straight from the record.
- Right: Gave the answer in pence as an integer, as the handbook requires.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007 and listed the two unpaid invoices, INV-00155 (39452) and INV-00192 (49315). It pulled the client's allocations, subtracted the one unreleased allocation on INV-00155 (3563) and answered 85204, which is correct. ($0.0054, 4 requests, 14 s)
- Right: Used list_invoices with a status filter so only unpaid invoices were included.
- Right: Checked allocations instead of assuming the unpaid invoices had nothing paid on them, and found the 3563 credit allocation (id 169) on INV-00155.
- Right: Got the arithmetic right: 39452 + 49315 - 3563 = 85204.
- Right: Used few calls, with no wasted steps.

### large-tutor_margin-3

**Tool calling: passed.** The agent got the settings, found tutor TU-002, listed the 75 October lessons, fetched attendance for all of them and looked up 18 clients' taxable flags. It returned 120741 pence, which matches the expected answer. ($0.095, 5 requests, 4.7 min)
- Right: It limited the lesson query to 2026-10-01 to 2026-10-31 by tutor_id, which matches the rule that lessons count by the date they took place.
- Right: It fetched attendance for every lesson in a single batched list_attendance call.
- Right: It checked clients' is_taxable flags, which matter for the net amount on gross-priced lines.
- Right: The final figure, 120741, matches the expected answer.
- Mistake: It made 18 get_client calls, apparently only for the clients in the first part of the attendance list. Taxability only changes the net for gross-priced lessons, and the shortened transcript doesn't show whether any lessons were gross. So these calls were either unnecessary or incomplete, and the correct answer may have depended partly on there being no gross lessons for the clients it never checked.
- Mistake: None of the arithmetic is shown in the transcript: no step-by-step working of split charges, missed students or tutor pay. The computation cannot be checked from the visible record.

### small-tutor_margin-3

**Tool calling: passed.** The agent got the settings, found tutor Kai Iyer (TU-001), listed his 39 October 2026 lessons, pulled attendance for all of them and checked the taxable flag of the 7 clients involved. It then gave 65045 pence, which matches the expected answer. ($0.046, 5 requests, 2.3 min)
- Right: It fetched the tax rate (20%) from the settings, which matters because some lessons are priced gross.
- Right: It listed lessons for the whole of October, 2026-10-01 to 2026-10-31, counting them by date taken place whatever their invoiced state.
- Right: It fetched attendance for all 39 lessons in one batched call.
- Right: It checked is_taxable for every client involved and found that CL-0030 and CL-0037 are not taxable, so their gross lessons count at full cost as net.
- Right: Its final figure of 65045 is correct.
- Mistake: The calculation does not appear in the transcript: no working is shown for which lessons were billable, the lesson lengths, how gross prices were netted, or tutor pay. That makes the answer impossible to audit, though it was correct.

### large-duplicate_lines-1

**Tool calling: passed.** The agent listed all October 2026 invoices across 4 pages, then opened every non-void invoice with get_invoice to look for repeated (lesson_id, student_id) lines. It returned INV-06060, INV-06073 and INV-06097, which matches the expected answer. ($0.62, 21 requests, 6.9 min)
- Right: Paged through list_invoices for the full sent range 2026-10-01 to 2026-10-31, including invoices sent after the 1st (INV-06145 to INV-06154).
- Right: Checked line-level detail for each invoice instead of guessing from the totals.
- Right: Left out void invoices such as INV-06069, as the question asked.
- Right: Returned the correct set of three invoice IDs.
- Mistake: The method was very expensive: about 390 separate get_invoice calls, producing hundreds of thousands of characters of output. Duplicates could only be found by opening each invoice, but the transcript shows no organised record-keeping, so the result relied on spotting repeated lines by eye across a very long context.
- Mistake: The transcript does not show the agent saying which duplicate lines it found (for example, which lesson was repeated in INV-06097), so the final answer comes with no stated evidence.

### large-missed_billed-1

**Tool calling: passed.** The agent listed October 2026 invoices, then swept attendance for every September lesson looking for students marked 'missed' but flagged invoiced=True. It confirmed the hits against invoice lines and returned INV-05821, INV-05846 and INV-06080, which matches the expected answer. ($0.90, 30 requests, 11.4 min)
- Right: It paged through all four pages of list_invoices to get the full set of October invoices, void ones included.
- Right: It worked out that the anomaly shows up in list_attendance as status 'missed' with invoiced=True (for example LS-044224, ST-0088, CL-0065). That made a systematic sweep possible.
- Right: It covered the whole September lesson ID range (LS-041722 to LS-044678) in batches of 100, so no lesson was skipped.
- Right: It checked hits against the invoices with get_invoice: INV-05821 contains LS-044224 for ST-0088, and INV-06080 is CL-0334's invoice.
- Right: The final answer leaves out void invoices and matches the expected IDs exactly.
- Mistake: Early on it fetched invoices one at a time: get_invoice on INV-06145 to INV-06154 and INV-05761 to INV-05780, plus targeted list_attendance calls. These were dropped once it switched to the full sweep, so they were wasted.
- Mistake: It called list_lessons for September twice (all statuses, then complete only, plus a cancelled_chargeable call) and did not clearly use the results. These calls were redundant.
- Mistake: The transcript does not show INV-05846 being checked with get_invoice before it went into the answer. The agent presumably mapped it from the client ID in the invoice list, but it was less carefully confirmed than the other two.

### large-wrong_invoices-1

**Tool calling: failed.** The agent listed every October 2026 invoice. It noticed three invoices for non-taxable clients that showed nonzero tax (INV-05851, INV-06016, INV-06105) and reported those tax amounts as the overcharges. It missed 9 of the 12 wrong invoices in the expected answer, so the run failed. ($0.33, 15 requests, 10.0 min)
- Right: Paged through all four pages of October invoices with list_invoices.
- Right: Correctly found the three cases where a non-taxable client was charged tax, and got those amounts right (1050, 1150, 1875).
- Right: Checked a voided/reissued pair (INV-06085/INV-06145) and left out void invoices as asked.
- Mistake: The agent only searched for one kind of error: tax charged to non-taxable clients, found by scanning invoice headers. It never recomputed line amounts from lesson rates, durations, attendance and split rules. Other kinds of error went undetected: lines for missed or non-billable students, wrong split shares, wrong durations, wrong tax on taxable clients. These account for INV-05791, INV-05821, INV-05846, INV-05877, INV-06017, INV-06060, INV-06073, INV-06080 and INV-06097.
- Mistake: It looked at INV-05834 (taxable client CL-0080) and fetched its lessons and attendance, but stopped without checking whether its lines were correct.
- Mistake: It found a sign of a missed-student error: in LS-043645, ST-0223 was 'missed' and not invoiced. It did not follow this up across the invoices of other clients (CL-0156, CL-0193).
- Mistake: It submitted final_result after checking only about 4 invoices in detail out of roughly 390, instead of systematically pulling lines, lessons and attendance for all of them and recomputing each line.

### small-wrong_invoices-1

**Tool calling: passed.** The agent pulled all 37 non-void October 2026 invoices, then the lessons, attendance and client taxability behind every line. It recomputed the charges and named four overcharged invoices with their amounts, and these matched the expected answer exactly. ($0.30, 10 requests, 10.7 min)
- Right: Queried unpaid, paid and void statuses separately for sent dates 2026-10-01 to 2026-10-31, which confirmed no void invoices needed excluding.
- Right: Fetched every invoice's lines and every referenced lesson and attendance record, re-batching after hitting the 100-id limit on get_lessons/list_attendance.
- Right: Fetched each client's is_taxable flag, which caught INV-00162: CL-0014 is non-taxable but line LS-001133 charged 863 tax.
- Right: Spotted the duplicated line for LS-001226 in INV-00158 (4050 overcharge).
- Right: Found that INV-00172's LS-001295 line was billed at 6500 net against the usual 6000, giving the 600 total overcharge.
- Right: Found the 6000 overcharge in INV-00176.
- Mistake: The first get_lessons/list_attendance batch held about 115 ids and was rejected for exceeding the 100-id limit, wasting one round of calls.
- Mistake: No reasoning or working was shown for the four findings. Only the final rows were given, so the per-invoice recomputation cannot be checked from the transcript.

### large-correction-2

**Tool calling: passed.** The agent set Yara Baker's 7 Oct lesson attendance to missed and voided INV-06372. It then reissued the invoice today with the three remaining lessons (17100 total), which was auto-paid from released credit. The resulting changes match the expected answer exactly. ($0.015, 6 requests, 37 s)
- Right: Fetched the invoice, lessons, attendance and settings before changing anything, and confirmed the lesson ID for 2026-10-07 (LS-045235) and its pricing.
- Right: Did the steps in the order requested: update_attendance to 'missed', then void_invoice dated 2026-11-13, then create_invoice dated 2026-11-13.
- Right: Kept the cancelled_chargeable/missed_chargeable lesson LS-045914 on the reissued invoice, since it is still billable.
- Right: Gave a correct summary stating the new invoice total of £171.00 and that it was auto-paid from released credit.
- Mistake: Searching for 'Yara Baker' with search_clients returned client Freya Baker (the payer), not the student. The agent relied on the invoice lines to identify ST-0332 and did not separately confirm the student record. This was harmless here, but the check was thin.

### large-record_payment-1

**Tool calling: passed.** The agent found client CL-0294, listed her unpaid invoices and her allocations, then recorded a 50126p payment dated 2026-11-13. It allocated 37626 to INV-02840 (oldest due) and 12500 to INV-03247, which exactly matched the expected changes. ($0.012, 5 requests, 33 s)
- Right: Identified the client by name via search_clients and pulled unpaid invoices sorted by due date.
- Right: Checked existing allocations with list_allocations so the amount still owed on INV-02840 was used (37626 rather than the full 58778).
- Right: Applied the payment oldest-due-first: it cleared INV-02840 and put the remaining 12500 on INV-03247, leaving no unallocated credit.
- Right: Made a single correct record_payment call dated today and gave a concise summary.
- Mistake: The list_allocations result was truncated (364 more characters), so the prior allocations on INV-02840 were not fully visible in the transcript. The agent did not page or filter by invoice to confirm the remaining 37626 before writing. The figure turned out right, but this was not explicitly verified.
- Mistake: It did not check for any existing unallocated credit or the ledger before allocating. This was harmless here.
