DEVELOPER NOTES
The cheap model can be the expensive workflow
Compare total cost per accepted task, including retries, tool usage, review, and avoidable rework.

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.
安いモデルでも作業全体は高くなる
トークン単価だけでは、完成した仕事の費用は分からない。再試行、追加ツール、人の修正が多ければ安いモデルの方が高くなる。逆に単純な課題に高価な推論は不要かもしれない。
受け入れ条件を先に決める
コードなら要求動作、検査、レビューできる差分を成功とする。分類なら正しいラベルと不確実性の扱いを決める。初回成功と修正後成功を分け、失敗、再試行、ツール費、人の確認時間を含める。人の時間を勝手な金額に換算して精密な結果と見せない。
架空の計算例
Aが一回0.02ドルで三回、Bが0.04ドルで一回なら、他の費用を除きAは0.06、Bは0.04ドルだ。現在の料金でも測定結果でもない。
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])
最後まで解けなかった試行の費用も含め、総費用を合格タスク数で割る。完了率も並べ、簡単な課題だけの安い平均を見せない。
無駄と上限を管理する
不要な検索文、長すぎるツール出力、同一作業の反復を減らす。安全な決定的結果は再利用できるが、権限などの古い結果をキャッシュしない。版と範囲を鍵に含め、保存方針を守る。日付整形や数値制限は通常コードで処理する。
試行、時間、費用に上限を置き、達したら部分結果、レビュー、理由付き停止などを選ぶ。勝手に高価な経路へ切り替えない。同じ課題で比較し、実際の購入時は最新料金を確認する。説明できる費用で使える結果を得ることが目標だ。



