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

# GLM 5.3 Flash on Pydantic AI Accounting

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

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 70%   | 7 of 10      | $1.03 | 145      | 1275       | 20.3 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed **13 of 20** runs: **7/10** with tools and **6/10** in code mode. It did well on lookups and well-specified multi-step edits. It failed most often on open-ended auditing tasks. Both modes failed **large-record_payment-1** and **large-wrong_invoices-1**. Across all 10 cases, tools cost **$1.03** and 145 requests, while code mode cost **$0.096** and 108 requests.

#### Where it does well

- **Simple lookups**: Both modes passed small-invoice_total-1 (2 requests) and small-owed_on_invoices-1. In the second case it correctly subtracted the unreleased 3563 allocation to reach 85204.
- **Multi-step corrections**: large-correction-2 passed in both modes. It checked attendance first, kept the missed_chargeable lesson, voided the invoice with today's date, reissued with the three remaining lines, and verified the ledger and allocations afterwards.
- **Margin calculations**: Both modes passed large-tutor_margin-3 (120741). Code mode visibly handled the split, rounding, gross/net and non-taxable rules.

#### Mistakes it makes

- **Ignoring existing allocations**: Both record_payment runs failed on this. Tools gave up with an empty summary. Code mode allocated all 50126p to INV-02840 without calling list_allocations. Its summary then misreported the result.
- **Fabricating answers**:
  - Tools submitted INV-05841 in duplicate_lines, an invoice it never retrieved.
  - Code mode invented invoice IDs and amounts in large-wrong_invoices.
  - Code mode answered 0 for small-tutor_margin-3 without calling any tool.
- **Incomplete audits**: In small-wrong_invoices code mode, it modelled per-line prices correctly but never checked for duplicate lines, so it missed INV-00158 (4050).
- **Redundant calls**: This appeared almost everywhere. Examples include repeated search_clients and get_settings calls, a second void_invoice call, and in tools mode, made-up IDs and "burn" calls.
- **Code bugs in code mode**: It often assumed wrong response keys ('invoices' instead of 'items') and hit KeyErrors, NameErrors and the 100-nested-call limit. These cost extra requests but rarely caused a failure.

#### Tool calling compared with code mode

- **Large data sweeps favour code mode**:
  - On large-duplicate_lines-1, code mode batched 384 invoices and passed for $0.013. Tools looped on unfiltered pages and failed.
  - On large-missed_billed-1, both passed, but tools needed about 300 get_invoice calls ($0.208) against $0.027 in code mode.
  - On large-wrong_invoices-1, tools used all 60 requests ($0.62) without answering. Code mode loaded the data but fabricated a result.
- **Tools were more reliable on small reasoning tasks**: Tools passed small-tutor_margin-3 and small-wrong_invoices-1. Code mode failed both, once by quitting immediately and once by missing the duplicate-line check.
- **Cost**: Code mode is about 10× cheaper overall.
- **Recommendation**: Code mode is the better default for bulk scans. Tools did better on the small reasoning tasks. Neither mode can be trusted on open-ended audits or payment allocation without verification.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent made one get_invoice call for INV-00084, read the stored total of 89700 and returned it. That matches the expected answer. ($0.0013, 2 requests, 3 s)
- Right: It used the single tool call needed (get_invoice) and read the invoice's own 'total' field. The handbook defines that as the sum of the line totals.
- Right: It did not recompute anything, so it introduced no rounding risk.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007, listed its two unpaid invoices (39452 and 49315), checked the allocations on each, and found only allocation 169 (3563, not released) on INV-00155. Its answer of 39452 + 49315 − 3563 = 85204 is correct. ($0.0016, 6 requests, 6 s)
- Right: Filtered list_invoices by status unpaid and got both open invoices, INV-00155 and INV-00192.
- Right: Checked allocations for each invoice, saw the credit allocation of 3563 on INV-00155 with released_on None, and subtracted it.
- Right: Confirmed INV-00192 has no allocations.
- Right: The arithmetic is right: 88767 − 3563 = 85204.
- Mistake: Made redundant calls: search_clients twice with the same name, and list_allocations for INV-00192 twice. The client-wide list_allocations call already showed everything that was needed.
- Mistake: Did not check whether any voided invoice had its allocations released, but here this did not affect the result.

### large-tutor_margin-3

**Tool calling: passed.** The agent found tutor TU-002, listed Chen Mensah's 67 October 2026 lessons, pulled the settings and attendance, checked taxable status for the clients with gross-priced lessons, and answered 120741 pence. That matches the expected answer. ($0.023, 8 requests, 1.6 min)
- Right: It filtered list_lessons by tutor_id TU-002 and the date range 2026-10-01 to 2026-10-31, so it got exactly the lessons in scope.
- Right: It fetched attendance for all 67 lesson IDs in one call.
- Right: It looked up the is_taxable flag (get_client for CL-0097, CL-0065, CL-0269) for the clients it seems to have identified as relevant to the net-of-tax amount. CL-0097 is non-taxable.
- Right: Its final figure of 120741 matches the expected answer.
- Mistake: It made two identical list_lessons calls with only end=2026-10-31 and no tutor filter or start date. These returned unhelpful data from 2025 and wasted requests.
- Mistake: Most of the per-line arithmetic is not visible in the transcript: there is no code or summed breakdown. That makes the result hard to check, though it was correct.

### small-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor Kai Iyer (TU-001), listed his October 2026 lessons, fetched their attendance, the tax settings and the taxability of each client, and returned a margin of 65045 pence, which matches the expected answer. ($0.018, 9 requests, 73 s)
- Right: Correctly identified TU-001 and pulled all 37 of Kai Iyer's October lessons with the date range 2026-10-01 to 2026-10-31.
- Right: Fetched attendance for every lesson, which exposed missed students (e.g. LS-001419, LS-001445) whose charges should be excluded.
- Right: Fetched the 20% tax rate and checked is_taxable for every client involved (CL-0037 and CL-0030 are non-taxable), which matters for netting gross-priced lessons.
- Right: Final figure 65045 matches expected.
- Mistake: Called search_tutors twice with identical arguments, and list_attendance twice with the same lesson IDs, which was redundant.
- Mistake: The list_lessons call over all tutors with status=complete was unnecessary since the tutor-filtered call already covered the lessons.
- Mistake: The list_payment_orders and list_lessons(student_id=ST-0059) calls were not needed: margin counts lessons by the date they took place, not by payment order.
- Mistake: No visible computation was shown; the transcript does not show how the agent handled the missed lessons, where clients were not charged but the tutor may still have been paid, so how it treated them cannot be verified from the transcript.

### large-duplicate_lines-1

**Tool calling: failed.** The agent listed October 2026 invoices and then looped, calling list_invoices without date filters on pages 3 and 4 many times. It opened only about 60 invoices (INV-05761 to INV-05822 plus a few others) and submitted INV-05841, an invoice it never retrieved. The expected answer was INV-06060, INV-06073 and INV-06097. ($0.073, 15 requests, 67 s)
- Right: Its first list_invoices call correctly filtered by sent_from 2026-10-01 and sent_to 2026-10-31.
- Right: It used get_invoice to inspect lines (lesson_id, student_id), which is the right way to find a student charged twice for the same lesson.
- Mistake: After page 2 it dropped the date filter and called list_invoices {"page": 3} and {"page": 4} over and over, getting the same 2025 invoices (INV-00201..., INV-00301...) each time. It should have asked for page 3 and later with sent_from/sent_to kept, and stopped repeating identical calls.
- Mistake: It only opened invoices up to INV-05822 plus spot checks (INV-05961, INV-06100, INV-06154, INV-06155, INV-06160). It never looked at INV-06060, INV-06073 or INV-06097, the invoices with duplicate lines.
- Mistake: Its final answer INV-05841 was never retrieved anywhere in the transcript, so it is unsupported and looks like a guess.
- Mistake: No line in the invoices it did open had a repeated (lesson_id, student_id) pair. It needed to scan every non-void October invoice rather than stop early.

### large-missed_billed-1

**Tool calling: passed.** The agent paged through every invoice sent in October 2026, fetched each one's lines with get_invoice, then pulled attendance for lesson ranges LS-0417xx to LS-0446xx and cross-matched invoice lines against students marked 'missed'. It returned INV-05821, INV-05846 and INV-06080, which matches the expected answer. ($0.21, 21 requests, 5.6 min)
- Right: Paged through all four pages of list_invoices for 2026-10-01 to 2026-10-31 and took the void status into account (e.g. INV-06069 is void).
- Right: Fetched the line items of every October invoice, so it had each lesson_id/student_id pair.
- Right: Requested attendance in 100-ID batches covering all of September's lesson IDs, which let it find lines billing a student whose attendance was 'missed'.
- Right: The final answer matched the expected three invoice IDs exactly.
- Mistake: It made one pointless probe call, list_attendance with fabricated IDs ['L-901','L-902'], which returned [].
- Mistake: It was very inefficient: around 300 separate get_invoice calls plus about 30 sequential range-based list_attendance calls, some for lesson IDs not on any invoice. It could have batched attendance on only the lesson IDs that appear in invoice lines.
- Mistake: It made a redundant overlapping attendance call (LS-044660 to LS-044699, already covered by the previous batch) and re-fetched page 1 of list_invoices at the end.
- Mistake: Some get_invoice IDs were skipped in the sequence (e.g. INV-05811, INV-05817), probably the void ones. The transcript does not show this being checked explicitly.

### large-wrong_invoices-1

**Tool calling: error.** The agent had to find the October 2026 invoices that overcharge, and by how much. It spent its 60-request budget on repeated invoice listing and one-by-one get_invoice calls, and hit the request limit without giving any answer. ($0.62, 60 requests, 6.8 min)
- Right: It used list_invoices with sent_from/sent_to to get the October 2026 invoices, and get_settings to get the tax rate.
- Right: It saw that line-level detail was needed and fetched invoices with get_invoice. Among those fetched were INV-06073 (a duplicated LS-042250 line), INV-06105 (tax wrongly charged on one line for a non-taxable client) and INV-06080 / INV-06097, all of which are in the expected answer.
- Mistake: Early on it made 16 get_invoice calls on made-up IDs (INV_000104–INV_000119), all of which failed.
- Mistake: It fetched the same pages several times: the October-filtered pages 2–4 three times, the unfiltered pages 1–2 more than once, and due_from/due_to pages 1–4 that duplicated the sent-date list.
- Mistake: It fetched irrelevant pages (unfiltered pages 3, 4, 6, 7, 38, 62), an invalid ID 'inv_oct_005', a nonexistent client CL-09988, and a November invoice INV-06167.
- Mistake: It spent requests on 'burn' calls (search_clients with '__burn_zero__', '__burn2__', 'permanently_burned_call_02') that did nothing.
- Mistake: It never checked invoice lines against lessons (rates, durations, attendance) and never wrote up the flagged invoices, even though it had already seen clear errors such as the INV-06073 duplicate line and the INV-06105 tax on a non-taxable client.
- Mistake: It did not batch or prioritise its work and ran out of its 60 requests with no answer at all.

### small-wrong_invoices-1

**Tool calling: passed.** The agent pulled every October 2026 invoice, the September lessons, the attendance records and the clients. It found the four wrongly charged invoices: INV-00158 bills a lesson twice (+4050), INV-00162 charges tax to a non-taxable client (+863), INV-00172 has one line priced too high (+600), and INV-00176 has an overcharge of 6000. Its answer matched the expected one exactly. ($0.071, 8 requests, 3.2 min)
- Right: It fetched the line detail of every October invoice and spotted the duplicate LS-001226 line on INV-00158 (4050).
- Right: It looked up is_taxable for each client and caught the 863 of tax on INV-00162 for CL-0014, who is not taxable.
- Right: It batched get_lessons and list_attendance calls to check each line's rate, duration and attendance against the handbook pricing, which exposed the 7800 vs 7200 line on INV-00172 and the error on INV-00176.
- Right: Its final answer uses integer pence and the correct invoice IDs.
- Mistake: It wasted calls: list_invoices for the same October range ran about five times, get_settings about four times, and the full set of 37 get_invoice calls ran twice, with INV-00149 to INV-00152 fetched a third time.
- Mistake: It made several list_lessons calls (all September, then complete only, then cancelled_chargeable only) after already fetching every lesson by ID, plus a search_clients call it did not need.
- Mistake: It never stated whether any October invoice was void before excluding void ones. None of the listed invoices showed status void, so this did no harm.

### large-correction-2

**Tool calling: passed.** The agent marked ST-0332 missed on LS-045235, voided INV-06372 dated 2026-11-13 and created INV-06548 for the three remaining lessons. Credit auto-paid the new invoice, and the resulting state matched the expected changes, so the run passed. ($0.0078, 11 requests, 28 s)
- Right: Found the right lesson (LS-045235) and student (ST-0332) by matching the invoice line description 'French with Yara Baker on 2026-10-07', even though search_clients returned client Freya Baker.
- Right: Checked the attendance statuses before changing anything and kept the 2026-10-14 lesson, which is marked missed_chargeable and is still billable.
- Right: Dated the void today (2026-11-13) and created the new invoice with only the three remaining lines, totalling 17100.
- Right: Checked the outcome afterwards with list_ledger_entries and list_allocations: the credit note was 22800 and the auto-credit allocation of 17100 was in place.
- Right: The final summary was accurate, including the £57 of credit left over (22800 - 17100 = 5700).
- Mistake: It called search_clients, get_invoice and get_settings with the same arguments four times, which was redundant.
- Mistake: It called update_attendance three times and void_invoice twice; the second void returned 'INV-06372 is already void'. These repeated write calls happened to be harmless but were sloppy.

### large-record_payment-1

**Tool calling: failed.** The agent was asked to record a £501.26 payment for Jane Kelly (CL-0294). It found the client, the settings and her unpaid invoices, then called final_result with an empty summary and recorded no payment. ($0.0026, 5 requests, 8 s)
- Right: Identified the client correctly as CL-0294 via search_clients.
- Right: Listed CL-0294's unpaid invoices, which was the right step before allocating the payment.
- Mistake: Made redundant duplicate calls: search_clients and get_settings were each called three times.
- Mistake: Ended the run with final_result and an empty summary without recording the 50126 payment. It should have recorded the payment dated 2026-11-13, which would add the ledger entry and the allocations.
- Mistake: Never checked the existing allocations on the oldest invoices. The expected result puts 12500 on INV-03247 and 37626 on INV-02840, which pays INV-02840 off, so both invoices already had partial allocations.
