13 October, 2026
By now you’ve:
Today’s question: what does any of this actually cost, and how do you decide, in advance, whether a given model/approach is worth it for a given task?
Question
If your S6 pipeline took 30 seconds and a few cents of API calls on a toy dataset, what happens when the real dataset is 100x bigger? Is the answer “100x the cost”, or something else?
Try it
Paste a paragraph of your own writing into a tokenizer (e.g. the OpenAI tokenizer playground, or run opencode with a verbose/debug flag if it reports token counts) and compare token count to word count.
A single chat message is cheap. An agent doing a multi-step task is not one call — it’s many:
The key fact
Context accumulates. By the 10th tool call in a session, you are re-paying for the entire conversation history so far as input tokens on every single subsequent call, unless the harness does something (compaction, caching) to reduce it.
This is why a “quick fix” that takes an agent 20 tool calls to find can cost far more than the size of the final diff suggests.
Pricing and capability move fast — don’t memorize numbers, memorize the shape of the landscape:
| Tier | Examples (illustrative, check current pricing) | Cost | Typical use |
|---|---|---|---|
| Free / rate-limited | Gemini Flash free tier, OpenRouter :free models |
$0 (rate-limited) | learning, low-stakes drafts, this course |
| Cheap / fast | small open-weight models, “mini”/“flash” tiers | fractions of a cent per 1K tokens | high-volume, simple, well-specified tasks |
| Frontier / expensive | top-tier proprietary models | 10-50x the cheap tier | hard reasoning, ambiguous specs, high-stakes code |
| Local / self-hosted | Llama, Qwen, DeepSeek run on your own GPU | $0 marginal, but hardware + electricity + your time | privacy-sensitive data, offline, high-volume repeated tasks |
Question
Why might the free tier be exactly the right choice for a course exercise, but the wrong choice for a paper you’re submitting to a journal with a two-week reviewer deadline?
Ask three questions before reaching for the expensive model:
This connects back to S7/S8
A good test suite doesn’t just catch bugs — it changes the economics of which model tier you can afford to use.
Pros
Cons
Pros
Cons
Question
For a research pipeline you’ll run once on a 500-row dataset, is local worth the setup cost? What changes if you’ll run it 10,000 times on similarly-sized batches?
Local hardware has a fixed upfront cost; API calls have a cost that scales with volume. There’s a break-even usage volume above which local is cheaper.
\[ \text{break-even calls} = \frac{\text{hardware cost}}{\text{API cost per call}} \]
This is deliberately naive (ignoring electricity, your time, and quality differences) but it’s the right first-order question to ask before deciding.
Try it
Pick a rough GPU rental price (e.g. $0.50-$2/hour on a cloud provider) and a rough API cost per call for your S6-style task. At what call volume does renting a GPU for the day beat paying per call?
For any agent-driven step in a pipeline, you can estimate:
\[ \text{cost per run} \approx \sum_{\text{calls}} \big(\text{input tokens} \times \text{price}_{\text{in}} + \text{output tokens} \times \text{price}_{\text{out}}\big) \]
The naive instinct is “10x the data, 10x the cost.” That’s often wrong in both directions:
The habit
Before scaling up, ask: “does the agent do more work at 10x scale, or does my existing code just process more rows?” Those have wildly different cost profiles.
Token cost is one axis. Wall-clock time is another, and they don’t always move together:
When budgeting a pipeline for a real deadline, estimate time separately from money — a run that’s cheap but takes 6 hours may not be the right choice for a task due in 2.
Using your own S6 pipeline (the DuckDB pipeline you built, tested in S7/S8), produce a short written cost estimate covering:
Where to find real prices
Check the current pricing page for whichever provider you used in S6/S7/S8 (OpenRouter, Google AI Studio, Anthropic, etc.) — prices change often, always use the number as of the day you write the estimate, and cite the date.
Submission
A short written note (half a page to a page is plenty) alongside your S6/S7/S8 repo — this is not a slide deck, it’s a budgeting memo you could actually hand to a PI or grant officer.