{"slug": "price-each-step-of-your-agent-before-you-pick-a-model-tier", "title": "Price each step of your agent before you pick a model tier", "summary": "An engineer published a script that prices each step of an agent pipeline against Anthropic's standard rate card, letting teams compare model tiers before committing. Using example values of 2 million calls at 1,200 input and 20 output tokens, the script shows Haiku 5.5 costing $260 versus $20,800 for Fable 5.2, and it accounts for Haiku's higher long-context rates above 100,000 tokens and the 50 percent Batch API discount. The engineer notes that validation costs do not shrink with the model, since small models hallucinate as readily as large ones.", "body_md": "Most agent pipelines send every step to one model. Usually it is the large one, picked because it passed the demo.\n\nThis 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.\n\nThe 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.\n\n```\nRATES = {  # USD per million tokens: (input, output)\n    \"haiku-5.5\": (0.10, 0.50),\n    \"sonnet-5.5\": (2.00, 10.00),\n    \"opus-5.5\": (4.00, 20.00),\n    \"fable-5.2\": (8.00, 40.00),\n}\nHAIKU_LONG = (0.50, 2.50)  # prompts over 100,000 tokens\n\ndef cost(model, tokens_in, tokens_out, batch=False):\n    rate_in, rate_out = RATES[model]\n    if model == \"haiku-5.5\" and tokens_in > 100_000:\n        rate_in, rate_out = HAIKU_LONG\n    usd = (tokens_in * rate_in + tokens_out * rate_out) / 1_000_000\n    return usd * 0.5 if batch else usd\n\n# one month of a classification step (example values)\ncalls, tin, tout = 2_000_000, 1_200, 20\nfor m in (\"haiku-5.5\", \"fable-5.2\"):\n    print(m, round(calls * cost(m, tin, tout), 2))\n```\n\nWith 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.\n\nValidation 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.\n\nThe full guide has the decision table and two hybrid routing patterns: [small language models](https://dev-station.tech/small-language-models/).", "url": "https://wpnews.pro/news/price-each-step-of-your-agent-before-you-pick-a-model-tier", "canonical_source": "https://dev.to/devstation026/price-each-step-of-your-agent-before-you-pick-a-model-tier-5hkj", "published_at": "2026-12-04 13:37:33+00:00", "updated_at": "2026-12-04 13:44:36.968293+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools"], "entities": ["Anthropic", "Haiku 5.5", "Fable 5.2", "Sonnet 5.5", "Opus 5.5"], "also_reported_by": [], "takeaway": "Price each pipeline step with its own call count and token sizes rather than defaulting to one large model, since a 2M-call classification step costs $260 on Haiku 5.5 versus $20,800 on Fable 5.2, and Haiku prompts over 100,000 tokens bill at 5x the base rate.", "recommendation": {"advice": "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.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/price-each-step-of-your-agent-before-you-pick-a-model-tier", "markdown": "https://wpnews.pro/news/price-each-step-of-your-agent-before-you-pick-a-model-tier.md", "text": "https://wpnews.pro/news/price-each-step-of-your-agent-before-you-pick-a-model-tier.txt", "jsonld": "https://wpnews.pro/news/price-each-step-of-your-agent-before-you-pick-a-model-tier.jsonld"}}