---
title: "Gemini 4 Carbon on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 100%; rank 2 of 20."
canonical: https://models.pydantic.dev/models/gemini-4-carbon/accounting_platform/
---

# Gemini 4 Carbon on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 100%; rank 2 of 20.
>
> Markdown copy of https://models.pydantic.dev/models/gemini-4-carbon/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/gemini-4-carbon.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 90%   | 9 of 10      | $9.05 | 68       | 867        | 82.1 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed **19 of 20** runs: 9/10 with normal tool calling and 10/10 in code mode. The only failure was **large-wrong_invoices-1** in tools mode, which hit the 1200 s wall-clock limit without submitting an answer. Total cost was about $10.08, and **$9.05 of that came from tools mode**, against $1.03 for code mode.

#### Where it does well

- **Write tasks run in the correct order.** In large-correction-2, both modes updated attendance to missed, voided INV-06372 dated 2026-11-13, and then reissued an invoice for the three remaining lessons. The released credit was reported correctly: 22800 released, 17100 applied, 5700 left over. In large-record_payment-1, both modes allocated 50126p oldest due date first (37626 then 12500) and matched the expected records exactly.
- **It applies the handbook rules correctly.** This covers half-up rounding, gross/net tax, non-taxable clients, chargeable attendance statuses, and excluding void invoices. Both tutor_margin cases and both wrong_invoices passes depended on this.
- **Simple lookups are cheap.** small-invoice_total-1 took 2 requests for under $0.02.
- **Code mode verifies its own answers.** In the tutor-margin cases it cross-checked tutor pay against payment orders (239575, 122390) and client net against summed invoice lines.

#### Mistakes it makes

- **Brute-force fetching in tools mode.** It made serial get_invoice calls across hundreds of invoices and paged through 30 pages of September lessons it never used. This produced the timeout in large-wrong_invoices-1 and the high costs of large-missed_billed-1 ($3.69) and large-duplicate_lines-1 ($1.51).
- **No partial answer when time ran out.** In the failed run it had already confirmed overcharges on INV-05851, INV-06016 and INV-06105, but it submitted nothing.
- **Unneeded calls.** Examples include list_payment_orders in the tools tutor_margin runs, get_settings and list_lessons in duplicate_lines, and fetching void invoices it was about to exclude.
- **Code mode trips its own limits.** It exceeded the 100 nested-call cap in four runs (both large scan cases, large-wrong_invoices-1 and small-wrong_invoices-1). It also hit a suspension limit once and raised a TypeError once. It recovered every time by batching, at the cost of extra rounds.
- **Unauditable arithmetic in tools mode.** For both tutor_margin cases the transcript does not show how the final figure was calculated.

#### Tool calling compared with code mode

|          | Tools | Code mode |
| -------- | ----- | --------- |
| Passed   | 9/10  | 10/10     |
| Requests | 68    | 84        |
| Cost     | $9.05 | $1.03     |

On small cases and write tasks the two modes perform about the same. On large scans, code mode is far cheaper and more reliable:

| Case            | Tools         | Code mode                                                      |
| --------------- | ------------- | -------------------------------------------------------------- |
| missed_billed   | $3.69         | $0.12                                                          |
| duplicate_lines | $1.51         | $0.10                                                          |
| wrong_invoices  | failed, $2.50 | passed, $0.28 (20 requests), all 12 overcharged invoices found |

Code mode uses slightly more requests because it loses rounds to failed calls. For bulk audit-style work, code mode is the better choice.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent called get_invoice for INV-00084, read the stored total of 89700 pence and returned it. That matches the expected answer. ($0.018, 2 requests, 13 s)
- Right: It used the single tool call needed (get_invoice) and read the 'total' field directly instead of recomputing it.
- Right: It returned the answer as an integer number of pence, as the handbook requires.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007 and listed their unpaid invoices INV-00155 (39452) and INV-00192 (49315) along with their allocations. It subtracted the only unreleased allocation on an unpaid invoice (3563 on INV-00155) to get 85204, which matches the expected answer. ($0.023, 3 requests, 32 s)
- Right: Fetched unpaid invoices and allocations in parallel, which kept the request count to a minimum.
- Right: Subtracted only the allocations on the unpaid invoices that had no released_on date: allocation 169 for 3563 on INV-00155. It left out the allocations on the other, paid invoices.
- Right: Arithmetic is correct: 39452 - 3563 + 49315 = 85204.
- Right: The answer was given as an integer in pence, as the handbook requires.

### large-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor TU-002 and listed the October 2026 lessons and their attendance. It checked a few clients' tax status and invoice lines against its rule-based cost calculations, then submitted 120741, which matches the expected answer. ($0.23, 7 requests, 3.6 min)
- Right: Found tutor TU-002 and pulled the settings (20% tax rate) at the start.
- Right: Fetched attendance for all 67 October lessons in one list_attendance call.
- Right: Checked invoice lines (e.g. INV-06194 lines of 1313 and 1750 for hourly_split Spanish) to confirm split rounding and net amounts, and checked is_taxable for gross-pricing cases such as non-taxable CL-0097.
- Right: Final answer 120741 matches the expected value.
- Mistake: The calculation of per-lesson charges and the margin sum is not shown in the transcript; the answer appears straight away after the invoice checks, so the arithmetic cannot be audited.
- Mistake: The list_payment_orders call for TU-002 was not needed, since tutor pay comes from per-lesson tutor rates; this was a wasted call.
- Mistake: Some invoice lookups were only spot-checks rather than systematic verification (e.g. CL-0044 was checked, but not every gross or non-taxable client).

### small-tutor_margin-3

**Tool calling: passed.** The agent found tutor TU-001, listed the October 2026 lessons and their attendance, and checked the client taxable flags. It looked at two November invoices to confirm the net amounts on gross-priced lines, then answered 65045, which matches the expected answer. ($0.20, 7 requests, 6.9 min)
- Right: Used list_lessons with the tutor and an inclusive Oct 1–31 range, then fetched attendance for all 39 lessons in one call.
- Right: Counted lessons by the date they took place rather than relying on invoice status.
- Right: Checked is_taxable for every client involved. This matters for gross lessons: for non-taxable CL-0037, the net is the full cost (LS-001398 net 5500), while for taxable CL-0002 the net is reduced (LS-001408 net 4687).
- Right: Used existing invoice lines (INV-00220, INV-00187) to confirm how net amounts are worked out.
- Mistake: The calculation was never shown in the transcript, so the final figure cannot be traced. The answer is correct, but the margin working should have been laid out.
- Mistake: The list_payment_orders call was not needed, since the tutor pay comes from tutor_rate per lesson. Its result does not seem to have been used.

### large-duplicate_lines-1

**Tool calling: passed.** The agent listed all October 2026 invoices over four pages and fetched each one with get_invoice, several hundred calls in all, including the void ones. It checked the lines for repeated (lesson_id, student_id) pairs and returned INV-06060, INV-06073 and INV-06097, which matches the expected answer. ($1.51, 10 requests, 15.1 min)
- Right: Paged through list_invoices with sent_from/sent_to covering the whole of October 2026, which also picked up the later invoices INV-06145 to INV-06154 sent between 3 and 10 October.
- Right: Fetched the line detail of each invoice, which is the only way to see repeated lesson/student lines.
- Right: Left out void invoices such as INV-06069, INV-05811 and INV-06085, as the question asked.
- Right: Answered in the expected ids format with no extra invoices.
- Mistake: It called get_settings and list_lessons for September 2026, but neither was needed to find duplicate lines. These were wasted calls.
- Mistake: It fetched the void invoices (INV-05811, INV-05817, INV-06096, etc.) by get_invoice even though list_invoices already showed them as void and they were to be excluded.

### large-missed_billed-1

**Tool calling: passed.** The agent listed the October 2026 invoices and pulled every September lesson with its attendance to find lines where the student was marked 'missed' but still had invoiced=True. It then checked candidate invoices with get_invoice and answered INV-05821, INV-05846 and INV-06080, which matches the expected answer. ($3.69, 9 requests, 19.9 min)
- Right: It worked out that October invoices bill September lessons, so it listed the September lessons (30 pages) and batched list_attendance calls over all of them.
- Right: It used the attendance 'invoiced' flag to spot anomalies: for example, LS-044224 / ST-0088 (CL-0065) was 'missed' with invoiced=True, and that lesson appears on INV-05821.
- Right: It confirmed the candidates with get_invoice. INV-05821 has a line for LS-044224, and INV-05846 and INV-06080 also contain the flagged lessons.
- Right: It handled void invoices: it checked INV-05811 (void) against its reissue INV-06146 and looked at the other reissued October invoices (INV-06145 to INV-06154) to make sure they were not affected.
- Mistake: The agent did a lot of extra fetching. It re-listed the September invoices (3 pages plus a stray page-4 call) and pulled the credit-note ledger entries, neither of which the answer needed.
- Mistake: It fetched about 10 reissued invoices (INV-06145 to INV-06154) one at a time, when it could simply have checked whether the flagged lesson IDs appeared on them.

### large-wrong_invoices-1

**Tool calling: error.** The agent set out to find overcharged October 2026 invoices by listing all of them, paging through about 30 pages of September lessons and then opening every invoice one at a time. It ran out of the 1200 s wall-clock limit before giving any answer. ($2.50, 9 requests, 20.0 min)
- Right: It read the settings and listed October invoices with sent_from/sent_to filters.
- Right: It found real anomalies early. INV-05851, INV-06016 and INV-06105 charge tax to non-taxable clients, which matches expected rows of 1050, 1150 and 1875.
- Right: It checked attendance on LS-044399 and found that the student was marked missed, so that lesson should not have been charged.
- Mistake: After finding the tax-on-non-taxable pattern it did not reason about other error types or move to a targeted check. Instead it brute-forced every invoice.
- Mistake: It fetched about 30 pages of September lessons (list_lessons pages 1–30) without using them in any visible analysis, wasting time.
- Mistake: It then called get_invoice serially on every October invoice (INV-05769 onward). This could not finish within the time limit.
- Mistake: It never wrote down partial findings, even though it had already confirmed several overcharges (INV-05851, INV-06016, INV-06105, and INV-05821's 4875 line was looked at). As a result nothing was submitted.

### small-wrong_invoices-1

**Tool calling: passed.** The agent pulled every October 2026 invoice, all clients, all September lessons and their attendance. It checked them against the handbook rules and found four overcharged invoices. Its answer matched the expected rows exactly and the run passed. ($0.74, 10 requests, 9.8 min)
- Right: Called get_settings and list_invoices filtered to sent dates 2026-10-01..2026-10-31, then get_invoice for every invoice from INV-00149 to INV-00185, so it had line-level detail.
- Right: Fetched every client's is_taxable flag, which let it spot INV-00162 (CL-0014, not taxable) charging 863 tax on the LS-001133 line, and INV-00176 (CL-0030, not taxable).
- Right: Pulled September lessons and attendance so it could check rates and charged students. This caught the duplicate LS-001226 line on INV-00158 (4050) and the wrong rate on the LS-001295 line on INV-00172 (7800 vs 7200 = 600).
- Right: Looked at earlier and later invoices (list_invoices before 2026-09-30 and from 2026-11-01) to rule out lessons being billed twice across invoices.
- Mistake: Fairly heavy on tool calls: fetched all 39 clients and all four lesson pages, plus extra invoice lists and INV-00050/INV-00148. Some of these, such as INV-00050 and the November list, likely added little.
- Mistake: Because the agent's reasoning is not visible, the transcript does not show how it worked out the INV-00176 overcharge of 6000. Its correctness can only be inferred from the match with the expected answer.

### large-correction-2

**Tool calling: passed.** The agent marked Yara Baker missed for LS-045235, voided INV-06372 dated 2026-11-13, and reissued a new invoice (INV-06548) for the three remaining October lessons, which was auto-paid from released credit. The resulting changes matched the expected answer exactly. ($0.072, 6 requests, 79 s)
- Right: Before changing anything, it pulled the invoice, client, settings, lessons and attendance to confirm what was on INV-06372.
- Right: It did the steps in the right order: update_attendance to 'missed' first, then void_invoice dated 2026-11-13, then create_invoice dated 2026-11-13.
- Right: The reissued invoice contained only the original lines minus LS-045235. It correctly left out the November lessons (LS-047906, LS-048556), which fall outside the original invoice's scope.
- Right: Its summary was consistent with the records: 22800 was released, 17100 was applied to the new invoice, and 5700 remained as unallocated credit.
- Mistake: It made some unneeded lookups (list_lessons, list_invoices, list_allocations) that did not affect the outcome. This was minor waste only.

### large-record_payment-1

**Tool calling: passed.** The agent found Jane Kelly (CL-0294), read her invoices, allocations and ledger, and recorded a 50126p payment dated 2026-11-13. It allocated 37626p to clear INV-02840 and put 12500p towards INV-03247, oldest due date first. The resulting changes match the expected answer and the run passed. ($0.054, 5 requests, 4.6 min)
- Right: Converted £501.26 to 50126 pence correctly and dated the payment today, 2026-11-13.
- Right: Pulled invoices and allocations before recording, so it could work out the outstanding amounts.
- Right: Applied the payment oldest due date first: 37626p remaining on INV-02840 (due 2026-02-15), then the remaining 12500p to INV-03247 (due 2026-03-15).
- Right: Used a single record_payment call with explicit allocations, which matched the expected allocation records exactly.
- Mistake: No substantive mistakes. The list_ledger_entries call added little, since the allocation figures came from list_invoices and list_allocations, but it did no harm.
