---
title: "GPT-6 Sol on Pydantic AI Accounting"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 60%, code mode 80%; rank 27 of 32."
canonical: https://models.pydantic.dev/models/gpt-6-sol/accounting_platform/
---

# GPT-6 Sol on Pydantic AI Accounting

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

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ------- |
| Tool calling | 60%   | 6 of 10      | $1.31 | 58       | 515        | 3.7 min |
| Code mode    | 80%   | 8 of 10      | $0.37 | 80       | 80         | 3.0 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gateway/openai:gpt-6-sol` passed **14/20 runs**: **6/10 tools** and **8/10 code_mode**. Both modes handled the payment and correction workflows correctly. Neither passed either general wrong-invoice audit. No failures were caused by the provider.

#### Where it does well

Both modes passed invoice-total lookup, outstanding-debt calculation, payment allocation, invoice correction, duplicate detection and the small tutor-margin case. Payment runs correctly applied `50126` pence oldest-first as `37626 + 12500`. Correction runs preserved the required sequence and produced a paid replacement for `17100`.

Code mode handled larger joins effectively: the missed-billing audit checked `384` invoices against attendance for `2655` lessons and found all three violations. Its margin calculation used explicit half-up rounding and included tutor costs even when no student was charged.

#### Mistakes it makes

Three tool-mode failures involved incomplete verification: selected lesson pages in missed billing, only five invoice details in the large overcharge audit, and only eight lessons after fetching all small-dataset invoices. The large margin run had complete inputs but returned `4000` too little; its intermediate arithmetic was not exposed.

Code mode’s two failures were rule omissions despite broad data coverage. The large audit checked individual line prices without detecting duplicates, finding `9/12` invoices. The small audit also failed to test the billed student’s eligibility, finding `2/4`. Correct data retrieval did not ensure a complete accounting algorithm.

Two successful code runs recovered from execution errors: exceeding the `100` nested-call limit and using `lesson_id` instead of `id`.

#### Tool calling compared with code mode

Code mode fixed the large missed-billing and margin failures, but regressed from three to two findings in the small overcharge audit. It used **80 requests versus 58**, while reported costs fell from **$1.3147 to $0.3692**, about **72% lower**. The duplicate audit dominated tool-mode cost: **$0.7757 versus $0.0480**.

For these cases, code mode is stronger for exhaustive retrieval and arithmetic. General invoice auditing still needs explicit checks for eligibility, duplicate pairs and reconciliation of the complete expected total.

## Runs

### small-invoice_total-1

**Tool calling: passed.** Read `INV-00084` and correctly returned its tax-inclusive total of `89700` pence. ($0.0089, 2 requests, 4 s)
- Right: Used one `get_invoice` call followed by `final_result`; the record showed `74752 + 14948 = 89700`.

**Code mode: passed.** Correctly returned `89700` pence from `get_invoice('INV-00084')`. ($0.012, 2 requests, 10 s)
- Right: Used one `run_code` retrieval followed by `final_result`, without unnecessary recalculation.

### small-owed_on_invoices-1

**Tool calling: passed.** Correctly calculated Emeka Brown’s outstanding invoice debt as `85204` pence. ($0.011, 4 requests, 7 s)
- Right: Used `search_clients`, `list_invoices` and `list_allocations` to calculate `39452 + 49315 - 3563 = 85204`.
- Right: Subtracted the allocation to `INV-00155` without subtracting allocations belonging to older paid invoices.

**Code mode: passed.** Correctly returned outstanding invoice debt of `85204` pence. ($0.017, 5 requests, 8 s)
- Right: Built `unpaid_ids` and subtracted only allocations to those invoices with `released_on is None`.
- Right: Computed `39452 + 49315 - 3563 = 85204`.

### large-tutor_margin-3

**Tool calling: failed.** Retrieved the necessary records but returned `116741` pence, understating Chen Mensah’s October margin by `4000`. ($0.054, 5 requests, 17 s)
- Right: Retrieved all `75` lessons for `TU-002`, their attendance, settings and all `18` relevant clients’ tax statuses.
- Mistake: The final calculation was wrong despite complete inputs: applying the handbook to the returned records gives net revenue `360316` less tutor pay `239575`, or `120741`.
- Mistake: No intermediate calculation was exposed in the tool calls, so the precise arithmetic slip cannot be located. It should have calculated and reconciled per-lesson revenue and pay before `final_result`.

**Code mode: passed.** Correctly calculated Chen Mensah’s October margin as `120741` pence. ($0.037, 7 requests, 14 s)
- Right: Processed `75` lessons and `90` attendance records, retaining `67` billable lessons.
- Right: Used `Decimal` and `ROUND_HALF_UP`, divided split charges by charged attendance, and removed included tax only for taxable clients.
- Right: Calculated `360316 - 239575 = 120741`, including tutor pay for four billable lessons with no charged students.

### small-tutor_margin-3

**Tool calling: passed.** Correctly returned Kai Iyer’s October margin of `65045` pence. ($0.029, 5 requests, 12 s)
- Right: Retrieved all `39` lessons, their attendance, the `20%` tax setting and seven clients’ tax statuses.
- Right: The answer matches net revenue `187435` minus tutor pay `122390`.

**Code mode: passed.** Fixed a dictionary-key error and correctly calculated the margin as `65045` pence. ($0.032, 7 requests, 16 s)
- Right: After correction, used `Decimal`/`ROUND_HALF_UP` and calculated `187435 - 122390 = 65045` across `37` billable lessons.
- Right: Included tutor pay for four billable lessons with no charged attendance.
- Mistake: The fifth `run_code` initialized `bylesson` with `x['lesson_id']` on lesson records, causing `KeyError: lesson_id`. The next execution correctly used `x['id']`.

### large-duplicate_lines-1

**Tool calling: passed.** Retrieved the October invoices and correctly identified all three invoices containing duplicate student–lesson pairs. ($0.78, 13 requests, 80 s)
- Right: Read all four `list_invoices` pages and checked non-void invoice details with `get_invoice`.
- Right: Found duplicates on `INV-06060` (`LS-044150`, `ST-0461`), `INV-06073` (`LS-042250`, `ST-0483`) and `INV-06097` (`LS-044126`, `ST-0515`).
- Mistake: During detail retrieval, fetched `INV-05884` twice. The large volume of raw invoice responses made this the most expensive run at `$0.7757`.

**Code mode: passed.** Recovered from a nested-call limit error and correctly found all three duplicate-line invoices. ($0.048, 10 requests, 20 s)
- Right: Collected `394` invoices, excluded `10` void invoices, and checked all `384` remaining documents.
- Right: Used `Counter((l['lesson_id'], l['student_id']) for l in d['lines'])` to identify repeated pairs.
- Right: After the error, checked `len(docs) == 101` and resumed from `valid[101:191]`, preserving completed work.
- Mistake: The fourth `run_code` attempted four batches of 50 calls in one execution, exceeding the limit of `100` nested calls. It should have split these across executions from the outset.

### large-missed_billed-1

**Tool calling: failed.** Returned only `INV-05846`, missing `INV-05821` and `INV-06080` because it checked only selected lesson pages. ($0.21, 9 requests, 42 s)
- Right: Confirmed that `INV-05846` billed `ST-0127` for `LS-041761`, whose attendance was `missed`.
- Mistake: After `list_invoices` reported four pages, fetched only pages `1` and `4`.
- Mistake: Checked attendance for the first 100 September lessons and the first pages of September 30 and September 15, rather than all invoice-line pairs. This omitted the relevant `LS-044224` and `LS-043071` records.
- Mistake: At `final_result`, presented this partial search as the complete answer. It should have fetched every non-void invoice’s lines and joined all `(lesson_id, student_id)` pairs to attendance.

**Code mode: passed.** Exhaustively matched invoice lines to attendance and correctly returned all three affected invoices. ($0.050, 9 requests, 18 s)
- Right: Fetched all `384` non-void invoice details, covering `2655` distinct lessons and `3148` attendance records.
- Right: Constructed a set of `(lesson_id, student_id)` pairs with `status == 'missed'` and matched it against invoice lines.
- Right: Returned `INV-05821`, `INV-05846` and `INV-06080`.
- Mistake: Fetched the first invoice once for inspection and again when loading the complete details list.

### large-wrong_invoices-1

**Tool calling: failed.** Found three genuine tax overcharges but returned only `3` of the expected `12` invoices. ($0.099, 6 requests, 21 s)
- Right: Fetched all four October invoice-list pages.
- Right: Correctly identified `INV-05851: 1050`, `INV-06016: 1150` and `INV-06105: 1875` after checking clients, lessons and attendance.
- Mistake: After listing `394` invoices, called `get_invoice` for only five and checked lesson details for only three.
- Mistake: Stopped after identifying tax charged to non-taxable clients, missing rate errors, missed attendance and duplicate lines. It should have audited every non-void invoice against unique chargeable student–lesson pairs.

**Code mode: failed.** Audited all non-void invoices but found only `9` of `12` overcharges because its comparison accepted duplicate lines. ($0.089, 18 requests, 42 s)
- Right: Retrieved `384` invoice details containing `3108` lines, plus `2655` lessons, attendance and `384` clients.
- Right: Correctly checked billable status, individual attendance, split pricing, tax exemptions and half-up rounding.
- Mistake: In the fifteenth `run_code`, compared each line independently with `expected(...)`. A duplicate correctly priced line therefore passed the same comparison twice.
- Mistake: Omitted `INV-06060: 3563`, `INV-06073: 4500` and `INV-06097: 9900`. It should have counted each `(lesson_id, student_id)` once when constructing the correct invoice total.

### small-wrong_invoices-1

**Tool calling: failed.** Correctly reported three overcharges but omitted `INV-00176`, overcharged by `6000` pence. ($0.083, 4 requests, 17 s)
- Right: Fetched all `37` October invoice details.
- Right: Found the duplicate on `INV-00158` (`4050`), incorrect tax on `INV-00162` (`863`) and rate error on `INV-00172` (`600`).
- Mistake: In the final investigation batch, requested `get_lessons` and `list_attendance` for only eight selected lessons, none from `INV-00176`.
- Mistake: Should have checked attendance and pricing for every billed pair before concluding that only three invoices were wrong.

**Code mode: failed.** Retrieved the relevant data but returned only two of four overcharged invoices because the pricing function omitted eligibility and duplicate checks. ($0.044, 9 requests, 25 s)
- Right: Loaded all `37` invoice details, `280` distinct lessons and `331` attendance records.
- Right: Used integer half-up rounding, `halfup(n,d) = (2*n+d)//(2*d)`, and correctly found `INV-00162: 863` and `INV-00172: 600`.
- Mistake: In the seventh `run_code`, `priced(line, client_id)` counted charged attendees for splitting but never checked whether the billed student was chargeable or the lesson billable.
- Mistake: `sum(priced(line, ...) for line in d['lines'])` also preserved duplicate lines, missing the repeated `LS-001226`/`ST-0016` charge on `INV-00158` (`4050`).
- Mistake: Omitted `INV-00176: 6000`. It should have built the expected total from unique eligible student–lesson pairs rather than repricing every existing line.

### large-correction-2

**Tool calling: passed.** Correctly marked Yara Baker’s attendance as missed, voided `INV-06372`, and created paid replacement `INV-06548` for `17100` pence. ($0.034, 5 requests, 12 s)
- Right: Called `update_attendance` for `LS-045235`/`ST-0332`, then `void_invoice`, then `create_invoice`, using `2026-11-13` for the financial changes.
- Right: Kept the three remaining lines at `5700` each; the resulting credit note, released allocation and replacement allocation matched expectations.
- Mistake: The initial `search_clients` and broad `list_lessons` were unnecessary: `get_invoice` already supplied the client, student and lesson identifiers.

**Code mode: passed.** Correctly performed the attendance correction, void and reissue, producing paid invoice `INV-06548` for `17100` pence. ($0.018, 7 requests, 15 s)
- Right: Used `asyncio.gather` for reads, then sequentially awaited `update_attendance`, `void_invoice` and `create_invoice`.
- Right: Verified that the replacement received a `17100` allocation from existing credit; all expected changes matched.
- Mistake: Used seven requests versus five in tool mode, including additional settings, client, lesson and allocation reads for a correction already identified by the original invoice.

### large-record_payment-1

**Tool calling: passed.** Correctly recorded Jane Kelly’s `50126`-pence payment and allocated it to the oldest outstanding invoices. ($0.015, 5 requests, 13 s)
- Right: Used `search_clients`, `list_invoices(status='unpaid')` and `list_allocations` before `record_payment`.
- Right: Calculated `58778 - 21152 = 37626` for `INV-02840`, then allocated the remaining `12500` to `INV-03247`, dated `2026-11-13`.

**Code mode: passed.** Correctly recorded and allocated Jane Kelly’s `50126`-pence payment. ($0.022, 6 requests, 13 s)
- Right: Calculated outstanding amounts using only allocations where `released_on is None`.
- Right: Called `record_payment` with `37626` for `INV-02840` and `12500` for `INV-03247`, dated `2026-11-13`.
- Mistake: Calculated balances for all ten unpaid invoices and their `500958` total, although only the oldest two were needed for this payment.
