# Price each step of your agent before you pick a model tier

> Source: <https://dev.to/devstation026/price-each-step-of-your-agent-before-you-pick-a-model-tier-5hkj>
> Published: 2026-12-04 13:37:33+00:00

**Recommendation:** Run the per-step cost script against your real logs before choosing a model tier, and remember Haiku 5.5 prompts over 100,000 tokens bill at 0.50/2.50 per million instead of 0.10/0.50.
More in the playbook "Controlling LLM cost": <https://wpnews.pro/playbooks/llm-cost>

Most agent pipelines send every step to one model. Usually it is the large one, picked because it passed the demo.

This post is the engineer's companion to our guide on [small language models](https://dev-station.tech/small-language-models/). It turns the cost section of that guide into a script you can run against your own logs.

The rates below are the Anthropic standard rate card in USD per million tokens, checked on 30 November 2026. Haiku 5.5 charges 0.10 for input and 0.50 for output, while Fable 5.2 charges 8.00 and 40.00. One catch. A Haiku 5.5 prompt over 100,000 tokens is billed at 0.50 and 2.50.

```
RATES = {  # USD per million tokens: (input, output)
    "haiku-5.5": (0.10, 0.50),
    "sonnet-5.5": (2.00, 10.00),
    "opus-5.5": (4.00, 20.00),
    "fable-5.2": (8.00, 40.00),
}
HAIKU_LONG = (0.50, 2.50)  # prompts over 100,000 tokens

def cost(model, tokens_in, tokens_out, batch=False):
    rate_in, rate_out = RATES[model]
    if model == "haiku-5.5" and tokens_in > 100_000:
        rate_in, rate_out = HAIKU_LONG
    usd = (tokens_in * rate_in + tokens_out * rate_out) / 1_000_000
    return usd * 0.5 if batch else usd

# one month of a classification step (example values)
calls, tin, tout = 2_000_000, 1_200, 20
for m in ("haiku-5.5", "fable-5.2"):
    print(m, round(calls * cost(m, tin, tout), 2))
```

With those example values the script prints 260.0 for Haiku 5.5 and 20800.0 for Fable 5.2. Swap in the call count and token sizes of a real step from your logs. The `batch` flag applies the 50 percent Batch API discount for work that can wait.

Validation does not shrink with the model. A small model hallucinates as readily as a large one, so the test set stays the same size whichever tier wins.

The full guide has the decision table and two hybrid routing patterns: [small language models](https://dev-station.tech/small-language-models/).
