Lab: Count, budget and price every call
Module 2 · Lab · About 50 minutes · Needs: lessons 1 to 4 of this module, and the Module 1 lab (or the cells in Step 1)
What you are building
It is Thursday 18 June 2026, week 3. Yesterday Joel set the cap: one cent of model fees per ticket, on average. This week's lessons counted tokens, fitted requests into a window and priced calls, all in notebook cells that each defined their own counter and their own prices. This lab puts them in two files every later module imports. supportdesk/tokens.py holds the one counter and the budget gate. supportdesk/pricing.py holds the one price table and turns a reply's reported usage into dollars. With them you estimate a week of triage for all 36 tickets before sending anything, then measure three real calls and report the cost per usable label against Joel's cap. Only three calls go to the hosted model.