---
title: "Gemini 4 Argon 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-argon/accounting_platform/
---

# Gemini 4 Argon 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-argon/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-argon.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 90%   | 9 of 10      | $5.41 | 68       | 742        | 46.0 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 tools and 10/10 in code mode. Its only failure was **large-wrong_invoices-1** with tools, which timed out after 1200 s without giving an answer. Total cost was **$5.41 with tools** and **$0.74 in code mode**. Request counts were similar: 68 with tools and 77 in code mode.

#### Where it does well

- **Targeted lookups and writes are reliable and cheap in both modes.** small-invoice_total, small-owed_on_invoices, large-record_payment and large-correction-2 each took 2–5 requests and cost about $0.02–0.04.
- **It applies domain rules correctly:**
  - converting £501.26 to 50126p
  - allocating payments oldest-due-first while accounting for existing part-payments
  - counting only unreleased allocations
  - reading "missed, without charge" as `missed`, not `missed_chargeable`
  - doing void → reissue in the right order, dated today
- **Code mode shows its work and checks it.** In both tutor_margin cases it used Decimal half-up rounding and handled net vs gross tax. It cross-checked client net totals against invoice lines and confirmed that 360316 and 187435 matched. In large-wrong_invoices it fixed a wrong taxability guess by fetching each client's real `is_taxable` flag.

#### Mistakes it makes

- **Inefficient or ad hoc data gathering with tools.**
  - large-missed_billed used about 30 lesson pages plus about 30 attendance batches.
  - large-wrong_invoices drifted into void replacements, November invoices and credit notes.
  - It never output partial findings, even though it had found INV-05851, 06016, 06105 and 05821.
- **Pagination bugs in code mode.** In 4 cases its loops checked `has_more`/`total_pages`, but the API returns `pages`. This only worked out by luck or after re-checking.
- **Hitting the 100 nested-call limit.** In 4 code-mode runs it tried to fetch everything in one `run_code` call. It recovered by batching each time.
- **Unneeded calls.** All four tutor_margin runs fetched `list_payment_orders` and never used it.
- **Weak verification.**
  - Neither correction run confirmed that ST-0332 was Yara Baker after the search returned Freya Baker.
  - Tool-mode tutor_margin runs show no arithmetic, so the results cannot be audited.

#### Tool calling compared with code mode

On small tasks the two modes perform about the same. On large audit-style tasks, code mode is much better:

| Case                    | Tools             | Code mode                       |
| ----------------------- | ----------------- | ------------------------------- |
| large-duplicate_lines-1 | $0.92             | $0.07                           |
| large-missed_billed-1   | $1.85             | $0.08                           |
| large-wrong_invoices-1  | **failed**, $1.79 | passed (all 12 invoices), $0.17 |
| small-wrong_invoices-1  | $0.45             | $0.13                           |

Code mode uses a few more requests, mostly to recover from call-limit and pagination errors. In exchange it computes results in code, with explicit rounding and cross-checks. For bulk reconciliation, code mode is the clear choice. For simple lookups and writes, either mode works.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent called get_invoice for INV-00084 and returned its recorded total of 89700 pence, which matched the expected answer. ($0.017, 2 requests, 8 s)
- Right: It went straight to get_invoice and used the stored invoice total (89700), which is the right source for an issued invoice's total.
- Right: It answered in pence as an integer, in the required format, using only two calls.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007 and listed their unpaid invoices (INV-00155 total 39452, INV-00192 total 49315) along with their allocations. It subtracted the one unreleased allocation on INV-00155 (3563) and answered 85204, which matches the expected answer. ($0.021, 3 requests, 22 s)
- Right: Looked up the client's ID with search_clients before querying invoices and allocations.
- Right: Filtered list_invoices by status 'unpaid' and got both open invoices in one call.
- Right: Fetched allocations and subtracted only those on unpaid invoices that had no released_on date: allocation 169 of 3563 on INV-00155. That gives (39452-3563)+49315 = 85204.
- Right: Ignored allocations on invoices already paid (INV-00005, INV-00065, INV-00073, INV-00114).
- Right: Used only three tool calls with no wasted steps.

### large-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor TU-002, pulled the settings, listed the October 2026 lessons and their attendance, checked three clients and the tutor's payment orders, then submitted 120741. This matches the expected answer. ($0.19, 5 requests, 2.9 min)
- Right: It pulled all of TU-002's lessons for 2026-10-01 to 2026-10-31 in one list_lessons call.
- Right: It fetched attendance for all 75 lessons in a single list_attendance call.
- Right: It checked is_taxable for some clients (CL-0097 is not taxable), which matters because the margin is net of tax and gross-priced lessons need tax stripped out.
- Right: The final figure 120741 matches the expected answer.
- Mistake: The transcript shows no calculation step. The agent did the margin arithmetic over about 75 lessons in its head and answered straight away, which is hard to verify and risky.
- Mistake: It only looked up three clients' is_taxable flags. This was enough here, but it suggests it may not have checked every gross-priced lesson's clients systematically.
- Mistake: Calling list_payment_orders was unnecessary because margin is worked out per lesson from tutor_rate. It did no harm.

### small-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor Kai Iyer, listed his October 2026 lessons, pulled attendance and each client's taxable status, checked his payment orders, and answered a margin of 65045 pence, which matches the expected answer. ($0.11, 6 requests, 1.7 min)
- Right: Filtered lessons by tutor TU-001 and the date range 2026-10-01 to 2026-10-31, so lessons counted by the date they took place.
- Right: Fetched attendance for all 39 lessons, which covers both invoiced and uninvoiced ones, as the handbook says lessons count whether or not invoiced.
- Right: Checked is_taxable for each client (CL-0030 and CL-0037 are not taxable), which matters for working out net revenue on gross-priced lessons.
- Right: Ran get_settings to get the 20% tax rate needed to strip tax from gross-priced lessons.
- Right: Reached the correct figure of 65045.
- Mistake: The list_lessons result was truncated in the transcript (about 7600 more characters) and the agent never checked for further pages. It got the right answer, so the data was evidently complete, but it did not confirm this.
- Mistake: Calling list_payment_orders was unnecessary: the margin uses the per-lesson tutor_rate, and the payment order totals were not needed.
- Mistake: The arithmetic was done with no visible working, so the result cannot be audited from the transcript.

### large-duplicate_lines-1

**Tool calling: passed.** The agent listed all October 2026 invoices over 4 pages and fetched each non-void invoice with get_invoice, roughly 390 calls. It then returned INV-06060, INV-06073 and INV-06097 as the invoices with duplicate (lesson, student) lines, which matches the expected answer. ($0.92, 10 requests, 5.0 min)
- Right: Used the sent_from/sent_to filters on list_invoices to get exactly the October 2026 invoices across all pages.
- Right: Appears to have skipped void invoices (e.g. INV-05811, INV-05817 and INV-06144 are missing from the get_invoice calls), which follows the 'leaving out void ones' instruction.
- Right: Checked every invoice's line items, which is the only way to find duplicate lesson+student pairs, and got the exact set right.
- Mistake: The list_lessons call for September 2026 was never used and wasted a request.
- Mistake: Fetching hundreds of invoices one by one was costly, though probably unavoidable with these tools. The transcript does not show how the duplicates were spotted; most of it is elided.

### large-missed_billed-1

**Tool calling: passed.** The agent pulled every September 2026 lesson (30 pages) and their attendance, found attendance rows marked 'missed' but flagged invoiced=True, and traced them to three October invoices. It confirmed the invoice lines with get_invoice and returned INV-05821, INV-05846 and INV-06080, which matches the expected answer. ($1.85, 9 requests, 8.9 min)
- Right: Read 'missed, without charge' correctly as the 'missed' status, not 'missed_chargeable'.
- Right: Used the invoiced flag in list_attendance to find the anomalies, e.g. LS-044224 / ST-0088 (CL-0065) with status 'missed' and invoiced=True.
- Right: Looked up each affected client's October invoices with list_invoices filtered by client and checked their lines with get_invoice. INV-05821 has a line for LS-044224 / ST-0088.
- Right: Paged through all October invoices, which showed void ones such as INV-06069, so voided invoices could be left out.
- Mistake: Very costly approach: 30 list_lessons pages and about 30 list_attendance batches of 100 lesson IDs each. Querying attendance by the lessons on October invoices, or filtering by status, could have been cheaper.
- Mistake: One list_attendance batch included a malformed ID '-LS-041984', a small sloppiness that did no harm.
- Mistake: After settling on the answer it made 10 extra get_invoice calls (INV-06145 to INV-06154) on later-dated invoices without saying why. This was likely a check that late or re-issued invoices had no missed lines, but it was not explained.
- Mistake: It only looked at September lessons. It did not check whether October invoices (for example re-issued ones) billed earlier lessons. The answer was right, so this did not matter here.

### large-wrong_invoices-1

**Tool calling: error.** The agent started auditing October 2026 invoices by pulling the invoice lists, many individual invoices, and attendance for every September lesson in batches of 100. It never compiled findings into an answer and the run timed out after 1200 s. ($1.79, 20 requests, 20.0 min)
- Right: Spotted early, via get_invoice, that INV-05851, INV-06016 and INV-06105 charged tax to non-taxable clients. These three are in the expected answer (1050, 1150 and 1875).
- Right: Found INV-05821, where line LS-044224 had attendance 'missed' but was still invoiced. This is in the expected answer.
- Right: Found LS-043071, a 45-minute lesson billed for INV-06080, and LS-041761, a 1.5-hour lesson billed for INV-05846. Both are among the expected discrepancies.
- Right: Recognised void invoices and their reissued replacements (e.g. INV-05811 and INV-06146) and left the void ones out.
- Mistake: It checked line by line through individual tool calls: dozens of get_invoice calls plus about 17 list_attendance batches covering every lesson ID from LS-0430xx to LS-044678. This used up the 1200 s budget, and no answer was ever produced.
- Mistake: It spent time on void invoices and their replacements (INV-05817/06154, 05959/06147, and others). Those were excluded from the question, and the replacements were sent on later dates and mostly correct.
- Mistake: It also listed November invoices and credit notes, which is outside the October scope and wasted time.
- Mistake: It never wrote out partial findings. Even an incomplete list (INV-05851, 06016, 06105, 05821) would have been better than a timeout.
- Mistake: It did not take a systematic route: fetch all lines of the October invoices, fetch the lessons and attendance they reference, then recompute each line in one pass. Instead it worked ad hoc and lost time.

### small-wrong_invoices-1

**Tool calling: passed.** The agent pulled every October 2026 invoice, all September lessons with their attendance, and each client's tax status. It then recomputed the invoice lines and found four overcharged invoices, and its answer matches the expected one exactly. ($0.45, 5 requests, 6.0 min)
- Right: Called get_settings and listed October invoices with sent_from/sent_to filters, so it had the 20% tax rate and the full set of invoices.
- Right: Fetched the line detail for every invoice (INV-00149 to INV-00185) and paged through all four pages of September lessons to get charge types, rates and net/gross pricing.
- Right: Fetched is_taxable for every client, which exposed INV-00162: non-taxable client CL-0014 was charged 863 tax on LS-001133.
- Right: Used attendance records to check the lines against lessons. This caught INV-00158's duplicated LS-001226 line (4050) and INV-00176 (non-taxable CL-0030, 6000), where the agent's reasoning isn't visible.
- Right: Batched list_attendance calls with about 100 lesson IDs each, which kept the number of requests down.
- Mistake: The run was broad and costly: about 37 get_invoice and 37 get_client calls on top of the lesson pages. This was justified for a full audit, but the transcript shows no explicit cross-check or reasoning between gathering the data and calling final_result.

### large-correction-2

**Tool calling: passed.** The agent set Yara Baker (ST-0332) to missed on LS-045235, voided INV-06372 dated 2026-11-13 and created a new invoice INV-06548 for the other three lessons, totalling 17100. Its changes match the expected state and the run passed. ($0.030, 4 requests, 23 s)
- Right: It fetched INV-06372 first, which confirmed the client (CL-0234, Freya Baker), the student ST-0332 and the lesson LS-045235 for 2026-10-07 without extra searches.
- Right: It ran the steps in the right order: update attendance, then void, then reissue.
- Right: It dated both the void and the new invoice 2026-11-13 (today).
- Right: The new invoice held only the three remaining lessons, LS-045914, LS-046583 and LS-047246. The released credit was applied automatically and the new invoice showed as paid.
- Right: It used few tool calls.
- Mistake: search_clients for 'Yara Baker' returned Freya Baker. The agent did not check that the student belonged to this client, but the invoice lines confirmed ST-0332 was Yara, so no harm was done.
- Mistake: It did not check the lesson's existing status before marking the student missed. It worked out because LS-045235 was on the invoice.

### large-record_payment-1

**Tool calling: passed.** The agent found Jane Kelly (CL-0294), listed her unpaid invoices and her allocations, then recorded a 50126p payment dated 2026-11-13. It allocated 37626 to clear INV-02840 and the remaining 12500 to INV-03247, oldest due date first, which matched the expected changes exactly. ($0.031, 4 requests, 31 s)
- Right: Converted £501.26 to 50126 pence correctly.
- Right: Fetched unpaid invoices and allocations in parallel, so it could work out what was still owed on the oldest invoice. INV-02840's total was 58778, and the 37626 it allocated means 21152 was already applied.
- Right: Followed the oldest-due-first rule: INV-02840 (due 2026-02-15) was settled in full, then the rest went to INV-03247 (due 2026-03-15).
- Right: Dated the payment today (2026-11-13) and finished in few calls, with a clear summary.
- Mistake: No substantive mistakes. It did not check whether the client already held unallocated credit before allocating, but this made no difference to the result.
