---
title: "GLM 5.3 on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 80%, code mode 100%; rank 10 of 20."
canonical: https://models.pydantic.dev/models/glm-5.3/accounting_platform/
---

# GLM 5.3 on Pydantic AI Accounting

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

| Mode         | Score | Tasks passed | Cost   | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ------ | -------- | ---------- | -------- |
| Tool calling | 80%   | 8 of 10      | $11.23 | 177      | 769        | 66.1 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed **18 of 20** runs: **10/10 in code mode** and **8/10 with tools**. Both failures came from tool calling on large-dataset audit tasks (`large-missed_billed-1`, `large-wrong_invoices-1`), and both were tagged `incomplete_data`. Total cost was **$11.23 with tools** and **$1.47 in code mode**, for 177 and 157 requests respectively.

#### Where it does well

- **Small lookups and writes are efficient in both modes.** `small-invoice_total-1`, `small-owed_on_invoices-1`, `large-record_payment-1` and `large-correction-2` each took 2–7 requests and cost at most $0.034.
- **It follows business rules correctly:**
  - It voids with today's date.
  - It keeps `missed_chargeable` lessons billable.
  - It counts only allocations with `released_on` None.
  - It pays oldest-due invoices first.
- **It handles tax and margin details.** Both tutor-margin cases matched the expected figures (120741, 65045), including correct handling of non-taxable clients on gross-priced lessons.
- **In code mode it verifies its own work.** It cross-checked margins against invoice lines and PO-0041, tested its rounding against sample lines, and caught a self-introduced INV-06108 transcription error before answering.

#### Mistakes it makes

- **It drops filters when paging (tools).** It repeatedly called `list_invoices` with only `{"page":N}`, which returned 2025 data. This cost about 30 calls in `large-wrong_invoices-1` and also appeared in `large-duplicate_lines-1` and `large-missed_billed-1`.
- **Its audit strategy is incomplete (tools).**
  - In `large-wrong_invoices-1` it found only the 3 tax-on-non-taxable errors and missed 9 others, because it never recomputed lines against lessons.
  - In `large-missed_billed-1` it relied on an attendance `invoiced` flag instead of matching invoice lines, and found 1 of 3 invoices.
- **It makes unneeded calls.** Examples include `list_payment_orders` for margins, around 60 `get_client` calls that found nothing, ledger queries, and repeated `list_lessons` calls.
- **It writes sandbox bugs (code mode).** These were small and recoverable: exceeding the 100-nested-call limit (in 4 cases), hitting the suspension budget, a wrong field name (`attendance` vs `status`), a missing `fractions` module, a shadowed `next`, and a missing import.
- **It relies on truncated output.** In `large-record_payment-1` it used a cut-off allocations result without re-querying. The figure happened to be right.

#### Tool calling compared with code mode

On small tasks the two modes are close in accuracy and cost, and tools are sometimes slightly cheaper (e.g. invoice_total $0.0074 vs $0.0098). On large scans code mode is clearly better:

| Case                    | Tools                   | Code mode           |
| ----------------------- | ----------------------- | ------------------- |
| large-duplicate_lines-1 | pass, 59 req, $4.56     | pass, 13 req, $0.07 |
| large-missed_billed-1   | **fail**, 23 req, $1.70 | pass, 20 req, $0.13 |
| large-wrong_invoices-1  | **fail**, 44 req, $3.54 | pass, 49 req, $0.78 |

In code mode the model paged and recomputed every line systematically, which is exactly what the tool-calling runs skipped. Its code-mode errors cost extra calls but never a wrong answer.

For bulk audits, use code mode. Simple lookups work fine in either mode.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent called get_invoice for INV-00084 once, read the stored total of 89700 pence, and returned it. That matched the expected answer. ($0.0074, 2 requests, 3 s)
- Right: It used the shortest route: a single get_invoice call followed by final_result.
- Right: It took the invoice's own total field, which includes tax, and did not recompute the figure.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007, listed two unpaid invoices (39452 and 49315), checked allocations (one unreleased allocation of 3563 on INV-00155, none on INV-00192) and answered 39452+49315-3563 = 85204, which matches the expected answer. ($0.010, 4 requests, 8 s)
- Right: Filtered invoices by status unpaid and got both invoices in a single page.
- Right: Checked allocations for each invoice and confirmed the one allocation had released_on None before subtracting it.
- Right: Arithmetic was correct: 39452 - 3563 + 49315 = 85204.
- Right: Used the minimum number of calls, with no wasted steps.

### large-tutor_margin-3

**Tool calling: passed.** The agent found tutor TU-002, listed October 2026 lessons, pulled attendance, settings and client taxability, and returned 120741 pence, which matches the expected answer. ($0.15, 6 requests, 3.6 min)
- Right: Looked up the tutor by name and listed lessons over 2026-10-01 to 2026-10-31, including both ends of the range.
- Right: Fetched attendance for all lessons, including the extra IDs (e.g. LS-044870, LS-045379), so missed and cancelled cases could be filtered out.
- Right: Got settings (20% tax) and checked client is_taxable, which matters for net-of-tax revenue on gross-priced lessons (e.g. LS-046214, LS-046914, LS-047575 are gross).
- Right: The final figure matches the expected 120741.
- Mistake: Called list_payment_orders for TU-002, which is not needed: tutor pay comes from per-lesson tutor_rate, and lessons count by the date they took place, not by payment order.
- Mistake: Fetched 18 client records one by one. Taxability only changes the net amount for gross-priced lessons, so most of these lookups were unnecessary.
- Mistake: Re-fetched six lessons with get_lessons that had already come back in list_lessons, probably to check details cut off in the shortened output. This was redundant but harmless.
- Mistake: No calculation is shown in the transcript, so the answer cannot be checked step by step from the record.

### small-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor Kai Iyer and listed his October 2026 lessons and their attendance. It checked each client's tax status and then submitted 65045 pence, which matches the expected margin. ($0.069, 6 requests, 1.7 min)
- Right: It searched for the tutor and fetched the settings before working anything out.
- Right: It listed lessons for TU-001 with a date range covering all of October (2026-10-01 to 2026-10-31).
- Right: It pulled attendance for all 39 lessons in one batched call.
- Right: It checked is_taxable for all seven clients involved, which matters because CL-0030 and CL-0037 are not taxable and their gross-priced lessons are not reduced by tax.
- Right: The final answer of 65045 matches the expected value.
- Mistake: The list_payment_orders call was unnecessary: margin is worked out per lesson from tutor_rate, and the agent did not use the payment orders.
- Mistake: The computation itself is not shown anywhere in the transcript, so the arithmetic cannot be checked step by step. The answer is correct, though.

### large-duplicate_lines-1

**Tool calling: passed.** The agent listed October 2026 invoices, then called get_invoice on each non-void one to look for repeated (lesson, student) lines. It returned INV-06060, INV-06073 and INV-06097, which matches the expected answer. ($4.56, 59 requests, 13.6 min)
- Right: Went through the invoice details line by line, the only way to find duplicate lesson/student lines, since the list view shows no lines.
- Right: Covered the late-sent October invoices (INV-06145 to INV-06154, sent 3 to 7 October) as well as the 1 October batch.
- Right: The final answer matches the expected set exactly.
- Mistake: Early in the run it called list_invoices with {"page":2}, {"page":3} and {"page":4} over and over without the sent_from/sent_to filter. These returned June/July 2025 invoices (INV-001xx to INV-003xx) and were repeated about ten times, which wasted many calls.
- Mistake: It then jumped straight to pages 59 to 62 instead of using the date-filtered query with pagination, so the paging was inefficient and possibly guesswork.
- Mistake: It called get_settings and list_attendance for INV-05761, which this question did not need.
- Mistake: Since the middle of the transcript is cut, it cannot be confirmed that every October invoice was checked, though the correct result suggests coverage was enough.

### large-missed_billed-1

**Tool calling: failed.** The agent listed October 2026 invoices, then pulled attendance for every September lesson (LS-041722 to LS-044678) to look for students marked 'missed' who were still invoiced. It answered only INV-05846 and missed INV-05821 and INV-06080. ($1.70, 23 requests, 16.9 min)
- Right: It saw that the October invoices cover lessons from September and limited the attendance scan to that range.
- Right: It noticed the 'invoiced: True' flag on 'missed' attendance rows (for example LS-044224, ST-0088, CL-0065) as the way to spot the anomaly.
- Right: It fetched the void invoices separately and kept them out of the answer.
- Mistake: Its final answer lists only INV-05846, missing INV-05821 and INV-06080. It never got the invoice lines and checked each (lesson_id, student_id) line against attendance status 'missed'. Doing that systematically, for example by calling get_invoice on candidates or mapping each flagged row's client to their October invoice, would have found all three.
- Mistake: It relied on the 'invoiced' flag in attendance. That flag may not mark every case: a line can sit on a valid invoice while the flag reads otherwise. Matching invoice lines to attendance directly is the reliable check.
- Mistake: It wasted many calls: repeated unfiltered list_invoices pages 2–4 (three times over), an unneeded list_lessons with end 2026-10-31, list_ledger_entries called several times though the question needs no ledger data, and a list_lessons call on out-of-range page 447.
- Mistake: No reasoning or cross-check is visible before final_result. It went from the last attendance batch straight to one ID without confirming which invoices held the flagged lines.

### large-wrong_invoices-1

**Tool calling: failed.** The agent looked for wrongly charged October 2026 invoices. It found only the three where a non-taxable client had been charged tax (INV-05851, INV-06016, INV-06105) and missed the other nine expected overcharges, which came from other pricing errors. ($3.54, 44 requests, 17.2 min)
- Right: It fetched the settings and the October invoice list with the sent_from/sent_to filter.
- Right: It spotted non-taxable clients (CL-0097, CL-0270, CL-0361) whose invoices carried tax. It confirmed the bad lines with get_invoice and list_attendance, and its overcharge figures for those three (1050, 1150, 1875) match the expected answer.
- Mistake: It repeatedly called list_invoices with only {"page":N}, dropping the date filter. Each call returned the same 2025 pages, about 30 wasted calls, and it never visibly retrieved page 3 of the October list with the filter.
- Mistake: It never checked the invoice lines against the lesson records (charge_type, rate, length, attendance, split counts, net/gross). So it missed overcharges from wrong rates, durations, split shares, uncharged 'missed' students, or non-billable lessons. Examples are INV-05791 (600), INV-05821 (4875), INV-05846 (11700) and INV-06097 (9900).
- Mistake: It then made about 60 get_client calls on taxable clients, which produced nothing, instead of pulling get_invoice lines for every October invoice and recomputing each line.
- Mistake: It fetched INV-06145 (sent 3 Oct) but did not recompute its lines against the lessons.

### small-wrong_invoices-1

**Tool calling: passed.** The agent fetched every October 2026 invoice, the lessons and attendance behind each line, and every client's taxable flag. It found four invoices that charge the wrong amount (a duplicated line, tax charged to a non-taxable client, a wrong rate, and a charge for an unbilled lesson), and its answer matched the expected one exactly. ($1.14, 23 requests, 11.7 min)
- Right: Listed the October invoices with sent dates 2026-10-01 to 2026-10-31 and opened each one to see its lines.
- Right: Checked each client's is_taxable flag with get_client. This caught INV-00162, which charges 863 tax on one line for non-taxable client CL-0014.
- Right: Spotted the duplicated LS-001226 line on INV-00158 (4050 overcharge).
- Right: Fetched lessons and attendance in bulk with get_lessons and list_attendance, which let it check charge rates (INV-00172's 6500 line against 6000, a 600 overcharge) and lesson statuses or attendance (INV-00176, a 6000 overcharge).
- Right: Checked the list of void invoices to make sure none of the October ones needed leaving out.
- Mistake: Called list_lessons about ten times, most of them repeats returning the same page 1 data (end 2026-09-30, end 2026-11-13, no filter). This was wasteful and gave nothing new.
- Mistake: Fetched clients and lessons for every invoice rather than narrowing down first. This was thorough but used a lot of calls.

### large-correction-2

**Tool calling: passed.** The agent marked ST-0332 as missed on LS-045235, voided INV-06372 dated today, and reissued an invoice (INV-06548) for the three remaining October lessons totalling 17100. Credit paid it automatically and the result matched the expected changes. ($0.027, 5 requests, 46 s)
- Right: It fetched the invoice, settings and attendance before acting, and confirmed that LS-045235 was the 2026-10-07 lesson for ST-0332.
- Right: It voided INV-06372 with today's date, 2026-11-13, as the handbook requires.
- Right: It reissued the invoice with only the three remaining lessons and kept LS-045914, which is missed_chargeable and still billable.
- Right: Its summary was accurate: total 17100, due 2026-11-27, auto-paid from released credit, leaving 5700 unallocated credit (22800 - 17100).
- Mistake: It ran search_clients for 'Yara' when the target was the student Yara Baker, not a client. The call returned unrelated clients and added nothing, but it was harmless.

### large-record_payment-1

**Tool calling: passed.** The agent recorded Jane Kelly's 50126p payment dated 2026-11-13. It allocated 37626 to INV-02840, which cleared that invoice, and the remaining 12500 to INV-03247, matching the expected changes exactly. ($0.020, 5 requests, 29 s)
- Right: Found the client (CL-0294) with search_clients, then listed her unpaid invoices in due-date order.
- Right: Called list_allocations to work out what was still owed on the oldest invoice (58778 total less earlier allocations, leaving 37626) rather than assuming the full total was outstanding.
- Right: Applied the payment oldest due date first: 37626 to INV-02840 and the remaining 12500 to INV-03247, with nothing left as unallocated credit.
- Right: Used a single record_payment call dated today, and its summary correctly states the 12504 still owed on INV-03247.
- Mistake: The list_allocations result was cut off (364 more characters), yet the agent relied on it to get the 37626 balance for INV-02840 without re-querying, for example by filtering by invoice. The figure turned out to be right, but checking it would have been safer.
- Mistake: It did not check for existing unallocated credit or released allocations before allocating. This did not affect the result here.
