---
title: "Claude Fable 5.2 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/claude-fable-5.2/accounting_platform/
---

# Claude Fable 5.2 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/claude-fable-5.2/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/claude-fable-5.2.md

| Mode         | Score | Tasks passed | Cost   | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ------ | -------- | ---------- | -------- |
| Tool calling | 90%   | 9 of 10      | $12.37 | 57       | 574        | 12.3 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. Across the 10 cases, code mode cost **$1.85 for 55 requests**, while tool calling cost **$12.37 for 57 requests**. The only failure was `large-wrong_invoices-1` in tools mode.

#### Where it does well

- **Write workflows.** In `large-correction-2` and `large-record_payment-1` it read the relevant data before changing anything and followed the requested order: attendance update, then void, then reissue. It allocated payments oldest-due first, with 37626 to INV-02840 and 12500 to INV-03247. It also flagged a possible duplicate same-day payment, LE-013542.
- **Domain rules.** It handled half-up rounding per student and taxability on gross-priced lessons. It paid the tutor even on billable lessons where every student missed. It treated `missed` and `missed_chargeable` as different statuses. Both tutor-margin cases were exact (120741 and 65045).
- **Simple lookups.** `invoice_total` and `owed_on_invoices` were answered correctly in 2–3 requests.

#### Mistakes it makes

- **Incomplete audits.** In `large-wrong_invoices-1` (tools) it checked only one error type, tax charged to non-taxable clients. It found 3 of the 12 invoices and stopped. It never recomputed lines for wrong rates, wrong splits, wrong durations or charges for missed students.
- **Hitting the sandbox's 100 nested-call limit.** This happened in 4 code-mode runs (`duplicate_lines`, `missed_billed`, both `wrong_invoices`). Each time it recovered by fetching in batches, but at the cost of extra round trips.
- **Guessing response shapes.** It assumed key names, such as `invoices` instead of `items` and `attendance` instead of `status`, which caused failed calls. It also hit NameErrors after earlier crashes. In `owed_on_invoices` its pagination loop used the wrong keys, so it would have silently dropped data if there had been more than one page.
- **Hidden working in tools mode.** In both tutor-margin runs and `small-wrong_invoices-1` it jumped straight to the answer, so the result could not be checked from the transcript.
- **Minor redundant calls,** such as unneeded `get_settings` and `search_clients` calls.

#### Tool calling compared with code mode

Code mode is clearly better for large scans:

| Case                    | Tools                          | Code mode                    |
| ----------------------- | ------------------------------ | ---------------------------- |
| large-duplicate_lines-1 | $4.34 (~390 get_invoice calls) | $0.22                        |
| large-missed_billed-1   | $4.08                          | $0.19                        |
| large-wrong_invoices-1  | $1.10, **failed**              | $0.37, passed (all 12 found) |
| small-wrong_invoices-1  | $1.80                          | $0.29                        |

In tools mode, the heavy per-invoice fetching filled most of the context in `duplicate_lines`. In code mode the model recomputed every line explicitly and cross-checked totals, so its reasoning is visible.

On small or write-only cases the two modes performed about the same, with similar request counts and costs between $0.07 and $0.35.

The main cost of code mode is wasted round trips from crashes and the nested-call cap, not wrong answers.

## 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 matches the expected answer. ($0.077, 2 requests, 6 s)
- Right: It read the invoice record directly and used the stored 'total' field (89700), which the handbook defines as the sum of the line totals.
- Right: It gave the answer in integer pence, as the handbook requires.
- Mistake: The get_settings call was not needed, because the invoice record already contained its total. This cost one extra call but did no harm.
- Mistake: It did not add up the line totals to check them against the stored total. That was acceptable here because the stored total is authoritative.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found CL-0007 and pulled its invoices and allocations. It then subtracted the unreleased allocations from the two unpaid invoices, (39452−3563) + 49315 = 85204, which matches the expected answer. ($0.083, 3 requests, 9 s)
- Right: Used list_invoices and list_allocations for CL-0007 and kept only the unpaid invoices INV-00155 and INV-00192, leaving out the void and paid ones.
- Right: Subtracted the 3563 credit allocation on INV-00155 and treated INV-00192 as wholly unpaid, giving 35889 + 49315 = 85204.
- Right: Ran the calls in parallel and finished quickly.
- Mistake: Made a redundant search_clients call for 'Brown', likely to check for other clients with that surname. It cost little but was not needed.
- Mistake: Gave the bare figure without showing the per-invoice breakdown.

### large-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor TU-002, listed the 67 October lessons and their attendance, and checked three clients' taxable status. It answered 120741 pence, which matches the expected answer. ($0.35, 5 requests, 36 s)
- Right: Used the right inclusive date range, 2026-10-01 to 2026-10-31, in list_lessons for TU-002.
- Right: Fetched attendance for all 67 lessons in one list_attendance call.
- Right: Checked is_taxable on clients CL-0097, CL-0065 and CL-0269, which matters for the net amount of gross-priced lessons.
- Right: Got the correct final margin of 120741.
- Mistake: The transcript shows no working, so we can't see how the per-student rounding and split-lesson sharing were handled. The correct answer suggests the agent did them right, but it can't be checked from the transcript.

### small-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor Kai Iyer, the settings, his October 2026 lessons, their attendance and each client's taxable status, then answered with a margin of 65045 pence. This matches the expected answer. ($0.22, 5 requests, 22 s)
- Right: Fetched the tax rate (20%) with get_settings, which gross-priced lessons need.
- Right: Listed all of TU-001's lessons for 2026-10-01 to 2026-10-31 and pulled attendance for all 39 lessons in a single list_attendance call.
- Right: Checked is_taxable for every client involved (CL-0037 and CL-0030 are not taxable). This matters for working out the net amount on gross-priced lessons.
- Right: Gave a final figure that matches the expected 65045 pence.
- Mistake: The transcript shows no visible calculation: the agent went straight from the client lookups to the answer, so its per-lesson work (billable status, 'missed' students uncharged, gross tax extraction, tutor pay per hour) cannot be checked. The result is correct, but the reasoning is undocumented.

### large-duplicate_lines-1

**Tool calling: passed.** The agent paged through all October 2026 invoices and fetched each non-void one with get_invoice to look for duplicate (lesson, student) lines. It returned INV-06060, INV-06073 and INV-06097, which matches the expected answer. ($4.34, 12 requests, 3.3 min)
- Right: Listed every October invoice by walking all four pages of list_invoices with sent_from/sent_to filters.
- Right: Skipped void invoices such as INV-05811 and INV-06144, which are absent from the get_invoice calls, consistent with the question's exclusion.
- Right: Pulled each remaining invoice's lines and correctly picked out the three with a repeated lesson_id/student_id pair.
- Right: Did not mistake shared lesson_ids across different clients' invoices (e.g. LS-042661 on INV-05800, INV-05801 and INV-06109) for duplicates within one invoice.
- Mistake: Very costly approach: about 390 separate get_invoice calls, each returning a long result, consumed a large share of the context. It worked here but left little margin.

### large-missed_billed-1

**Tool calling: passed.** The agent listed October 2026 invoices and pulled attendance for every September 2026 lesson (LS-041722 to LS-044678) in batches. It found 'missed' attendance rows flagged invoiced=True, confirmed the matching invoices with get_invoice, and returned INV-05846, INV-06080 and INV-05821. The set matches the expected answer, so the run passed. ($4.08, 9 requests, 3.4 min)
- Right: Saw that October invoices bill September lessons and pulled attendance for the whole of September in batches of 100 lesson IDs.
- Right: Used the 'invoiced' flag on attendance rows to find students marked 'missed' but still charged, such as LS-044224 / ST-0088, which is marked missed with invoiced True.
- Right: Checked each candidate with get_invoice (INV-05846, INV-06080, INV-05821), confirming each holds a line for the missed student's lesson and has status 'paid', not void.
- Right: Returned exactly the expected set of three IDs.
- Mistake: It made many calls: 4 invoice-list pages plus about 30 attendance batches. The approach was thorough but heavy, and nothing shows it checked whether lessons from outside September might also have been billed on October invoices.
- Mistake: The transcript does not show the agent checking that no void October invoice (e.g. INV-06069) and no re-invoiced lesson affected the answer. It still came out correct, partly because the 'invoiced' flag already pointed at the right invoices.

### large-wrong_invoices-1

**Tool calling: failed.** The agent listed October 2026 invoices and spotted three where a non-taxable client had been charged tax (INV-05851, INV-06016, INV-06105). It checked those, then started looking at cancelled lessons and stopped, reporting only those three. The expected answer has 12 invoices. ($1.10, 6 requests, 1.6 min)
- Right: Fetched settings and all four pages of October invoices.
- Right: Correctly found tax charged to non-taxable clients on INV-05851 (1050), INV-06016 (1150) and INV-06105 (1875), and confirmed is_taxable=false with get_client.
- Mistake: It only checked one kind of error, tax on non-taxable clients, using the invoice headers. It never checked the invoice lines against the lessons for the other overcharges: wrong rate, wrong split, wrong duration, lessons marked 'missed', or tax on gross-priced lines. These are the other nine expected invoices: INV-05791, 05821, 05846, 05877, 06017, 06060, 06073, 06080 and 06097.
- Mistake: It made a start on non-billable lessons that had been invoiced: list_lessons for cancelled lessons in September and list_attendance on page 1. But it never compared the result with the invoice lines, and it answered without following up.
- Mistake: It never ran get_invoice on the other October invoices to recompute line amounts from lesson rates, durations and attendance, so most errors stayed hidden.

### small-wrong_invoices-1

**Tool calling: passed.** The agent pulled every October 2026 invoice, the lessons and attendance behind them, and each client's taxable flag. It then recomputed the invoice lines and correctly named four overcharged invoices with exact amounts, matching the expected answer. ($1.80, 5 requests, 2.1 min)
- Right: Filtered list_invoices by sent date 2026-10-01 to 2026-10-31 and fetched every non-void invoice's lines.
- Right: Batched get_lessons and list_attendance over the full lesson ID range so charge types, rates, net/gross and attendance were all available.
- Right: Checked is_taxable for every client and caught that INV-00162 (CL-0014, not taxable) wrongly charged 863 tax on LS-001133.
- Right: Found the duplicate line for LS-001226 in INV-00158 (overcharge 4050).
- Right: Found the INV-00172 line on LS-001295 billed at 6500 net / 7800 total instead of 6000 / 7200 (overcharge 600) and the INV-00176 overcharge of 6000.
- Mistake: No reasoning or working was shown. The answer jumped straight from the raw data to the final rows, so the per-invoice checks cannot be verified from the transcript.
- Mistake: Some wasted effort: it called search_clients with an empty name and then get_client for every client, when only the taxable flag was needed.

### large-correction-2

**Tool calling: passed.** The agent marked Yara Baker as missed on LS-045235 and voided INV-06372 dated 2026-11-13. It then reissued an invoice for the three remaining lessons (INV-06548, 17100), which the released credit paid in full. The run passed. ($0.15, 5 requests, 19 s)
- Right: Read the invoice, settings, client, attendance, lessons and allocations before changing anything, which confirmed the 22800 allocation would be released by the void.
- Right: Followed the order the user asked for: update_attendance to 'missed', then void_invoice dated today, then create_invoice dated today.
- Right: Correctly kept LS-045914 (cancelled_chargeable, missed_chargeable) on the new invoice, since it is still billable.
- Right: The summary correctly reports total 17100, due 2026-11-27, auto-paid from credit, and 5700 left as unallocated credit with no refund made.
- Mistake: Minor: the final list_allocations call for the whole client was not needed. Its output was truncated and the agent did not use it.

### large-record_payment-1

**Tool calling: passed.** The agent found client CL-0294 and pulled settings, invoices, allocations and ledger entries. It recorded a 50126p payment dated today, allocated oldest-due first (37626 to INV-02840, 12500 to INV-03247), which matched the expected changes exactly. The run passed. ($0.16, 5 requests, 21 s)
- Right: Resolved Jane Kelly to CL-0294 and checked the invoices, allocations, payments and refunds before acting.
- Right: Applied the payment oldest due date first, starting with INV-02840 (due 2026-02-15). It allocated 37626, the outstanding remainder of that invoice, then put the leftover 12500 on INV-03247. No unallocated credit was left.
- Right: Noticed the existing same-day payment LE-013542 of 56252, judged it a different payment because the amount differs, and said so in the summary.
- Right: Recorded the payment dated today, as the handbook requires, in a single record_payment call.
- Mistake: The INV-02840 remainder (37626) depends on allocations hidden in the truncated list_allocations result, so the transcript cannot confirm how the agent arrived at it. The figure was correct per the expected answer.
- Mistake: Minor inefficiency: three separate list_ledger_entries calls where fewer might have served, which cost nothing in the outcome.
