---
title: "Kimi K2.6 on Pydantic AI - Billing ops"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 50%, code mode 70%; rank 36 of 44."
canonical: https://pydantic.dev/models/list/kimi-k2.6/billing_ops/
---

# Kimi K2.6 on Pydantic AI - Billing ops

> Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 50%, code mode 70%; rank 36 of 44.
>
> Markdown copy of https://pydantic.dev/models/list/kimi-k2.6/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/kimi-k2.6/pydantic_ai.md

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 50%   | 5 of 10      | $1.43 | 99       | 249        | 31.9 min |
| Code mode    | 70%   | 7 of 10      | $1.01 | 212      | 212        | 30.5 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

Kimi K2.6 passed 11 of 20 runs: 4 of 10 in tool calling and 7 of 10 in code mode. It did well on small lookups and edits. The failures came from the large audit-style questions over 394 invoices, where finding the answer meant checking every record.

#### Where it does well

- **Edits:** the void, credit note and re-invoice correction passed in both modes. Tool calling also allocated the payment correctly across two invoices.
- **Small questions:** `invoice_total`, `owed_on_invoices` and `tutor_margin` were all right in both modes (6 of 6).
- **Using the rules:** splits shared only among charged students, gross and net tax, tutor pay once per lesson, and non-taxable clients were all applied correctly. Its arithmetic was the weak point.
- **Fixing its own code:** in code mode it noticed that its line check ignored each student's status and corrected it.

#### Mistakes it makes

- **Sampling instead of checking everything (3 tool-calling failures).** In `duplicate_lines` it fetched about 50 of 394 invoices and answered `[]`. In `missed_billed` it checked about 5 non-void invoices and answered `[]`. In large `wrong_invoices` it used only a `tax/net` ratio check, which found 3 of the 12 wrong invoices. Each time it decided a full check would take too many calls.
- **Arithmetic done by hand:** large `tutor_margin` in tool calling came out at 122741 instead of 120741.
- **Duplicate lines missed (2 code-mode failures).** Both `wrong_invoices` runs checked whether each line was priced correctly. A duplicated line that is priced correctly passes that check, so INV-00158 and the large-case duplicates INV-06060, INV-06073 and INV-06097 were missed. This happened even though it solved `duplicate_lines` on its own.
- **Payment allocation (code mode):** it took the invoice total (58778) as the amount still owed and ignored the existing part-payment. That over-allocated 50126p to one invoice, and its summary then wrongly said there was leftover credit.
- **Rate errors missed:** small `wrong_invoices` in tool calling missed a line priced at 6500 instead of 6000.

#### Tool calling compared with code mode

Code mode was much better on the bulk questions. It passed `duplicate_lines`, `missed_billed` and large `tutor_margin`, all of which tool calling failed. In large `wrong_invoices` it found 9 of 12 against 3 of 12. It was often cheaper too: $0.06 against $0.36 on `missed_billed`. On the other hand it was less careful on the one simple edit, `record_payment`, which tool calling got right. On small questions it sometimes used 2–3 times as many requests (22 against 8 on small `tutor_margin`). Neither mode got `wrong_invoices` fully right.

## Runs

### small-invoice_total-1

**Tool calling: passed.** Answered 89700 correctly in 2 requests. ($0.0040, 2 requests, 4 s)
- Right: Direct and cheap

**Code mode: passed.** Answered 89700 correctly in 2 requests. ($0.0054, 2 requests, 5 s)
- Right: Direct

### small-owed_on_invoices-1

**Tool calling: passed.** Answered 85204 correctly in 4 requests. ($0.0065, 4 requests, 7 s)
- Right: Subtracted allocations from unpaid totals correctly

**Code mode: passed.** Answered 85204 correctly in 6 requests. ($0.016, 6 requests, 4 s)
- Right: Correct handling of allocations

### large-tutor_margin-3

**Tool calling: failed.** Found tutor `TU-002`, listed 75 October lessons, fetched attendance for all of them in one call and checked 18 clients' `is_taxable`. It then worked out the margin by hand in its reasoning and answered 122741 instead of 120741, 2000p out. ($0.13, 5 requests, 7.7 min)
- Right: Correct method: billable lessons only, splits shared among charged students, net of tax, tutor paid once per lesson
- Right: Batched `list_attendance` for all 75 lessons and fetched the clients in parallel
- Mistake: Message 9 onwards: added up dozens of lessons by hand in its reasoning and made a 2000p error somewhere in the totals

**Code mode: passed.** Worked out the margin in Python and got the correct 120741, using 41 requests and $0.23. ($0.23, 41 requests, 7.4 min)
- Right: Code arithmetic avoided the 2000p slip made in tool calling
- Mistake: Many requests (41) for one calculation

### small-tutor_margin-3

**Tool calling: passed.** Worked out the margin by hand in its reasoning and got the correct 65045 in 8 requests. ($0.14, 8 requests, 6.3 min)
- Right: Applied the split, tax and tutor-pay rules correctly
- Mistake: Used hand arithmetic, the same method that failed on the large version; it worked here because there were fewer lessons

**Code mode: passed.** Answered 65045 correctly in 22 requests. ($0.075, 22 requests, 2.2 min)
- Right: Correct rules applied in code
- Mistake: 22 requests, where tool calling needed 8

### large-duplicate_lines-1

**Tool calling: failed.** Listed all 394 October invoices, then fetched only about 50 with `get_invoice` (40, then about 10 more). It checked them by eye, found no repeated (lesson, student) pair and answered `{"ids": []}`. The duplicates were on INV-06060, INV-06073 and INV-06097, which it never fetched. ($0.13, 5 requests, 4.5 min)
- Right: Read the question correctly: the same student and lesson appearing more than once on an invoice
- Right: Correctly saw that the same lesson for different students in split lessons is normal
- Mistake: Messages 7–9: stopped after a sample of about 50 of 394 invoices and concluded 'the likely answer is: None' instead of fetching every non-void invoice's lines
- Mistake: Took no fetched data as evidence that duplicates don't exist

**Code mode: passed.** Fetched every October invoice in Python, counted (lesson, student) pairs and returned INV-06060, INV-06073 and INV-06097, which was correct. ($0.12, 31 requests, 3.1 min)
- Right: A complete scan in code, where tool calling had sampled
- Right: 31 requests, $0.116

### large-missed_billed-1

**Tool calling: failed.** Found that the void October invoices had charged missed students and had been replaced. It then checked attendance on only about 5 non-void invoices (`INV-05761`, `INV-06001`, `INV-05837`, `INV-05907`, `INV-05882`), took the pattern as general and answered `[]`. The correct answer was INV-05821, INV-05846 and INV-06080. ($0.36, 26 requests, 2.7 min)
- Right: Used `list_attendance` in batches and paired invoice lines with each student's status
- Right: Correctly kept the void invoices out of the answer
- Mistake: Message 11: dropped a complete check as 'too many calls' and switched to random sampling
- Mistake: Messages 31–51: generalised from 5 sampled invoices ('highly likely ... the answer is none') when an exact answer needed every non-void invoice checked
- Mistake: Probably relied on the void/replacement pattern and the `invoiced` flag instead of the line data

**Code mode: passed.** Joined every non-void invoice line to attendance in code and returned INV-05821, INV-05846 and INV-06080, which was correct. ($0.062, 21 requests, 2.4 min)
- Right: A complete join in code; cost $0.06 against $0.36 for the failed tool-calling run

### large-wrong_invoices-1

**Tool calling: failed.** Scanned `tax/net` ratios on the invoice list for clients that should not be taxed and found INV-05851, INV-06016 and INV-06105. That was 3 of the 12 wrong invoices. It never recalculated lines, so it missed the missed-but-billed, wrong-rate and duplicate-line errors. ($0.26, 16 requests, 8.4 min)
- Right: The ratio check was a clever way to find tax charged to non-taxable clients, and the 3 amounts it gave were correct
- Mistake: Messages 27–31: relied only on a `tax/net` heuristic, which can only find one kind of error
- Mistake: Did not recalculate each line from lessons and attendance; it judged the 2618 September lessons too many to fetch

**Code mode: failed.** Recalculated every line in code and found 9 of the 12 wrong invoices with exact amounts. It missed INV-06060, INV-06073 and INV-06097, the invoices with duplicate lines. ($0.37, 57 requests, 11.5 min)
- Right: Caught its own bug: the first scan ignored each student's status, and it fixed that in message 111
- Right: Covered tax on non-taxable clients, missed students billed and wrong rates
- Mistake: Its line-by-line check only asked whether each line's price was right, so a duplicated line that is priced correctly passed. It never checked for repeated (lesson, student) pairs, even though it solved exactly that in the duplicate_lines case

### small-wrong_invoices-1

**Tool calling: failed.** Found INV-00158 (duplicate line, 4050), INV-00162 (tax on a non-taxable client, 863) and INV-00176 (missed student billed, 6000). It missed INV-00172, where the line was priced at 6500 instead of 6000, an overcharge of 600. ($0.36, 15 requests, 8 s)
- Right: Spotted three different kinds of error, including the duplicate line
- Right: Amounts for the 3 it found were exact
- Mistake: Did not check every line's rate against the lesson's `charge_rate`, so the 600p rate error on INV-00172 went unnoticed
- Mistake: Messages 25–27: called `search_clients(name="CL-0014")` twice with an ID instead of a name, both wasted

**Code mode: failed.** Recalculated lines in code and found INV-00162, INV-00172 and INV-00176. It missed INV-00158, the duplicate line worth 4050. ($0.11, 24 requests, 2.8 min)
- Right: Found the wrong-rate error on INV-00172 that tool calling missed
- Right: Rechecked line by line to confirm
- Mistake: Messages 45–47: the per-line check passed the duplicated line because each copy is priced correctly; it needed a count of (lesson, student) pairs per invoice

### large-correction-2

**Tool calling: passed.** Changed Yara Baker's attendance on `LS-045235` to `missed`, voided `INV-06372` with a credit note, re-invoiced the 3 remaining October lessons as a new 17100p invoice and applied the released credit to it. All changes matched the expected ones. ($0.019, 9 requests, 56 s)
- Right: Followed the void, re-invoice and credit-application steps in the right order
- Right: Got the per-line amounts right (4750 net + 950 tax = 5700) and set the due date to 2026-11-27
- Right: Cheap: 9 requests, $0.019

**Code mode: passed.** Made the same correct attendance change, void, re-invoice and credit application in 4 requests. All changes matched. ($0.015, 4 requests, 29 s)
- Right: Fewer requests than tool calling (4 vs 9)

### large-record_payment-1

**Tool calling: passed.** Recorded the 50126p payment for CL-0294 and allocated 37626p to INV-02840, which cleared its remaining balance, and 12500p to INV-03247. This matched the expected result exactly. ($0.019, 9 requests, 61 s)
- Right: Took existing part-payments into account, so INV-02840 got only its 37626p outstanding
- Right: Followed the oldest-due-date-first rule

**Code mode: failed.** Listed the unpaid invoices but did not check the allocations already applied to them. It allocated the whole 50126p to INV-02840, which had only 37626p outstanding, so it over-allocated by 12500p and gave nothing to INV-03247. Its summary also says there was leftover credit, which contradicts its own allocation. ($0.0092, 4 requests, 27 s)
- Right: Found the client and the oldest-due invoice correctly
- Mistake: Message 5: took the invoice `total` (58778) as the amount still owed, ignoring existing allocations; it should have subtracted the allocations already applied, giving 37626 to INV-02840 and 12500 to INV-03247
- Mistake: Final summary said the invoice was still part-paid with leftover credit, which was wrong on both counts
