---
title: "MiniMax M3.1 Flash on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 80%, code mode 80%; rank 16 of 32."
canonical: https://models.pydantic.dev/models/minimax-m3.1-flash/accounting_platform/
---

# MiniMax M3.1 Flash on Pydantic AI Accounting

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 80%, code mode 80%; rank 16 of 32.
>
> Markdown copy of https://models.pydantic.dev/models/minimax-m3.1-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>`
- 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/minimax-m3.1-flash.md

| Mode         | Score | Tasks passed | Cost | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ---- | -------- | ---------- | -------- |
| Tool calling | 80%   | 8 of 10      | –    | 148      | 791        | 18.0 min |
| Code mode    | 80%   | 8 of 10      | –    | 118      | 174        | 7.0 min  |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gateway/openrouter:minimax/minimax-m3.1-flash` passed **16/20 runs**, with **8/10 in each mode**. Both modes passed all payment, correction, invoice-total, outstanding-debt, and tutor-margin cases. All four failures were invoice audits; none was a provider error.

#### Where it does well

The model handled the accounting mechanics reliably in these cases: payment allocation after existing part-payments, released credit after voiding, automatic credit application, and replacement invoice dates. Both payment runs allocated `50126` as `37626 + 12500`; both correction runs replaced `22800` with `17100`, leaving `5700` credit.

All four margin runs passed. Code mode made rounding and eligibility explicit with `Decimal`, `ROUND_HALF_UP`, charged-student counts, and tutor costs for billable lessons without charged students. Both modes also found all three missed-attendance invoices in the targeted audit.

#### Mistakes it makes

Audit completeness is the main weakness. The large tools audit inspected only `43` invoice details and returned **6/12** overcharges; all six omitted invoices were uninspected. The small tools audit had the relevant attendance record but still omitted a `6000` charge, returning **3/4**.

Code mode sometimes finalized without evidence: the duplicate audit returned two unsupported IDs before checking invoice lines; the large overcharge audit returned an empty list after sandbox errors and a restart.

Successful runs were often wasteful. Examples include repeated account histories, unrelated-month audits, and a large repeated retrieval batch in the small tools margin case. Code introduced recoverable filesystem, variable-lifetime, indexing, and call-budget errors.

#### Tool calling compared with code mode

Code mode used **118 requests versus 148** for tools, about **20% fewer**, but this includes its prematurely terminated duplicate audit. Request counts also conceal nested tool volume.

Code mode improved the small overcharge audit from **3/4 to 4/4**, but regressed the duplicate audit from correct to wholly wrong, and the large overcharge audit from six findings to zero. Its arithmetic was explicit and accurate when completed; orchestration and completion checks were less dependable. Neither mode demonstrated reliable comprehensive invoice auditing.

## Runs

### small-invoice_total-1

**Tool calling: passed.** Retrieved `INV-00084` and correctly returned its tax-inclusive total of `89700` pence. (–, 2 requests, 4 s)
- Right: Used one `get_invoice` call followed by `final_result`, with no unnecessary retrieval.

**Code mode: passed.** Correctly returned `89700` pence after checking the invoice’s fourteen lines. (–, 4 requests, 5 s)
- Right: Verified line totals summed to `89700`, with net `74752` and tax `14948`.
- Mistake: Started with unrelated `list_invoices(page=1)` despite having the invoice ID, then called `get_invoice('INV-00084')` twice.
- Mistake: Used four requests where tools mode needed two.

### small-owed_on_invoices-1

**Tool calling: passed.** Correctly calculated Emeka Brown’s unpaid invoice debt as `85204` pence. (–, 5 requests, 6 s)
- Right: Used `search_clients`, `list_invoices(status="unpaid")`, and `list_allocations`.
- Right: Calculated `39452 - 3563 + 49315 = 85204`, rather than treating both invoice face values as outstanding.
- Mistake: Fetched `list_ledger_entries` after the invoice and allocation records already supplied the required answer.

**Code mode: passed.** Correctly returned `85204` pence outstanding on Emeka Brown’s unpaid invoices. (–, 4 requests, 5 s)
- Right: Retrieved unpaid totals `39452` and `49315`, accounted for the `3563` allocation, and evaluated `35889 + 49315`.
- Mistake: Fetched both all invoices and unpaid invoices, then retrieved both invoice details merely to recheck totals already present.

### large-tutor_margin-3

**Tool calling: passed.** Correctly returned Chen Mensah’s October margin of `120741` pence. (–, 10 requests, 73 s)
- Right: Retrieved `TU-002` lessons, attendance, settings, and taxable status for `18` clients.
- Right: Handled split charges, gross pricing, non-taxable clients, and tutor costs sufficiently to reach the exact expected margin.
- Mistake: After retrieving the pricing inputs, added payment-order and November invoice checks, including five `list_invoices` and four `get_invoice` calls.

**Code mode: passed.** Correctly calculated `360316 - 239575 = 120741` pence for Chen Mensah’s October margin. (–, 13 requests, 39 s)
- Right: Used `Decimal` and `ROUND_HALF_UP` for student costs, tax, and tutor pay.
- Right: Divided split pricing by charged students, handled taxable gross prices correctly, and paid tutors for billable lessons even with no charged students.
- Mistake: Fetched unrelated October ledger entries, a wider lesson window, repeated six client lookups, and extensive invoice validation after obtaining the correct result.

### small-tutor_margin-3

**Tool calling: passed.** Correctly returned Kai Iyer’s October margin of `65045` pence. (–, 12 requests, 44 s)
- Right: Retrieved `TU-001` lessons, attendance, client tax status, and settings before answering.
- Right: Reached the exact result despite gross pricing and billable lessons with no charged student.
- Mistake: Near the end, repeated the lesson, attendance, seven client, settings, payment-order, seven invoice-list, and six invoice-detail calls in one large batch.

**Code mode: passed.** Correctly calculated net revenue `187435` less tutor pay `122390`, returning `65045` pence. (–, 9 requests, 19 s)
- Right: Applied `ROUND_HALF_UP`, gross-tax extraction, client exemptions, and tutor pay on billable lessons with zero charged students.
- Mistake: Initially iterated the `list_lessons` response dictionary rather than `lessons['items']`, printing its four keys and then refetching.
- Mistake: A later diagnostic accessed `r[5]` under `len(r) > 4`, causing `IndexError` for five-element tuples; the financial calculation remained intact.

### large-duplicate_lines-1

**Tool calling: passed.** Correctly returned `INV-06060`, `INV-06073`, and `INV-06097` after inspecting invoice details. (–, 24 requests, 2.4 min)
- Right: Retrieved all four October invoice pages and made `394` distinct `get_invoice` calls.
- Right: Identified repeated student–lesson pairs and excluded void invoices from the answer.
- Mistake: During the scan, fetched `get_settings`, lesson records, attendance, and all ten void invoice details; duplicate detection required only non-void invoice lines.

**Code mode: failed.** Returned unsupported IDs `INV-05761` and `INV-05762`, missing all three genuine duplicate-line invoices. (–, 4 requests, 8 s)
- Right: Retrieved all `394` October invoice headers across four pages.
- Mistake: The second snippet attempted `open('/tmp/allinv.json','w')` and received `PermissionError`; it then unnecessarily fetched all headers again.
- Mistake: Submitted `final_result` alongside the first `get_invoice` inspection, before performing any duplicate count.
- Mistake: Should have inspected all non-void invoice lines and counted `(lesson_id, student_id)` occurrences before submitting.

### large-missed_billed-1

**Tool calling: passed.** Correctly found all three invoices billing students marked `missed`: `INV-05821`, `INV-05846`, and `INV-06080`. (–, 25 requests, 2.6 min)
- Right: Used `list_attendance` to locate `LS-041761`, `LS-043071`, and `LS-044224`, then confirmed the affected invoice lines.
- Right: Distinguished `missed` from `missed_chargeable` and excluded void invoices.
- Mistake: After locating affected clients, fetched unrelated invoices `INV-05892`, `INV-05858`, and `INV-05867`; corrected the mapping through client-filtered `list_invoices` calls.
- Mistake: Constructed attendance requests from sequential lesson identifiers rather than collecting every identifier through pagination; this happened to cover the relevant records.

**Code mode: passed.** Eventually returned the correct three invoices after recovering from sandbox exhaustion and restarting the investigation. (–, 23 requests, 2.4 min)
- Right: Initially collected `384` non-void invoices and `3108` lines.
- Right: After restarting, scanned September attendance, found three `missed` and invoiced records, and verified their matching invoice lines.
- Mistake: Used `for i in range(0, 100)` with `lesson_ids[i:i+100]`, creating overlapping windows instead of stepping by `100`.
- Mistake: Continued tool calls after `suspension limit 1000 exceeded` before using `restart=true`.
- Mistake: Later referenced `nonvoid` after the restart had erased it, producing `NameError`; also spent many calls on unrelated months and account history.

### large-wrong_invoices-1

**Tool calling: failed.** Returned six correct overcharges but missed six more, finding only half of the expected invoices. (–, 30 requests, 7.3 min)
- Right: Correctly reported the three missed-attendance charges and tax errors of `1050`, `1150`, and `1875` pence.
- Mistake: During retrieval, called `list_invoices(page=3)` without October filters, then corrected it.
- Mistake: Inspected only `43` distinct invoice details and never fetched the six omitted invoices: `INV-05791` (`600`), `INV-05877` (`750`), `INV-06017` (`500`), `INV-06060` (`3563`), `INV-06073` (`4500`), and `INV-06097` (`9900`).
- Mistake: Submitted `final_result` without completing invoice coverage. It should have checked every non-void invoice for duplicate pairs, attendance eligibility, and recalculated line amounts.

**Code mode: failed.** Collected substantial audit data but never completed the calculation; restarted and submitted an empty result, missing all twelve overcharges. (–, 20 requests, 70 s)
- Right: Eventually gathered `384` non-void invoice details, `3108` lines, `2655` lessons, and `3148` attendance rows.
- Mistake: Early code used unsupported `globals()`; later tried passing `get_lessons` as a function value and received `NameError`.
- Mistake: Requested `114` invoice calls in one snippet, exceeding the `100`-call limit. Repeated the same budgeting mistake in client loops: smaller internal batches did not reduce total calls per snippet.
- Mistake: Twice attempted unsupported `final_result` rows for `INV-05761` while tool retries were pending.
- Mistake: After reaching `230` clients and exhausting the cumulative suspension budget, ran `restart=true` and submitted `rows=[]`. It should have planned bounded retrieval and completed reconciliation before finalizing.

### small-wrong_invoices-1

**Tool calling: failed.** Found three of four overcharged invoices, omitting the `6000`-pence overcharge on `INV-00176`. (–, 21 requests, 3.0 min)
- Right: Correctly reported `INV-00158: 4050`, `INV-00162: 863`, and `INV-00172: 600`.
- Right: Retrieved all `37` October invoice details and September attendance.
- Mistake: The attendance response contained `LS-001346`, `ST-0046`, `status="missed"`, and `invoiced=true`, but the final answer omitted its `6000` charge on `INV-00176`.
- Mistake: Should have joined each invoice line to attendance and assigned zero expected charge to every `missed` student; the necessary evidence was already available.

**Code mode: passed.** Correctly found all four overcharges, including the `6000`-pence missed-attendance charge omitted by tools mode. (–, 25 requests, 1.6 min)
- Right: Detected duplicate `(LS-001226, ST-0016)` on `INV-00158`, tax charged to exempt client `CL-0014`, and the incorrect rate on `INV-00172`.
- Right: Explicit attendance checks identified `LS-001346` on `INV-00176`; returned `4050`, `863`, `600`, and `6000` pence.
- Mistake: Attempted forbidden file output to `/tmp/data.json`, then refetched invoice data.
- Mistake: Initial price recomputation did not exclude missed students or duplicate lines; subsequent checks repaired these omissions.
- Mistake: Unnecessary audits of other months exceeded the `100` nested-call limit, and an initial five-page lesson scan required replacement with complete pagination.

### large-correction-2

**Tool calling: passed.** Correctly changed Yara Baker’s attendance, voided `INV-06372`, and created paid replacement `INV-06548` for `17100` pence. The resulting changes matched the expected records. (–, 12 requests, 22 s)
- Right: Called `update_attendance` for `LS-045235` and `ST-0332` with `status="missed"`, then `void_invoice`, then `create_invoice`, dated `2026-11-13`.
- Right: Retained the three remaining lessons, including chargeable cancellation, and correctly reported `22800` credit released, `17100` applied, and `5700` remaining.
- Mistake: During discovery, repeated `search_clients` with the broader name `Yara` after already identifying the client; also fetched lessons beyond the invoice’s October scope.

**Code mode: passed.** Correctly performed the attendance correction, void, and replacement invoice, leaving `5700` pence of credit. (–, 11 requests, 22 s)
- Right: Executed `update_attendance`, `void_invoice`, and `create_invoice` sequentially with the correct identifiers and dates.
- Right: Verified replacement `INV-06548` had net `14250`, tax `2850`, total `17100`, and status `paid`.
- Mistake: In a post-change check, calculated unallocated credit as `paid - released + credit_used - credit_used`, producing zero incorrectly.
- Mistake: Recovered before answering by summing all ledger entries to `5700` and confirming no unpaid invoices; repeated several account-history reads.

### large-record_payment-1

**Tool calling: passed.** Correctly recorded Jane Kelly’s payment of `50126` pence and allocated it oldest due date first. (–, 7 requests, 13 s)
- Right: `record_payment` allocated `37626` to `INV-02840` and `12500` to `INV-03247`, dated `2026-11-13`.
- Right: Accounted for the existing `21152` allocation against `INV-02840`; correctly left `12504` outstanding on the next invoice.
- Mistake: The final summary expressed money in pounds instead of the handbook’s required integer pence, despite correct stored amounts.
- Mistake: Fetched settings and ledger history beyond the invoice and allocation records needed for allocation.

**Code mode: passed.** Correctly recorded and allocated the `50126`-pence payment in five requests. (–, 5 requests, 12 s)
- Right: `record_payment` used `CL-0294`, date `2026-11-13`, and allocations of `37626` and `12500` to the correct invoices.
- Right: Checked allocations, unpaid invoices, and today’s ledger afterward; correctly reported no unallocated remainder.
- Mistake: Read the client’s full invoice, allocation, and ledger histories, plus settings, although narrower invoice and allocation reads would suffice.
