---
title: "Claude Fable 5.1 on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 80%; rank 2 of 32."
canonical: https://models.pydantic.dev/models/claude-fable-5.1/accounting_platform/
---

# Claude Fable 5.1 on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 90%, code mode 80%; rank 2 of 32.
>
> Markdown copy of https://models.pydantic.dev/models/claude-fable-5.1/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>`
- Any other question about the models: `GET https://models.pydantic.dev/api/ask?query=<question>`

Add `intent=<intent>&stack=<stack>&harness=<harness>` to the query string of all but the single model. An `OPTIONS` request to any endpoint returns its schema. The same five 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.1.md

| Mode         | Score | Tasks passed | Cost   | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ------ | -------- | ---------- | -------- |
| Tool calling | 90%   | 9 of 10      | $17.30 | 81       | 642        | 17.0 min |
| Code mode    | 80%   | 8 of 10      | $1.50  | 61       | 51         | 3.2 min  |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gateway/anthropic:claude-fable-5-1` passed 17/20 runs: 9/10 in `tools` and 8/10 in `code_mode`. All three failures were broad wrong-invoice audits; there were no provider failures. It handled focused accounting questions and authorized changes reliably in this sample, but exhaustive audits need stronger completeness checks.

#### Where it does well

Both modes passed all eight other case types, giving 16/16 successes outside the wrong-invoice audits. They correctly recorded the `50126` payment, allocated it oldest due date first, and replaced a paid `22800` invoice with a `17100` invoice funded from released credit.

Both margin tasks passed in both modes. The large code calculation explicitly handled billable statuses, chargeable attendance, split prices, client taxability, per-line half-up rounding, and tutor pay once per lesson. Focused duplicate and missed-attendance searches also succeeded in both modes.

#### Mistakes it makes

The large tools audit inspected only 67/384 non-void invoice details and returned 3/12 errors after diversions into November invoices and cancelled lessons.

Both code audits omitted duplicate-line detection: their expected totals included every existing line, so a correctly priced duplicate appeared valid. They returned 9/12 large-case errors and 3/4 small-case errors. This contrasts with the successful dedicated duplicate search, which explicitly used `Counter((lesson_id, student_id))`.

Three large code searches initially misunderstood pagination and exceeded the 100-call-per-snippet limit. They recovered, sometimes repeating completed reads. Two small code runs contained the same pagination mistake but had only one page. The tools missed-attendance search successfully relied on generated consecutive lesson IDs, an assumption that would be fragile on other data.

#### Tool calling compared with code mode

Code mode used 61 requests versus 81 and cost $1.5007 versus $17.3043—about 91% less. Savings were concentrated in bulk inspection: duplicate detection cost $0.1179 versus $5.1167, and missed-attendance detection $0.1927 versus $5.7861.

Code mode improved retrieval coverage and exposed reproducible calculations, but did not improve overall accuracy. Its audit logic systematically omitted a required invariant. Tools mode passed the small comprehensive audit but failed to finish the large one.

## Runs

### small-invoice_total-1

**Tool calling: passed.** Correctly returned `89700` pence for `INV-00084`, including tax. ($0.086, 2 requests, 5 s)
- Right: Used one `get_invoice(invoice_id="INV-00084")` call and returned its `total`.
- Right: The record showed `74752` net plus `14948` tax, matching `89700`.

**Code mode: passed.** Correctly returned `89700` pence from `INV-00084`. ($0.089, 2 requests, 4 s)
- Right: A single `run_code` called `get_invoice` and exposed the returned record.
- Right: Returned the tax-inclusive `total`, matching `74752 + 14948`.

### small-owed_on_invoices-1

**Tool calling: passed.** Correctly calculated Emeka Brown’s unpaid-invoice debt as `85204` pence. ($0.093, 4 requests, 7 s)
- Right: `search_clients` resolved `CL-0007`; `list_invoices(status="unpaid")` returned totals of `39452` and `49315`.
- Right: `list_allocations` supplied the active `3563` allocation to `INV-00155`; the answer equals `39452 + 49315 - 3563`.
- Right: Did not subtract allocations belonging to older, paid invoices.

**Code mode: passed.** Correctly returned `85204` pence still owed on Emeka Brown’s unpaid invoices. ($0.097, 3 requests, 5 s)
- Right: Resolved `CL-0007`, then retrieved unpaid invoices and allocations in one snippet.
- Right: The final result correctly subtracts only the relevant active allocation: `39452 + 49315 - 3563 = 85204`.

### large-tutor_margin-3

**Tool calling: passed.** Correctly returned Chen Mensah’s October margin of `120741` pence. ($0.42, 5 requests, 44 s)
- Right: `search_tutors` resolved `TU-002`; `list_lessons` returned `75` October lessons.
- Right: Retrieved attendance for `67` billable lessons and checked client taxability with `get_client` for `CL-0097`, `CL-0065`, and `CL-0269`.
- Right: Returned the exact expected margin without relying on invoice dates.

**Code mode: passed.** Correctly calculated `360316 - 239575 = 120741` pence margin across `67` billable lessons. ($0.086, 3 requests, 13 s)
- Right: Used `list_lessons` with inclusive October dates and pagination based on `pages`.
- Right: Filtered billable lesson statuses and chargeable attendance, divided split prices by charged-student count, and used `Decimal` with `ROUND_HALF_UP`.
- Right: Removed included tax only for taxable clients and calculated tutor pay once per billable lesson.
- Right: Completed in `3` requests costing `$0.086`.

### small-tutor_margin-3

**Tool calling: passed.** Correctly returned Kai Iyer’s October margin of `65045` pence. ($0.24, 5 requests, 29 s)
- Right: `search_tutors` resolved `TU-001`; `list_lessons` returned `39` lessons.
- Right: Fetched attendance for `37` billable lessons and checked taxability for the relevant gross-priced clients with `get_client`.
- Right: Returned the exact expected result using lesson records and the `20` percent tax setting.

**Code mode: passed.** Correctly calculated `187435 - 122390 = 65045` pence margin for `37` billable lessons. ($0.086, 4 requests, 15 s)
- Right: Filtered lesson and attendance statuses, fetched client taxability, and separated gross-price tax from revenue.
- Right: Applied `ROUND_HALF_UP` through its `rhu` helper and paid tutors once per billable lesson.
- Mistake: The second snippet’s pagination condition checked `has_more`, `total_pages`, and `next_page`, but the response used `pages`. It happened to retrieve everything because there was only one page.
- Mistake: The calculation used floating-point arithmetic before `Decimal(str(x))`; this produced the correct result here, but using `Decimal` throughout would avoid intermediate precision risk.

### large-duplicate_lines-1

**Tool calling: passed.** Correctly identified all three invoices containing duplicate student–lesson lines. ($5.12, 11 requests, 3.2 min)
- Right: Fetched all four `list_invoices` pages and all `384` non-void invoices through `get_invoice`, in seven batches of `50` and one of `34`.
- Right: Found duplicate pairs `LS-044150`/`ST-0461`, `LS-042250`/`ST-0483`, and `LS-044126`/`ST-0515` on `INV-06060`, `INV-06073`, and `INV-06097`.
- Mistake: The exhaustive retrieval exposed all invoice details to the model: `388` tool calls and `$5.1167`, compared with `$0.1179` for the successful code run.

**Code mode: passed.** Recovered from pagination and tool-limit mistakes, then correctly found all three duplicate-line invoices. ($0.12, 8 requests, 18 s)
- Right: Eventually fetched all `384` non-void invoice details.
- Right: Used `Counter((l['lesson_id'], l['student_id']) for l in d['lines'])` and selected counts greater than `1`.
- Right: Returned `INV-06060`, `INV-06073`, and `INV-06097`.
- Mistake: The first snippet checked nonexistent `has_more` and `next_page` fields and stopped at `100` invoices; the second corrected this using `r['pages']`.
- Mistake: The third snippet looped over all invoices inside one `run_code`, exceeding its `100` nested-call limit despite batches of `50`.
- Mistake: Recovery reset `details = {}` and refetched the first `100` invoices instead of retaining completed reads. It should have bounded each snippet’s total calls and resumed from stored results.

### large-missed_billed-1

**Tool calling: passed.** Correctly returned `INV-05821`, `INV-05846`, and `INV-06080` as billing students marked `missed`. ($5.79, 20 requests, 4.5 min)
- Right: Retrieved all `394` October invoice headers and used `30` attendance calls to inspect September lessons.
- Right: `get_invoice` confirmed the offending lines for `LS-044224`, `LS-041761`, and `LS-043071`.
- Mistake: After reading only the first and last September `list_lessons` pages, constructed consecutive lesson IDs between `LS-041722` and `LS-044678`. This worked for this dataset but assumed identifiers were contiguous.
- Mistake: The run used `20` requests and `$5.7861`, including additional historical invoice searches and `16` further invoice-detail checks after confirming the three matches.

**Code mode: passed.** Recovered from retrieval errors and correctly matched billed lines to all three students marked `missed`. ($0.19, 10 requests, 25 s)
- Right: Fetched `384` non-void invoices and attendance for `2655` distinct invoiced lessons.
- Right: Built an attendance lookup keyed by `(lesson_id, student_id)` containing `3148` records.
- Right: Checked for missing joins, found none, and returned exactly `INV-05821`, `INV-05846`, and `INV-06080`.
- Mistake: The first snippet stopped after page one because it checked `has_more`/`next_page` instead of `pages`; recovery unnecessarily fetched page one again.
- Mistake: The third snippet exceeded the `100` nested-call limit. Recovery discarded `details` and repeated the first `100` invoice reads before splitting subsequent work across snippets.

### large-wrong_invoices-1

**Tool calling: failed.** Returned only three of the twelve incorrect invoices, all tax errors. The nine omitted invoices included wrong rates, missed attendance, and duplicate lines. ($3.16, 14 requests, 4.6 min)
- Right: Retrieved all four October invoice pages.
- Right: Correctly identified non-taxable-client overcharges of `1050` on `INV-05851`, `1150` on `INV-06016`, and `1875` on `INV-06105`.
- Mistake: The audit fetched only `67` invoice details out of `384` non-void invoices and lesson pricing for only `10` lesson IDs before returning a complete-looking answer.
- Mistake: After the initial targeted checks, fetched all four November invoice pages and investigated cancelled September lessons without completing the October invoice audit.
- Mistake: The final answer omitted `INV-05791:600`, `INV-05821:4875`, `INV-05846:11700`, `INV-05877:750`, `INV-06017:500`, `INV-06060:3563`, `INV-06073:4500`, `INV-06080:4050`, and `INV-06097:9900`. It should have checked every non-void invoice against lesson prices, attendance, taxability, and unique student–lesson pairs.

**Code mode: failed.** Audited all non-void invoices but returned only nine of twelve errors because its calculation counted duplicate lines as legitimate charges. ($0.38, 16 requests, 55 s)
- Right: Eventually retrieved `384` invoices, `2655` lessons with attendance, and `384` clients.
- Right: Used `Decimal` and `ROUND_HALF_UP` for line pricing and tax.
- Right: Correctly reported six pricing/tax errors and three missed-attendance overcharges.
- Mistake: The first snippet used unsupported pagination fields; later snippets corrected coverage.
- Mistake: Invoice retrieval and client retrieval each exceeded the `100` nested-call limit. Invoice recovery also discarded and repeated `90` completed reads.
- Mistake: In the main audit snippet, `for ln in d['lines']` followed by `exp_total += tot` priced every duplicate again. There was no uniqueness check on `(lesson_id, student_id)`, so it missed `INV-06060:3563`, `INV-06073:4500`, and `INV-06097:9900`.
- Mistake: The same snippet appended notes for non-chargeable attendance but still added its calculated price to `exp_total`. The final answer manually used the three missed-line amounts after a follow-up inspection; the calculation should instead exclude those lines.

### small-wrong_invoices-1

**Tool calling: passed.** Correctly identified all four incorrect invoices and their exact overcharges. ($2.23, 9 requests, 2.7 min)
- Right: Retrieved all `37` invoice details, all `315` September lessons across four pages, and attendance for `280` lesson IDs.
- Right: Detected the duplicate `LS-001226`/`ST-0016` line on `INV-00158`, worth `4050`.
- Right: Also returned `INV-00162:863`, `INV-00172:600`, and `INV-00176:6000`, covering tax, pricing, and missed-attendance errors.
- Mistake: Used a broad `search_clients(name="")` call even though invoice headers already contained client IDs, and retrieved all September lessons rather than just invoiced lesson IDs.
- Mistake: The successful audit cost `$2.228` across `9` requests.

**Code mode: failed.** Correctly found three overcharges but omitted the duplicate-line overcharge on `INV-00158`. ($0.24, 6 requests, 27 s)
- Right: Retrieved all `37` invoice details, `280` referenced lessons, attendance, and client taxability.
- Right: Correctly calculated `INV-00162:863`, `INV-00172:600`, and `INV-00176:6000`.
- Right: Used `ROUND_HALF_UP` and excluded non-billable lines with `continue`.
- Mistake: In the fourth snippet, the audit iterated over every existing invoice line and added its expected price without checking duplicate `(lesson_id, student_id)` pairs. This treated the extra `LS-001226`/`ST-0016` line as valid and missed `4050` on `INV-00158`.
- Mistake: The final verification inspected only the three detected issues. It should also have checked line multiplicity before concluding the audit.
- Mistake: The initial pagination loop used nonexistent `has_more`/`next_page` fields; the single-page dataset prevented an additional omission.

### large-correction-2

**Tool calling: passed.** Correctly changed Yara Baker’s attendance, voided `INV-06372`, and created paid replacement `INV-06548` for `17100` pence. ($0.072, 5 requests, 12 s)
- Right: `get_invoice` identified `LS-045235` and `ST-0332`; `list_attendance` confirmed the original attendance.
- Right: Called `update_attendance(status="missed")`, `void_invoice(date="2026-11-13")`, then `create_invoice` with the three remaining lessons.
- Right: The resulting changes correctly released `22800`, applied `17100` credit, and set the replacement due date to `2026-11-27`.
- Mistake: At initial retrieval, `search_clients(name="Yara Baker")` was redundant because `get_invoice` supplied the client and student identifiers.

**Code mode: passed.** Correctly performed the attendance correction, void, and reissue, producing the same required changes as tools mode. ($0.080, 4 requests, 12 s)
- Right: Checked attendance, lesson details, settings, and the original `22800` allocation.
- Right: Sequentially awaited `update_attendance`, `void_invoice`, and `create_invoice` in the third `run_code` call.
- Right: Verified the new invoice’s `17100` credit allocation with `list_allocations`; the replacement was paid and due `2026-11-27`.
- Mistake: The first snippet’s `search_clients` lookup duplicated identity information already available through `get_invoice`.

### large-record_payment-1

**Tool calling: passed.** Correctly recorded Jane Kelly’s `50126` pence payment and allocated it oldest due date first. ($0.11, 6 requests, 15 s)
- Right: `search_clients` resolved `CL-0294`; `list_invoices` and `list_allocations` established that `INV-02840` still owed `58778 - 21152 = 37626`.
- Right: `record_payment` allocated `37626` to `INV-02840` and `12500` to `INV-03247`, dated `2026-11-13`.
- Right: Correctly reported `INV-02840` paid, `12504` still owed on `INV-03247`, and no leftover payment credit.
- Mistake: Before recording, made an additional `list_ledger_entries` call; the invoice and allocation records already supported the allocation calculation.

**Code mode: passed.** Correctly recorded `50126` pence for `CL-0294`, clearing the oldest invoice and partially paying the next. ($0.13, 5 requests, 16 s)
- Right: Retrieved unpaid invoices and allocations together in one snippet.
- Right: `record_payment` created `LE-013560` dated `2026-11-13`, allocating `37626` to `INV-02840` and `12500` to `INV-03247`.
- Right: Correctly reported the remaining `12504` debt on the second invoice.
- Mistake: The third snippet fetched recent ledger entries although the existing invoice and allocation results were sufficient to calculate the payment split.
