---
title: "GPT-6.2 Sol on Pydantic AI - Billing ops"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 60%, code mode 80%; rank 31 of 44."
canonical: https://pydantic.dev/models/list/gpt-6.2-sol/billing_ops/
---

# GPT-6.2 Sol on Pydantic AI - Billing ops

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 60%, code mode 80%; rank 31 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/gpt-6.2-sol/billing_ops/. Index for agents: https://pydantic.dev/models/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://pydantic.dev/models/api/select` with a JSON body such as `{"description": "what the agent does"}`. It returns up to five ranked models with reasons. Format: https://pydantic.dev/models/select.md
- Search models by name: `GET https://pydantic.dev/models/api/search?query=<text>`
- List, filter and sort models: `GET https://pydantic.dev/models/api/models`, for example `?weights=open&max_price=2&sort=efficiency`
- One model in full: `GET https://pydantic.dev/models/api/models/<slug>`
- Any other question about the models: `GET https://pydantic.dev/models/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://pydantic.dev/models/mcp`. More: https://pydantic.dev/models/usage.md

About the benchmark: https://pydantic.dev/models/benchmarks/billing_ops.md. The model on every Pydantic AI benchmark: https://pydantic.dev/models/list/gpt-6.2-sol/pydantic_ai.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time    |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | ------- |
| Tool calling | 60%   | 6 of 10      | $0.83 | 67       | 190        | 4.7 min |
| Code mode    | 80%   | 8 of 10      | $0.19 | 62       | 62         | 3.0 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

`gpt-6.2-sol` passed 6 of 10 cases with plain tool calling and 8 of 10 in code mode. Every single-client question and both write tasks passed in both modes. All six failures are on whole-month invoice audits (`duplicate_lines`, `missed_billed`, `wrong_invoices`). Total cost was $0.83 in tools mode and $0.19 in code mode.

#### Where it does well

- **Write tasks (4/4).** `record_payment` allocated oldest due date first and allowed for an existing 21152 allocation. The void-and-reissue ran in the right order, dated today.
- **Handbook arithmetic.** Tutor margin was right in all 4 runs, including split lessons, one-off rates, gross pricing and non-taxable clients. In code it used an integer half-up helper `(2*n+d)//(2*d)`, never floats.
- **Lookups.** Invoice total and amount owed took 2–4 requests each, with unreleased allocations subtracted correctly.
- **Parallel calls** in both modes: several `get_invoice` calls per turn, `asyncio.gather` in code.

#### Mistakes it makes

- **Stops scanning early in tools mode (4 failures).** On the large dataset it opened about 50 of 384 invoices for `duplicate_lines`, 8 of 384 for `wrong_invoices`, and read attendance for 500 of roughly 2655 lessons for `missed_billed`. On the small dataset it read attendance for about 135 of 280 lessons and missed `INV-00176`. Each time it answered as if the check were complete.
- **Gave up once.** In `large-duplicate_lines-1` it emitted plain text instead of a result, hit a validation error, and then returned `ids: []`.
- **Duplicate lines not treated as overcharge (2 code-mode failures).** Both `wrong_invoices` scripts summed an expected price per line, so a line billed twice looked correct. That missed `INV-00158` on small and `INV-06060`, `INV-06073`, `INV-06097` on large. The same model detected those three in the `duplicate_lines` case.
- **Unverified mental arithmetic** in tools mode: correct in all 5 passing calculation cases, but with no working shown.

#### Tool calling compared with code mode

Code mode is clearly better for bulk audits: it scanned all 384 invoices and 2655 lessons where tools mode sampled. `large-duplicate_lines-1` cost $0.012 in code against $0.304 in tools, and `large-missed_billed-1` $0.022 against $0.202. Both of those flipped from fail to pass.

Tools mode is equal or slightly cheaper on small lookups and the correction task ($0.008 against $0.015). It also caught two things code mode did not: the duplicate line on `INV-00158`, and a same-day payment check before recording.

Code mode's habits are wasteful but harmless: one write per `run_code` call, batches of 95 fetches spread over separate requests, and occasionally returning full lists to the model.

`wrong_invoices` failed in both modes on both datasets. Tools mode failed on coverage, code mode on the duplicate-line rule.

## Runs

### small-invoice_total-1

**Tool calling: passed.** One `get_invoice` call for `INV-00084`, then returned its `total` of 89700. Passed in 2 requests. ($0.0092, 2 requests, 3 s)
- Right: Minimal path: read the stored total directly

**Code mode: passed.** One `run_code` call to `get_invoice('INV-00084')`, then returned 89700. Passed in 2 requests. ($0.012, 2 requests, 3 s)
- Right: Read the stored total directly
- Mistake: Code mode added nothing here and cost slightly more than tools (0.0118 vs 0.0092)

### small-owed_on_invoices-1

**Tool calling: passed.** Found client CL-0007, listed two unpaid invoices, fetched allocations per invoice in parallel and answered 85204. Passed in 4 requests. ($0.010, 4 requests, 8 s)
- Right: Subtracted the 3563 credit allocation on `INV-00155` (39452 − 3563 + 49315 = 85204)
- Right: Parallel `list_allocations` calls per invoice

**Code mode: passed.** Found the client, gathered unpaid invoices and allocations in parallel, summed totals less unreleased allocations in code and answered 85204. Passed in 4 requests. ($0.0060, 4 requests, 7 s)
- Right: Filtered `released_on is None` explicitly
- Right: `asyncio.gather` for the two reads

### large-tutor_margin-3

**Tool calling: passed.** Listed the tutor's 75 October lessons, fetched attendance for the 67 billable ones and the three clients on gross-priced lessons, and answered 120741. Passed in 5 requests. ($0.039, 5 requests, 22 s)
- Right: Filtered to `complete`/`cancelled_chargeable` before calling `list_attendance`
- Right: Only looked up `is_taxable` for clients on `gross` lessons (CL-0097, CL-0269, CL-0065), which is all the net figure needs
- Right: Got 67 lessons with split, one-off and gross cases right with no calculator
- Mistake: All arithmetic was done in the model's head; correct here but unverifiable
- Mistake: Also called `list_payment_orders` for the tutor, which the handbook does not require; it may have served as a cross-check on tutor pay

**Code mode: passed.** Listed lessons, fetched attendance for billable ones, looked up clients on gross lessons and computed revenue 360316, pay 239575, margin 120741 in code. Passed in 6 requests. ($0.027, 6 requests, 16 s)
- Right: Integer half-up helper `(2*n+d)//(2*d)` instead of floats or `round`
- Right: Handled `_split` divisor, one-off types and gross tax removal for taxable clients only
- Mistake: Returned the full 75-lesson list to the model in step 2 (about 16KB) when a count would have done

### small-tutor_margin-3

**Tool calling: passed.** Listed 39 October lessons for TU-001, fetched attendance for the 37 billable ones, checked three clients' tax status and answered 65045. Passed in 5 requests. ($0.023, 5 requests, 17 s)
- Right: Excluded `cancelled` lessons and `missed` students
- Right: Handled the non-taxable client CL-0037 on gross lessons
- Right: `list_payment_orders` showed `PO-0041` of 122390, matching the tutor pay for October
- Mistake: Mental arithmetic over 37 lessons; correct, but the payment-order figure is a shortcut the handbook does not sanction as the source for tutor pay

**Code mode: passed.** Listed 39 lessons, kept 37 billable, fetched attendance and three clients, and computed net 187435, pay 122390, margin 65045. Passed in 6 requests. ($0.012, 6 requests, 15 s)
- Right: Inspected result shape with counts and samples rather than dumping data
- Right: Tutor pay computed from lessons matches the 122390 payment order seen in the tools run
- Mistake: Six small steps where two or three would do

### large-duplicate_lines-1

**Tool calling: failed.** Paged the 394 October invoices but opened only about 50 of the 384 non-void ones with `get_invoice`, then emitted plain text instead of a result, got a validation error and answered `ids: []`. Failed; expected three invoices. ($0.30, 14 requests, 68 s)
- Right: Fetched all four `list_invoices` pages
- Right: Noticed that duplicates could be within one invoice, not only across invoices
- Mistake: Sampled invoices instead of scanning them all: batches of 10, 2, 20, 5, 8 and 7 `get_invoice` calls, chosen by header heuristics; `INV-06060`, `INV-06073` and `INV-06097` were never opened
- Mistake: Wasted calls on irrelevant checks: `list_invoices` with `sent_from=2026-10-02`, per-client `list_invoices`, `list_allocations` and `list_ledger_entries` for `INV-05851`
- Mistake: Second-to-last turn returned text ('I’ll check a few more invoice lines…') with around 100 empty thinking parts and no tool call, which failed output validation
- Mistake: After the validation error it gave `{"ids": []}` rather than continuing the scan; it should have kept calling `get_invoice` for the remaining ~330 invoices

**Code mode: passed.** Paged all invoices, then scanned the 384 non-void ones with `get_invoice` in four batches of 96, counting `(student_id, lesson_id)` pairs with `Counter`. Passed in 7 requests. ($0.012, 7 requests, 18 s)
- Right: Complete scan of all 384 invoices
- Right: Filtered `status != 'void'` in code
- Right: Returned only compact results from each step, so cost was 0.0118 against 0.3044 in tools mode
- Mistake: Split the scan over four `run_code` calls when one loop would do

### large-missed_billed-1

**Tool calling: failed.** Scanned attendance for consecutive September lesson ids looking for `missed` rows flagged `invoiced: true`, but stopped after 500 lessons (LS-041722 to LS-042221) and reported only `INV-05846`. Failed; missed `INV-05821` and `INV-06080`. ($0.20, 11 requests, 72 s)
- Right: Good shortcut: a `missed` attendance row with `invoiced: true` identifies the bad line without opening every invoice
- Right: Correctly traced LS-041761 / ST-0127 to `INV-05846` with one `get_invoice`
- Mistake: Stopped the `list_attendance` sweep after five batches of 100; the invoiced lessons run to about LS-044651 (2655 lessons in the code-mode run), so the offending lessons LS-044224 and LS-043071 were never read
- Mistake: Early turns were wasted: `list_lessons` for September returned only page 1, `list_invoices` from 2026-10-02, 11 `get_invoice` calls for late invoices and an 86-id attendance check that found nothing
- Mistake: Answered as if the scan were complete; it should have continued the batches to the end of September

**Code mode: passed.** Loaded all 384 non-void invoices in four batches, fetched attendance for all 2655 invoiced lessons in chunks of 100 and matched invoice lines to `missed` rows. Passed in 9 requests. ($0.022, 9 requests, 23 s)
- Right: Full coverage: every invoice line was compared with attendance
- Right: Chunked `list_attendance` at 100 ids with `asyncio.gather`
- Right: Matched on `(lesson_id, student_id)`, not lesson alone
- Mistake: Four separate `get_invoice` batches of 95, each its own request

### large-wrong_invoices-1

**Tool calling: failed.** Read all four invoice list pages, then opened only 8 invoices picked from header anomalies and reported 3 of the 12 wrong invoices. Failed. ($0.088, 5 requests, 18 s)
- Right: Spotted from list headers that `INV-05851`, `INV-06016` and `INV-06105` carry tax although the client is not taxable, and confirmed with `get_client`, `get_lessons` and `list_attendance`
- Right: The three amounts (1050, 1150, 1875) are right
- Mistake: Never recomputed the other ~376 invoices; only 8 `get_invoice` calls were made, so wrong-rate lines (`INV-05791`, `INV-05877`, `INV-06017`), missed-student lines (`INV-05821`, `INV-05846`, `INV-06080`) and duplicate lines (`INV-06060`, `INV-06073`, `INV-06097`) were not found
- Mistake: Finished after 5 requests with no sign that the check was partial; it should have fetched every invoice's lines plus lessons and attendance

**Code mode: failed.** Loaded all 384 invoices, 2655 lessons, attendance and 384 clients, recomputed each line and reported 9 of the 12 wrong invoices. Failed; missed the three with duplicate lines. ($0.031, 12 requests, 39 s)
- Right: Full recomputation with correct rate, split, tax and missed-student handling
- Right: All nine reported amounts match the expected values
- Mistake: The final script sums `expected(...)` once per invoice line, so a line billed twice is expected twice; `INV-06060` (3563), `INV-06073` (4500) and `INV-06097` (9900) showed no difference. It should have counted each `(lesson_id, student_id)` pair once
- Mistake: The script even checked `d['total'] != sum(lines)` but not repeated pairs, though the same model wrote that check in the duplicate_lines case
- Mistake: 12 requests, five of them only to load `get_client` in batches of 95

### small-wrong_invoices-1

**Tool calling: failed.** Opened all 37 October invoices and checked lessons and attendance for part of them, reporting 3 of the 4 wrong invoices. Failed; missed `INV-00176` (6000). ($0.13, 10 requests, 50 s)
- Right: Fetched every invoice with `get_invoice` (9 + 13 + 15)
- Right: Found the duplicate line on `INV-00158` (4050), the tax on non-taxable `INV-00162` (863) and the wrong rate on `INV-00172` (600)
- Right: Recovered from the `at most 100 lesson ids per call` error by resending 99 ids
- Mistake: Attendance was checked for only about 135 of the 280 invoiced lessons (13 + 23 + 99 ids, up to LS-001189); LS-001346, where ST-0046 was `missed` but billed 6000 on `INV-00176`, was never looked up
- Mistake: Final turn listed `cancelled` and `planned` September lessons instead of finishing the attendance batches
- Mistake: First bulk `list_attendance` call sent 102 ids and was rejected

**Code mode: failed.** Loaded all 37 invoices, 280 lessons, attendance and clients and recomputed each line, reporting 3 of the 4 wrong invoices. Failed; missed `INV-00158` (4050), the duplicate-line invoice. ($0.028, 5 requests, 19 s)
- Right: Complete data in 4 code steps
- Right: Found `INV-00176` (6000, missed student billed), which the tools run missed
- Right: Amounts for `INV-00162`, `INV-00172` and `INV-00176` are right
- Mistake: Same flaw as the large case: `delta = total - sum(expected per line)` treats a repeated `(lesson_id, student_id)` line as legitimately charged twice, so `INV-00158` showed no difference
- Mistake: Step 1 returned the whole invoice list to the model unnecessarily

### large-correction-2

**Tool calling: passed.** Looked up `INV-06372` and the client, set attendance to `missed`, voided the invoice and reissued it for the other three lessons, all dated 2026-11-13. Passed in 5 requests. ($0.0081, 5 requests, 12 s)
- Right: Parallel `get_invoice` + `search_clients` in the first turn
- Right: Correct order: `update_attendance` (LS-045235/ST-0332) → `void_invoice` → `create_invoice` with the 3 remaining lines
- Right: New invoice `INV-06548` of 17100 was auto-paid from released credit, and the summary said so
- Mistake: Did not check the lesson's current attendance or the resulting allocations before reporting; the summary's credit statement rested on the `paid` status returned by `create_invoice`

**Code mode: passed.** Same change as in tools mode, done as seven small `run_code` steps, with a final `list_allocations` check on both invoices. Passed in 7 requests. ($0.015, 7 requests, 23 s)
- Right: Read attendance and settings before changing anything
- Right: Built the new invoice's lines from the voided invoice minus the missed pair rather than typing ids
- Right: Verified the released allocation (22800, `released_on` 2026-11-13) and the new 17100 allocation before summarising
- Mistake: One write per `run_code` call; the three writes could have been one script, so it cost more than tools mode (0.015 vs 0.0081)

### large-record_payment-1

**Tool calling: passed.** Found the client, listed 10 unpaid invoices and all allocations, then recorded 50126 with allocations 37626 to `INV-02840` and 12500 to `INV-03247`. Passed in 6 requests. ($0.016, 6 requests, 12 s)
- Right: Converted £501.26 to `50126` pence
- Right: Accounted for the existing 21152 allocation on `INV-02840` (58778 − 21152 = 37626) and applied oldest due date first
- Right: Checked `list_ledger_entries` for a same-day payment (found `LE-013542` of 56252, a different amount) before recording
- Right: Summary's remaining 12504 on `INV-03247` is correct

**Code mode: passed.** Found the client, read unpaid invoices and allocations, then computed the oldest-first allocations in code and called `record_payment`. Passed in 4 requests. ($0.019, 4 requests, 13 s)
- Right: Used `Decimal('501.26') * 100` for the pence conversion
- Right: Sorted by `due_date` and ignored released allocations when computing outstanding amounts
- Right: Compute and write in a single script
- Mistake: No check for an existing same-day payment, which the tools run did
