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

# MiniMax M3 on Pydantic AI Accounting

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

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 70%   | 7 of 10      | $1.76 | 151      | 1333       | 41.1 min |
| Code mode    | 80%   | 8 of 10      | $0.26 | 165      | 161        | 12.8 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gateway/openrouter:minimax/minimax-m3` passed 15/20 runs: 7/10 with tools and 8/10 in code mode. It handled focused accounting questions and transactions well, but neither mode passed either comprehensive wrong-invoice audit. No failure was provider-caused.

#### Where it does well

Both modes passed all four transaction runs, correctly sequencing attendance correction, invoice voiding, reissue, released credit, and oldest-due-first payment allocation. All eight invoice-total, outstanding-debt, and tutor-margin runs passed. The margin cases exercised taxability, gross pricing, attendance, and half-up rounding, although one code run needed to correct omitted tutor pay.

Both duplicate-line audits passed. Code mode also completed the large missed-student audit by joining 3108 invoice lines to attendance for 2655 lessons.

#### Mistakes it makes

Coverage is the main weakness. The tools-mode wrong-invoice audits returned only 3/12 and 3/4 expected findings after selective attendance and lesson checks. The small code-mode audit also returned 3/4: its expected-total loop counted duplicate invoice lines twice, hiding the duplicate overcharge.

Tool limits caused two unfinished runs. The tools missed-student audit made ten oversized attendance requests. The large code audit repeatedly confused batch size with the total calls allowed per cell, exhausted the sandbox's suspension budget, restarted, and re-fetched data until reaching 60 requests.

Passing runs were not uniformly clean: malformed output required validation retries in six runs, and some explanations used pounds instead of integer pence or contained inconsistent supporting details.

#### Tool calling compared with code mode

Code mode improved accuracy by one case and reduced total supplied cost from `$1.7637` to `$0.2646`, about 85%, despite using 165 model requests versus 151. These counts are model requests, not underlying tool calls.

Its largest gains were duplicate detection (`$0.3127` to `$0.0147`) and missed-student checking (failure at 60 requests versus success at 19). However, Python did not guarantee complete accounting logic, and poor state management erased its batching advantage in the largest audit.

## Runs

### small-invoice_total-1

**Tool calling: passed.** Read `INV-00084` and correctly returned its tax-inclusive total of `89700` pence after an output-format retry. ($0.0026, 3 requests, 10 s)
- Right: `get_invoice` supplied `74752` net, `14948` tax, and `89700` total; no additional accounting lookup was needed.
- Mistake: Initially returned prose instead of the required structured result. After `json_invalid` feedback, called `final_result` with `{"pence":89700}`, adding a request.

**Code mode: passed.** Retrieved `INV-00084` and correctly returned `89700` pence in two requests. ($0.0018, 2 requests, 8 s)
- Right: Called `get_invoice` once through `run_code`, then supplied `{"pence":89700}` through `final_result`.
- Right: Avoided additional lookups or unnecessary recalculation.

### small-owed_on_invoices-1

**Tool calling: passed.** Correctly calculated Emeka Brown's unpaid-invoice debt as `85204` pence. ($0.0034, 4 requests, 5 s)
- Right: Found `CL-0007`, retrieved its two unpaid invoices, and checked allocations for each.
- Right: Calculated `(39452 - 3563) + 49315 = 85204`, correctly treating the first invoice as part-paid.

**Code mode: passed.** Correctly calculated `85204` pence outstanding across Emeka Brown's two unpaid invoices. ($0.0045, 6 requests, 14 s)
- Right: Filtered allocations with `a['released_on'] is None`, grouped them by invoice, and calculated `35889 + 49315`.
- Right: Kept the calculation restricted to unpaid invoices rather than summing the client's historical charges.
- Mistake: Requested allocation page two even though page one reported `pages=1`; the extra call returned no items.
- Mistake: Manually recreated `invoices_data` with literal totals instead of using the fetched invoice records directly.

### large-tutor_margin-3

**Tool calling: passed.** Correctly calculated Chen Mensah's October margin as `120741` pence. ($0.037, 5 requests, 3.4 min)
- Right: Used `search_tutors`, `list_lessons`, `list_attendance`, `get_settings`, and targeted `get_client` calls.
- Right: Included 67 billable lessons from 75 records and calculated `360316 - 239575 = 120741`.
- Right: Handled charged-student splits, gross-price tax extraction, non-taxable clients, and tutor pay once per billable lesson.

**Code mode: passed.** Correctly calculated `360316 - 239575 = 120741` pence using a Python lesson-by-lesson calculation. ($0.016, 9 requests, 42 s)
- Right: Retrieved 75 lessons, 90 attendance rows, and details for 18 clients.
- Right: Computed tutor pay before skipping lessons with zero charged students.
- Right: Implemented split charges, client taxability, gross tax extraction, and `ROUND_HALF_UP`.
- Mistake: Re-fetched the full lesson list after overwriting the earlier `result` with settings.
- Mistake: After obtaining the correct total, emitted an XML-like `run_code` request as text; validation rejected it before the final structured answer.
- Mistake: Performed arithmetic with floats before `Decimal(str(x))` rounding; it passed here, but exact decimal arithmetic throughout would better preserve half-penny boundaries.

### small-tutor_margin-3

**Tool calling: passed.** Correctly returned Kai Iyer's October margin of `65045` pence, although its accompanying explanation contained inconsistencies. ($0.018, 5 requests, 88 s)
- Right: Excluded two cancelled lessons and paid the tutor for all 37 billable lessons, including lessons with no charged student.
- Right: Correctly applied half-up rounding: `2250 × 0.75 = 1687.5 → 1688` and gross tax `5625 / 6 = 937.5 → 938`.
- Right: Calculated `187435` client net revenue less `122390` tutor pay.
- Mistake: In the final explanatory text, listed only three non-chargeable missed lessons, omitting `LS-001445` even though the calculation excluded its revenue.
- Mistake: The History table wrote `5 × 5500 + 2 × 6000 = 34000`; the correct expression is `4 × 5500 + 2 × 6000`.

**Code mode: passed.** Initially overstated margin, corrected the tutor-pay calculation, and ultimately returned `65045` pence. ($0.018, 9 requests, 72 s)
- Right: Used decimal half-up rounding and client taxability in the revenue calculation.
- Right: Corrected tutor pay from `110902` to `122390`, yielding `187435 - 122390 = 65045`.
- Mistake: The first calculation used `if not charged: continue` before tutor pay, incorrectly excluding `11488` of pay and producing margin `76533`.
- Mistake: The corrected code guarded tutor pay with billable status but did not similarly guard client revenue; this passed because both cancelled lessons had no charged students.
- Mistake: The explanatory answer swapped the names associated with `CL-0030` and `CL-0037`, and initially returned prose that required a validation retry.

### large-duplicate_lines-1

**Tool calling: passed.** Eventually inspected all 384 non-void October invoices and correctly returned `INV-06060`, `INV-06073`, and `INV-06097`. ($0.31, 18 requests, 4.4 min)
- Right: Retrieved all four `list_invoices` pages and matched duplicate `(lesson_id, student_id)` pairs.
- Right: Identified duplicated pairs `LS-044150`/`ST-0461`, `LS-042250`/`ST-0483`, and `LS-044126`/`ST-0515`.
- Mistake: After fetching only 55 invoice details, emitted a premature XML-like `final_result` as text containing many invoice IDs. Validation rejected it, allowing the run to recover.
- Mistake: Made 385 `get_invoice` calls for 384 unique invoices, fetching `INV-05818` twice.

**Code mode: passed.** Correctly scanned all 384 non-void invoices and returned the three duplicate-line invoices using Python counting. ($0.015, 11 requests, 49 s)
- Right: Applied `Counter` to `(lesson_id, student_id)` pairs and selected counts greater than one.
- Right: After recovery, fetched invoice details in separate batches of `100`, `100`, `100`, and `84`, and confirmed all 384 were present.
- Mistake: The first fetching loop attempted all 384 invoices in one `run_code` call; batches of 50 did not avoid the cumulative 100-nested-call limit.
- Mistake: Restarted retrieval of the first 100 invoices after that failure and also fetched invoice-list page one twice.

### large-missed_billed-1

**Tool calling: error.** Retrieved all 384 non-void invoice details but exhausted the 60-request limit during attendance checking, producing no answer. ($0.92, 60 requests, 16.2 min)
- Right: Retrieved all four October invoice pages and correctly identified the missed-student charges on `INV-05821` and `INV-05846` during the scan.
- Right: Used `list_attendance` to check invoice lesson/student pairs rather than treating every absence as non-chargeable.
- Mistake: Ten `list_attendance` calls exceeded the 100-lesson limit, despite explicit tool errors.
- Mistake: The last two calls repeated the same 116-ID attendance request and both failed. It should have split the IDs into batches of at most 100.
- Mistake: Small invoice batches and repeated attendance retries consumed the request budget before it completed the audit and returned all three expected IDs.

**Code mode: passed.** Completed the missed-student audit and correctly returned `INV-05821`, `INV-05846`, and `INV-06080` in 19 requests. ($0.043, 19 requests, 84 s)
- Right: Checked 3108 invoice lines against attendance for 2655 unique lessons, with zero missing attendance matches.
- Right: Joined by `(lesson_id, student_id)` and tested `att["status"] == "missed"`.
- Right: Confirmed the three wrongly billed line totals were `4875`, `11700`, and `4050`.
- Mistake: The first pagination loop read `get("invoices", [])` instead of `items`, reporting zero fetched invoices and requiring a refetch.
- Mistake: Twice emitted XML-like tool calls as text, triggering validation retries.
- Mistake: Twice exceeded the 100-nested-call limit by looping through all invoice batches inside one `run_code`; resetting `all_lines` caused additional repeated retrieval.

### large-wrong_invoices-1

**Tool calling: failed.** Returned three correct overcharges but missed nine of the twelve expected invoices. ($0.33, 28 requests, 5.8 min)
- Right: Correctly identified tax charged to non-taxable clients: `INV-05851: 1050`, `INV-06016: 1150`, and `INV-06105: 1875`.
- Right: Retrieved all four invoice-list pages and checked settings, lesson details, attendance, and client taxability for those findings.
- Mistake: During invoice retrieval, fetched void `INV-06096` but omitted non-void `INV-05983`, despite later claiming to have all invoices.
- Mistake: After collecting invoice details, fetched only 23 lesson records and attendance for those selected lessons, then finalized after checking three suspicious tax cases.
- Mistake: Failed to systematically test duplicates, missed-student charges, and pricing errors. It should have recalculated every unique charged student/lesson line and compared complete invoice totals.

**Code mode: error.** Repeated retrieval and sandbox-limit failures consumed all 60 requests before the invoice audit could finish; no result was returned. ($0.11, 60 requests, 4.0 min)
- Right: Correctly identified 394 October invoices, excluded ten void invoices, and collected 384 invoice details.
- Right: Established the audit involved 3108 lines, 2655 unique lessons, and 384 clients.
- Mistake: Repeatedly placed loops over more than 100 nested calls inside one `run_code`; reducing each `asyncio.gather` batch did not reduce the cell's total calls.
- Mistake: After `suspension limit 1000 exceeded`, retried tool calls in the exhausted session despite explicit guidance that a restart was required.
- Mistake: Restarted twice, discarded state, and re-fetched invoices and clients. It should have retained completed batches, bounded each cell's total calls, and avoided duplicate retrieval.
- Mistake: At the end, had only begun bulk lesson retrieval with a 100-lesson batch. Fetching lessons and attendance in 100-ID calls earlier would have avoided treating 2655 lessons as 2655 individual calls.

### small-wrong_invoices-1

**Tool calling: failed.** Returned three correct overcharges but omitted `INV-00176`, overcharged by `6000` pence. ($0.13, 16 requests, 8.7 min)
- Right: Retrieved all 37 October invoice details and correctly found `INV-00158: 4050`, `INV-00162: 863`, and `INV-00172: 600`.
- Right: Detected a duplicated line, tax on a non-taxable client, and an inflated lesson charge.
- Mistake: Called `get_lessons` with more than 100 IDs, repeated the oversized request after rejection, and only then split it.
- Mistake: Restricted attendance checks to selected suspicious and split lessons; never checked `LS-001346`/`ST-0046`, the missed student billed on `INV-00176`.
- Mistake: Declared the analysis complete without checking attendance for every billed pair. A complete join would have exposed the additional `6000` overcharge.

**Code mode: failed.** Returned three correct overcharges but missed the duplicated `4050`-pence line on `INV-00158`. ($0.049, 32 requests, 3.1 min)
- Right: Retrieved all 37 invoices, 280 lessons, and 331 attendance records.
- Right: Correctly calculated `INV-00162: 863`, `INV-00172: 600`, and `INV-00176: 6000`, using decimal half-up rounding.
- Mistake: In the main calculation and final recheck, iterated `for line in inv['lines']` and added an expected charge for every occurrence. Thus duplicate `LS-001226`/`ST-0016` contributed twice to both actual and expected totals. It should have counted each eligible pair once.
- Mistake: Checked only whether a lesson had any charged students, not whether the particular line's student was charged, and omitted a billable-status check.
- Mistake: During preparation, overwrote fetched state and repeatedly re-fetched data; `import pickle`, `globals()`, and `next(generator_expression)` also failed in the sandbox.
- Mistake: Spent numerous later cells rechecking already established `600` and `863` discrepancies without adding a duplicate-line check.

### large-correction-2

**Tool calling: passed.** Correctly marked Yara Baker as missed, voided `INV-06372`, and created paid replacement `INV-06548` for `17100` pence. ($0.0044, 6 requests, 23 s)
- Right: Called `update_attendance` for `LS-045235`/`ST-0332`, then `void_invoice`, then `create_invoice`, in the required order.
- Right: Retained the other three lessons, including the `missed_chargeable` attendance; dated the financial changes `2026-11-13`.
- Right: The replacement contained `14250` net plus `2850` tax, due `2026-11-27`; released credit funded it.
- Mistake: In `final_result`, reported money as `£228.00` and `£171.00` instead of integer pence.
- Mistake: The initial `search_clients` was redundant because `get_invoice` supplied the client and student identifiers.

**Code mode: passed.** Correctly completed the attendance correction, void, and reissue, leaving the replacement paid and `5700` pence of released credit unused. ($0.0077, 12 requests, 47 s)
- Right: Sequentially awaited `update_attendance`, `void_invoice`, and `create_invoice` with the correct identifiers and dates.
- Right: Verified the original `22800` allocation had `released_on="2026-11-13"` and the new invoice had a `17100` allocation.
- Right: Reported replacement `INV-06548` and the remaining three lessons correctly.
- Mistake: Used 12 requests versus six in tools mode, with extra client, lesson, allocation, and verification lookups.
- Mistake: In the post-change verification cell, only the final expression exposed the old allocations; then re-fetched the new allocations instead of displaying the already stored `allocations` variable.

### large-record_payment-1

**Tool calling: passed.** Correctly recorded Jane Kelly's `50126`-pence payment and allocated it oldest due date first. ($0.0069, 6 requests, 30 s)
- Right: Used `search_clients`, `list_invoices`, and `list_allocations` to establish `58778 - 21152 = 37626` outstanding on `INV-02840`.
- Right: Called `record_payment` dated `2026-11-13`, allocating `37626` to `INV-02840` and `12500` to `INV-03247`.
- Right: Correctly left `12504` outstanding on the second invoice and no unallocated remainder.
- Mistake: Fetched the client's entire ledger after already obtaining the invoices and allocations needed for this payment.
- Mistake: The final summary used pounds instead of integer pence; the allocation amounts were also supplied as strings, although accepted.

**Code mode: passed.** Correctly recorded the `50126`-pence payment and its two allocations in five requests. ($0.0046, 5 requests, 25 s)
- Right: Used `search_clients`, `list_invoices`, and `list_allocations` before writing.
- Right: Called `record_payment` with integer allocations of `37626` to `INV-02840` and `12500` to `INV-03247`, dated `2026-11-13`.
- Right: Correctly reported that the first invoice was cleared and `12504` remained on the second.
