---
title: "Kimi K3.1 Pro 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/kimi-k3.1-pro/accounting_platform/
---

# Kimi K3.1 Pro 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/kimi-k3.1-pro/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/kimi-k3.1-pro.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 90%   | 9 of 10      | $2.78 | 67       | 575        | 23.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 cases: 9/10 with tool calling and 10/10 in code mode. Simple lookups and write workflows were reliable in both modes. The one failure was the hardest audit, `large-wrong_invoices-1`, in tools mode. Code mode was much cheaper on the large scans: $0.96 total against $2.78 for tools. It used more requests, 86 against 67.

#### Where it does well

- **Multi-step writes:** in `large-correction-2` it updated attendance, voided the invoice and reissued it (17100), in the right order. In `large-record_payment-1` it allocated a payment oldest-due-first after accounting for an earlier 21152 allocation. Both matched the expected state exactly in both modes, in 5 requests each.
- **Handbook rules:** it answered in integer pence, subtracted only unreleased allocations (85204 in `small-owed_on_invoices-1`) and checked `is_taxable` for gross-priced lessons. In code mode it used exact half-up rounding.
- **Thorough audits:** `small-wrong_invoices-1` found all four overcharge types in both modes. In `large-wrong_invoices-1`, code mode noticed that its first recompute found only 6 mismatches. It audited again and reached all 12, then cross-checked 3102 = 3102 attendance pairs.

#### Mistakes it makes

- **Stopping early:** in `large-wrong_invoices-1` (tools), it checked only tax against `is_taxable` and found 3 of 12 invoices. It fetched INV-05821, which had a duplicated line, but did not act on it, then gave up after INV-05834.
- **Unchecked pagination or ranges:** it fetched only page 1 of `list_lessons` (`large-tutor_margin-3`, code) and only page 1 of allocations (`large-record_payment-1`, code). It also guessed a lesson ID range (`large-missed_billed-1`, tools).
- **Fragile logic that passed because of the data:** in `small-tutor_margin-3` (code), it keyed attendance by lesson only and did not share split rates among students.
- **Wasted calls:** it made unused `list_payment_orders` calls in all four tutor-margin runs. It also made extra `get_client` calls and opened void invoices it did not need.
- **Weak verification:** a search for "Yara Baker" returned a different person, Freya Baker, and the model did not check this. In several runs the arithmetic is not shown in the transcript.

#### Tool calling compared with code mode

| Mode      | Passed | Requests | Cost  |
| --------- | ------ | -------- | ----- |
| tools     | 9/10   | 67       | $2.78 |
| code_mode | 10/10  | 86       | $0.96 |

On small cases the two modes cost about the same, for example $0.016 against $0.013 on `small-invoice_total-1`. Code mode pulls ahead on bulk scans:

- `large-duplicate_lines-1`: $1.19 with tools (about 400 `get_invoice` calls) against $0.065 in code mode.
- `large-missed_billed-1`: $0.80 against $0.11.

Code mode also made the full recompute in `large-wrong_invoices-1` practical, at 22 requests and $0.30.

Its extra requests mostly came from code errors:

- breaking the 100-nested-call limit (three cases)
- a `NameError` from a missing import
- a `SyntaxError` and a `TypeError`
- using `globals()`, which is not available

The model recovered from all of them. For audits over large datasets, choose code mode. For short lookups and writes, either mode works.

## Runs

### small-invoice_total-1

**Tool calling: passed.** The agent called get_invoice for INV-00084, read the stored total of 89700 pence, and returned it. The answer matched the expected value. ($0.016, 2 requests, 5 s)
- Right: Used the single relevant tool, get_invoice, and read the invoice's total field (89700) directly instead of recomputing it.
- Right: Answered in integer pence as the handbook requires, in two calls.
- Mistake: The agent did not check that the line totals add up to 89700, but the stored total is the authoritative figure, so this was harmless.

### small-owed_on_invoices-1

**Tool calling: passed.** The agent found client CL-0007 and listed its unpaid invoices (INV-00155 total 39452, INV-00192 total 49315) and its allocations. It subtracted the one unreleased allocation on an unpaid invoice (3563 on INV-00155) and answered 85204, which is correct. ($0.028, 3 requests, 39 s)
- Right: Called list_invoices with status 'unpaid' and list_allocations in parallel, which kept the run to a minimum of requests.
- Right: Picked out only allocation 169 (3563, released_on None) as applying to an unpaid invoice, and ignored the allocations on paid invoices.
- Right: Did the arithmetic correctly: 39452 - 3563 + 49315 = 85204.
- Right: Followed the handbook's rule that what is still to pay is the invoice total less its unreleased allocations, rather than using the ledger balance.

### large-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor TU-002 and the settings, listed October 2026 lessons and their attendance, and fetched client records to check taxability. It answered 120741 pence, which matches the expected answer. ($0.16, 6 requests, 2.1 min)
- Right: Called list_lessons with tutor_id TU-002 and the full date range 2026-10-01 to 2026-10-31.
- Right: Got attendance for all 67 lessons in a single list_attendance call.
- Right: Fetched client records to check is_taxable, which matters for net-of-tax revenue on gross-priced lessons.
- Right: Gave the answer in integer pence as the handbook requires.
- Mistake: Called list_payment_orders even though margin is defined by lesson date, not payment orders. The call was not needed, though it did no harm.
- Mistake: Fetched only 18 clients, while the attendance list probably covered more. The answer was correct, so either this was enough (for example, only clients on gross lessons matter) or the agent got lucky. The transcript does not show its working.

### small-tutor_margin-3

**Tool calling: passed.** The agent looked up tutor Kai Iyer and listed his October 2026 lessons with their attendance and the taxable status of each client. It then returned a margin of 65045 pence, which matches the expected answer. ($0.077, 6 requests, 1.5 min)
- Right: Fetched settings, all 39 October lessons for TU-001, and the attendance for all of them in one call.
- Right: Looked up is_taxable for every client in the lessons (CL-0037 and CL-0030 are not taxable), which matters for gross-priced lessons, where the net amount depends on tax.
- Right: Got the correct final figure, 65045.
- Mistake: Called list_payment_orders even though its result was not needed: margin comes from the per-lesson tutor_rate, and the orders cover whole months by pay date. The call was harmless but wasted.
- Mistake: None of the arithmetic is visible in the transcript. The agent reported the figure without showing any working, so the result cannot be checked from the trace.

### large-duplicate_lines-1

**Tool calling: passed.** The agent listed all October 2026 invoices across four pages, opened each non-void invoice with get_invoice, looked for repeated (lesson_id, student_id) lines, and returned INV-06060, INV-06073 and INV-06097. This matches the expected answer. ($1.19, 19 requests, 8.1 min)
- Right: Paged through all four pages of list_invoices for sent dates 2026-10-01 to 2026-10-31.
- Right: Checked the void invoice / reissue pairs (e.g. INV-05811 vs INV-06146, INV-05817 vs INV-06154). It recognised that a lesson appearing on both a void invoice and its replacement is not a duplicate to report, because void invoices are excluded.
- Right: Opened the lines of each invoice to find the same lesson_id and student_id appearing twice, as in INV-06073, where LS-042250/ST-0483 is listed twice.
- Right: Kept lines that share a lesson but belong to different clients' invoices (e.g. LS-042067 on INV-05765 and INV-05855) out of the answer, correctly treating the question as being about repeats within one invoice.
- Mistake: The approach was expensive: about 400 get_invoice calls, run in batches, with no attempt to narrow the search first. That was perhaps unavoidable with these tools, but it was costly.
- Mistake: Opening the void invoices (INV-05811, INV-05817, etc.) was not needed, since the question excludes void invoices.

### large-missed_billed-1

**Tool calling: passed.** The agent listed October 2026 invoices, pulled every September lesson and its attendance, and spotted attendance rows that were status 'missed' yet flagged invoiced: True. It confirmed three such lessons sat on non-void invoices (INV-05821, INV-05846, INV-06080) and returned exactly the expected list. ($0.80, 8 requests, 4.5 min)
- Right: Recognised that October invoices cover September lessons and pulled attendance for the whole range LS-041722 to LS-044678 in batches of 100.
- Right: Used the 'missed' + invoiced: True anomaly as the signal, which is efficient compared with fetching every invoice's lines.
- Right: Checked each candidate by calling get_invoice to confirm the lesson appears as a charged line and the invoice is not void (all three are 'paid'), and re-checked the attendance and lesson status (complete).
- Mistake: It called list_invoices for all 4 pages of October invoices and list_lessons pages 1 and 30, but went straight to attendance by guessing the ID range. Fetching the full lesson list would have been more robust, though the guessed range turned out to be complete.
- Mistake: The get_client calls for CL-0092, CL-0334 and CL-0065 added nothing to the answer.
- Mistake: It did not explicitly check whether a void invoice also charged a missed student, though the answer turned out correct.

### large-wrong_invoices-1

**Tool calling: failed.** The agent listed the October invoices. It found only the three invoices where a non-taxable client was charged tax (INV-05851, INV-06016, INV-06105) and submitted those. It missed nine others with wrong line amounts, so the answer was incomplete and failed. ($0.16, 6 requests, 2.1 min)
- Right: Paged through all four pages of the October invoice listing and got the settings, including the 20% tax rate.
- Right: Correctly found the three non-taxable clients (CL-0097, CL-0270, CL-0361) who were charged tax, with the right overcharge amounts (1050, 1150, 1875).
- Mistake: Did not recompute each invoice's lines from the lesson records, attendance and charge types. It only checked tax against is_taxable, which found 3 of the 12 wrong invoices.
- Mistake: Fetched INV-05821 and the lessons LS-042180 and LS-042368 but never acted on them. LS-042180 is a gross-priced lesson (6500/h for 0.75h = 4875 gross), yet the line shows net 4062 plus tax 813 = 4875, and that line is duplicated, giving an expected overcharge of 4875. The agent did not spot this pattern of duplicate or wrong lines.
- Mistake: Fetched INV-05834 and found nothing, then gave up on checking further. It never looked at INV-05791, 05846, 05877, 06017, 06060, 06073, 06080 or 06097, which needed duplicate-line, split-recalculation, missed-student and tax-basis checks.
- Mistake: Made an unnecessary search_clients call with an empty name and did not follow it up with a get_client call per client to check is_taxable across all invoices.

### small-wrong_invoices-1

**Tool calling: passed.** The agent pulled every October 2026 invoice and the September lessons and attendance, then compared them. It found four overcharged invoices (a duplicate line, tax on a non-taxable client, a wrong rate, and a line for a missed lesson) and submitted amounts that match the expected answer. ($0.29, 7 requests, 2.8 min)
- Right: Started with get_settings and list_invoices filtered to October, then fetched all 37 invoices with get_invoice to see their lines.
- Right: Spotted the duplicated LS-001226 line on INV-00158 (an overcharge of 4050) and the 863 tax charged on LS-001133 for CL-0014, a client that is not taxable (get_client showed is_taxable False).
- Right: Checked LS-001295 (hourly, 6000, one hour) against the INV-00172 line of 7800 and found the 600 overcharge.
- Right: Pulled attendance for all September lessons in batches, which let it confirm the INV-00176 error (6000) without listing every invoice field by hand.
- Right: Checked borderline cases before deciding, e.g. LS-001219, a one_off_split lesson where ST-0009 missed, so the 8000 correctly fell to the single charged student.
- Mistake: The transcript shows no reasoning tying INV-00176's 6000 to a specific lesson, so it cannot be verified from the visible steps, though the answer is correct.
- Mistake: The work was somewhat wasteful: it paged through all complete lessons and all attendance when it could have narrowed down to suspicious lines first. Still, the full scan was what made the check thorough.

### large-correction-2

**Tool calling: passed.** The agent marked Yara Baker (ST-0332) as missed on lesson LS-045235. It then voided INV-06372 dated today and reissued the three remaining lessons as INV-06548 (17100), which was paid from the released credit. The resulting changes match the expected state exactly. ($0.035, 5 requests, 38 s)
- Right: Looked up the invoice with get_invoice, which gave the lesson ID LS-045235 and student ID ST-0332 without needing a separate lesson search.
- Right: Did the steps in order: update_attendance to 'missed', then void_invoice dated 2026-11-13, then create_invoice.
- Right: The reissued invoice has only the three remaining lines (LS-045914, LS-046583, LS-047246) and is dated today.
- Right: The summary correctly reports the new total of 17100, the due date of 27 November, and that the invoice was paid from released credit.
- Mistake: Minor: search_clients for 'Yara Baker' returned Freya Baker (CL-0234), because Yara is a student, not a client. The agent did not confirm that the student belongs to CL-0234, though the invoice lines made the link clear enough.
- Mistake: Minor: the agent called create_invoice with an explicit line list rather than checking whether CL-0234 had other uninvoiced billable lessons. This was reasonable given the instruction to reissue 'without that lesson'.

### large-record_payment-1

**Tool calling: passed.** The agent found Jane Kelly (CL-0294), listed her unpaid invoices and existing allocations, then recorded a 50126p payment dated today. It allocated 37626p to INV-02840 to clear its remaining balance and the other 12500p to INV-03247, matching the expected changes exactly. ($0.026, 5 requests, 27 s)
- Right: Converted £501.26 to 50126 pence correctly.
- Right: Called list_invoices to find the unpaid invoices and list_allocations to see what had already been applied, before allocating anything.
- Right: Applied the payment oldest due date first: INV-02840 (due 2026-02-15) received exactly its outstanding 37626p (58778 total less 21152 already allocated), and the remaining 12500p went to INV-03247.
- Right: Dated the payment today (2026-11-13) and took only four tool calls to finish.
- Right: The summary states the amounts and where they went.
- Mistake: The list_allocations result shown in the transcript is cut off, so it cannot be confirmed that the agent checked for prior allocations on INV-03247 or for existing unallocated credit. The outcome matches the expected answer, so this did no harm.
- Mistake: The summary does not mention that INV-02840 is now paid while INV-03247 stays part-paid. This is a small omission, not an error.
