DEVELOPER NOTES

The cheap model can be the expensive workflow

Compare total cost per accepted task, including retries, tool usage, review, and avoidable rework.

Edwin··3 min·496 words
AI developmentCost optimizationSRE
The cheap model can be the expensive workflow
ENNATURAL ARTICLE

A low token price is a useful number. It is not the final cost of a working feature. If one model needs repeated attempts, extra tools, and a developer repairing its output, the workflow can cost more than a stronger model that finishes cleanly. The reverse can also happen: a small bounded task may not need expensive reasoning at all. I would compare the complete job before choosing a default.

Define an accepted result

For a code task, acceptance might require the requested behavior, relevant checks, and a reviewable diff. For classification, it might require the right label and safe handling of uncertainty. Define that outcome before measuring. Otherwise a fast answer can become a “completed task” simply because it returned something.

Keep first-attempt success and repaired success separate. Count failed attempts, retries, tool charges, and human review time. Do not assign an invented dollar value to developer time and then present the total as a precise financial result. You can show API cost and review minutes side by side, or state a clearly labeled planning assumption.

Use a transparent toy example

Imagine workflow A costs $0.02 per attempt and needs three attempts for an accepted task, while B costs $0.04 and succeeds in one. Ignoring every other cost, A uses $0.06 and B uses $0.04. These numbers are invented arithmetic, not current provider prices or measured model results.

attempt_cost = {"A": 0.02, "B": 0.04}
attempts = {"A": 3, "B": 1}
for workflow in attempt_cost:
    print(workflow, attempt_cost[workflow] * attempts[workflow])

Now add the failed tasks that never reach acceptance. Divide total spend across all measured attempts by the number of accepted tasks, while also reporting the completion rate. A workflow that solves only the easiest cases should not hide its failures behind a cheap average.

Look for waste before downgrading the model

Trim irrelevant retrieved material, bound tool outputs, avoid repeating identical work, and reuse safe deterministic results where the product allows it. Cache invalidation still matters: a stale answer about account access is not a useful saving. Store only data your policy permits, and include the relevant version or scope in cache keys.

Use simpler deterministic code for operations that do not need model judgment. Formatting a date or checking a numeric limit usually should not require a generation call. Route genuinely difficult cases to appropriate review rather than allowing an inexpensive model to loop forever.

Make the budget operational

Set per-task limits for attempts, time, and spend where your platform supports them. Define what happens when a limit is reached: return a useful partial result, request review, or stop with an honest reason. Do not silently continue in a more expensive lane.

Compare configurations on the same representative tasks and report uncertainty. Recheck provider pricing when making a real purchasing decision; this article deliberately uses hypothetical numbers. The objective is a result people can use at a cost you can explain, not the lowest-looking number on a pricing table.

JP日本語
SubjectObjectVerbParticleTechnicalConnectorAdjectiveTime / context
CONTINUE IN MANABI KŌBŌ

Put this idea into practice

Reading Nook

Practice bilingual reading with Japanese scaffolding.

Open tool →
Guided Japanese Course

Continue with structured lessons and practice.

Open tool →
Adaptive Recall

Turn useful phrases into spaced practice.

Open tool →
RELATED NOTES
← Back to all articles
Share this note Email