---
title: "Qwen3.5 Plus 2026-04-20 on Pydantic AI - Billing ops"
description: "Questions about and changes to a tutoring agency's books, checked to the penny. Tool calling 40%, code mode 70%; rank 38 of 44."
canonical: https://pydantic.dev/models/list/qwen3.5-plus-20260420/billing_ops/
---

# Qwen3.5 Plus 2026-04-20 on Pydantic AI - Billing ops

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

| Mode         | Score | Tasks passed | Cost  | Requests | Tool calls | Time     |
| ------------ | ----- | ------------ | ----- | -------- | ---------- | -------- |
| Tool calling | 40%   | 4 of 10      | $0.97 | 75       | 226        | 32.2 min |
| Code mode    | 70%   | 7 of 10      | $2.61 | 223      | 217        | 35.2 min |

Each task was run once per mode.

## Review

Written by an LLM from the runs' transcripts.

#### Overall

The model passed 10 of 20 runs: 4 of 10 in tool calling and 6 of 10 in code mode. It does well on small lookups and corrections. On the large audit questions it fails in two ways. In tool calling it gives up. In code mode it runs out of requests.

#### Where it does well

- **Small questions:** `invoice_total`, `owed_on_invoices` and `small-tutor_margin` passed in both modes (6 of 6).
- **`large-correction-2`:** passed in both modes, with exactly the expected void, credit note, released allocation and new invoice.
- **Pricing in code:** its `compute_line_cost` (half-up rounding, splits, gross/net, non-taxable) was right. With it, code mode found every duplicate in `large-duplicate_lines-1` and the wrong rate on INV-00172.

#### Mistakes it makes

- **Sampling, then guessing "none" (tools, 3 cases).** In `large-duplicate_lines-1` it checked about 60 of 384 invoices. In `large-missed_billed-1` it checked about 10. In `large-wrong_invoices-1` it stopped after spotting one kind of error (3 of 12 found). Each time its reasoning says checking 394 invoices "manually" is impossible, and it returns `[]` or a partial list.
- **Doing sums in its head (tools).** In `small-wrong_invoices-1` its hand totals were wrong and it reported a false positive, INV-00181.
- **Ignoring existing state.** In `large-record_payment-1` (tools) it put all 50126 on INV-02840 without checking the 21152 already allocated. It then saw the over-allocation in `list_allocations` and decided it was fine.
- **Incomplete checks.** In `small-wrong_invoices-1` (code) it priced each existing line but never asked whether the line should exist, so it missed both the duplicate and the charged `missed` student.
- **Bad first answers.** Four runs first answered in free text or bare `[]` and failed output validation, which cost an extra request each time.
- **Provider error:** one run (`large-tutor_margin-3`, tools) ended on an Alibaba HTTP 400.

#### Tool calling compared with code mode

Code mode was better at both correctness and cost on the large cases. It passed `large-duplicate_lines-1`, `large-record_payment-1` and `large-tutor_margin-3`, all of which tools mode failed or never finished. `large-correction-2` cost $0.016 in code mode against $0.275 in tools mode.

Code mode's weakness is the sandbox. It kept hitting the 100-nested-call cap, tried to keep state through `sys.modules` (a type error) and pasted hard-coded ID lists between calls. That is how `large-missed_billed-1` ($1.70) and `large-wrong_invoices-1` reached the 60-request limit, even though both had the right method and, in the first case, had already found the right lines. In `large-wrong_invoices-1` it also trusted `search_clients(name="")` to return every client when it returned only 50.

On small cases code mode sometimes used more requests (22 against 6 for `small-tutor_margin-3`).

## Runs

### small-invoice_total-1

**Tool calling: passed.** Got 89700 in 2 requests. Passed. ($0.0033, 2 requests, 8 s)
- Right: Minimal, direct lookup

**Code mode: passed.** Got 89700 in 4 requests. Passed. ($0.011, 4 requests, 32 s)
- Right: Direct

### small-owed_on_invoices-1

**Tool calling: passed.** Got 85204 in 6 requests. Passed. ($0.011, 6 requests, 25 s)
- Right: Correctly took totals less allocations

**Code mode: passed.** Got 85204 in 4 requests. Passed. ($0.0061, 4 requests, 12 s)
- Right: Direct

### large-tutor_margin-3

**Tool calling: error.** After 6 requests the run ended on a provider HTTP 400 from Alibaba ('The content field is a required field'). ($0.036, 6 requests, 10.5 min)
- Mistake: Ended by provider error before any answer

**Code mode: passed.** Passed (listed above). ($0.082, 23 requests, 2.0 min)

### small-tutor_margin-3

**Tool calling: passed.** Got 65045 in 6 requests. Passed. ($0.041, 6 requests, 2.4 min)
- Right: Correct margin arithmetic

**Code mode: passed.** Got 65045 after 22 requests. Passed. ($0.11, 22 requests, 2.6 min)
- Right: Correct result
- Mistake: 22 requests against 6 in tools mode for the same answer

### large-duplicate_lines-1

**Tool calling: failed.** Listed all 394 October invoices, then called `get_invoice` in batches of about 10 and checked ~60 of 384 by eye. It decided duplicates were unlikely and returned `{"ids": []}`. Failed. ($0.21, 12 requests, 3.5 min)
- Right: Paged all 4 `list_invoices` pages and spotted the 10 void invoices
- Right: Understood that a duplicate means the same (lesson_id, student_id) pair within one invoice
- Mistake: Read 'none in this sample' as 'none at all': it never fetched INV-06060, INV-06073 or INV-06097
- Mistake: Its first final answer was bare `[]` and failed validation before it resubmitted `{"ids": []}`
- Mistake: It should have fetched every non-void invoice, or said the check was incomplete

**Code mode: passed.** Fetched all non-void October invoices in batches under the 100-call limit, checked them in code for repeated (lesson, student) pairs, and returned INV-06060, INV-06073 and INV-06097. Passed. ($0.073, 16 requests, 81 s)
- Right: Checked all 384 invoices in code, unlike the sampling in tools mode
- Mistake: 16 requests, some spent on batching around the nested-call cap

### large-missed_billed-1

**Tool calling: failed.** Fetched invoices and checked attendance for lines from only about the first 10 invoices, found no `missed` student who had been invoiced, and returned an empty list. Failed. ($0.12, 9 requests, 3.4 min)
- Right: Correct method: cross-check each invoice line's (lesson, student) against `list_attendance` status `missed`
- Right: Correctly read the `invoiced` flag on attendance records
- Mistake: Gave up after a small sample of 384 invoices and guessed 'there may be none'
- Mistake: First answer 'None' was invalid JSON; it then submitted `{"ids": []}`
- Mistake: Expected INV-05821, INV-05846 and INV-06080 were never checked

**Code mode: error.** Spent most of 60 requests getting around the 100-nested-call cap and the lack of state between `run_code` calls. It finally found 3 attendance records with status `missed` and `invoiced` true and began mapping them to invoices (INV-05846 was the last lookup), but hit the request limit. Failed. ($1.70, 60 requests, 18.1 min)
- Right: The method in the end was correct and had found the right lines
- Mistake: Repeatedly ran into 'Code mode allows 100 nested tool calls' (e.g. 4×25 `get_invoice` batches)
- Mistake: Tried `sys.modules["__main__"]` to keep state (type error), then pasted hard-coded ID lists into each call
- Mistake: Should have filtered first: pull attendance for `missed` students and check `invoiced`, rather than fetching every invoice
- Mistake: Cost $1.70, the costliest case

### large-wrong_invoices-1

**Tool calling: failed.** Listed all invoices and hand-checked a few. It noticed odd net/tax ratios and found three non-taxable clients charged tax on one line (INV-05851, INV-06016, INV-06105), then stopped. Failed: 3 of 12. ($0.15, 10 requests, 5.1 min)
- Right: Spotted the non-taxable-client tax error pattern from list totals and confirmed it with `get_client`
- Right: Gave correct amounts for the 3 it reported
- Mistake: Checked only one kind of error; never recomputed lines from lessons and attendance, so it missed duplicates, missed-but-charged lines and wrong rates (9 invoices)
- Mistake: Mental addition slips while summing (e.g. INV-05764 tax first summed as 12600 rather than 13350)

**Code mode: error.** Wrote a recompute-every-line pipeline, but lost many requests to the nested-call cap and to batching invoices again. Its tax lookup covered only the 50 clients returned by `search_clients(name="")`, so it flagged false errors, and it hit the 60-request limit while debugging. Failed. ($0.53, 60 requests, 7.0 min)
- Right: Took the right approach: recompute line cost and tax from lessons, attendance and client taxability
- Mistake: Assumed `search_clients(name="")` returned every client (only CL-0001 to CL-0050), so the taxability map was incomplete
- Mistake: Several runs failed on the 100-nested-call limit (e.g. batches of 10 `get_invoice` across all 384 invoices in one call)

### small-wrong_invoices-1

**Tool calling: failed.** Hand-checked invoice lines and found the duplicate in INV-00158 (4050) and the non-taxable tax in INV-00162 (863). It added INV-00181 (3600) as a false positive and missed INV-00172 and INV-00176. Failed. ($0.11, 10 requests, 4.9 min)
- Right: Spotted the repeated LS-001226/ST-0016 line in INV-00158 and costed it correctly
- Right: Spotted the tax on a non-taxable client's line in INV-00162
- Mistake: Did not recompute every line from lesson rates, so it missed the wrong rate in INV-00172 (600) and INV-00176 (6000)
- Mistake: Added mis-summed hand totals (e.g. INV-00166 summed to 115500 against 109000) and included the unsupported INV-00181
- Mistake: First free-text answer failed JSON validation

**Code mode: failed.** Recomputed each invoice line in `compute_line_cost` and compared invoice totals. It found INV-00162 (863) and INV-00172 (600) but missed INV-00158 and INV-00176. Failed. ($0.043, 16 requests, 87 s)
- Right: Correct pricing function (half-up rounding, split, gross/net, non-taxable)
- Right: Found the wrong rate on LS-001295 in INV-00172, which tools mode missed
- Mistake: Costed each existing line without asking whether it should exist: the duplicate LS-001226 line in INV-00158 was priced as valid
- Mistake: Never checked that the line's own student was `attended`/`missed_chargeable`, so a charged `missed` student (INV-00176, 6000) passed
- Mistake: First free-text answer failed validation

### large-correction-2

**Tool calling: passed.** Marked ST-0332 `missed` on LS-045235, voided INV-06372 with a credit note (allocation released), and re-invoiced the three remaining October lessons as a 17100 invoice paid from the freed credit. Passed. ($0.28, 9 requests, 70 s)
- Right: The changes matched the expected output exactly: void, credit note of 22800, new invoice 14250 net + 2850 tax, credit allocation of 17100
- Right: Lines were rebuilt correctly for LS-045914, LS-046583 and LS-047246 at 4750 + 950 each
- Mistake: Most expensive tools-mode run ($0.275 for 9 requests; the conversation is about 340k characters) against $0.016 for the same result in code mode

**Code mode: passed.** Made the same correct void, credit note and re-invoice as in tools mode, in 9 requests for $0.016. Passed. ($0.016, 9 requests, 27 s)
- Right: Exact expected changes at a small fraction of the tools-mode cost

### large-record_payment-1

**Tool calling: failed.** Listed unpaid invoices for CL-0294 and called `record_payment` with the whole 50126 on INV-02840, without checking the 21152 already allocated to it. Failed. ($0.012, 5 requests, 39 s)
- Right: Found the client and converted £501.26 to 50126
- Right: Dated the payment today, 2026-11-13, and picked the oldest due invoice first
- Mistake: Did not check existing allocations before allocating. INV-02840 had only 37626 left, so 12500 should have gone to INV-03247
- Mistake: After recording, `list_allocations` showed the earlier 21152 allocation; it noticed INV-02840 was over-allocated and talked itself into 'that's fine'

**Code mode: passed.** Checked existing allocations, split the payment into 37626 to INV-02840 and 12500 to INV-03247, and recorded it. Passed. ($0.031, 9 requests, 1.5 min)
- Right: Worked out what was left on INV-02840 before allocating, which tools mode did not do
