Skip to content

fix(pricing): Claude Haiku 4.5 actual Anthropic pricing ($0.25 → $1.00/M)#37

Merged
engkimo merged 1 commit into
mainfrom
fix/haiku-4-5-pricing
May 19, 2026
Merged

fix(pricing): Claude Haiku 4.5 actual Anthropic pricing ($0.25 → $1.00/M)#37
engkimo merged 1 commit into
mainfrom
fix/haiku-4-5-pricing

Conversation

@engkimo

@engkimo engkimo commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

Both Morphic cost tables had Haiku 4.5 priced at Haiku 3.5-era levels ($0.25 input / $1.25 output per 1M tokens). Anthropic's actual Haiku 4.5 public pricing is $1.00 input / $5.00 output per 1M tokens.

This made every Haiku-tier cost projection (including yesterday's #36 planner cost simulation) understate real spend by ~4× on input and on output.

Changes

  • application/use_cases/cost_estimator.py — MODEL_COST_TABLE input: $0.25 → $1.00/M
  • domain/services/engine_cost_calculator.py — _MODEL_PRICING: ($0.25, $1.25) → ($1.00, $5.00)/M
  • Refreshed "Updated YYYY-MM" comment

Impact on cost simulation

Re-running benchmarks/planner_cost_simulation.py with corrected pricing:

  • Sonnet → Haiku savings drop from −66.7% → −67% (still very strong; Haiku output is now $5 vs Sonnet $15 → 3× output saving instead of 3× — Haiku stays decisively cheaper)
  • Padding conclusion unchanged (still net-negative for short-prompt workloads)
  • Recommendation unchanged: switch planner default to Haiku 4.5 when Claude tier is opted into

Test plan

  • uv run --extra dev pytest tests/unit/ -q — 3,235 passed, 0 regressions
  • uv run --extra dev ruff check . — clean
  • test_haiku_cheaper_than_sonnet invariant still holds ($1 < $3)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated pricing information for the Claude Haiku model. Input and output token costs have been revised to reflect current market rates, which will affect cost calculations and budget estimates for operations using this model.

Review Change Stack

Both cost tables had Haiku 4.5 at Haiku 3.5-era prices ($0.25/$1.25 per
1M tokens). Actual Anthropic 4.5 pricing is $1.00/$5.00. This made every
Haiku-tier cost projection (incl. the planner cost simulation) understate
real spend by 4×.

- application/use_cases/cost_estimator.py: input $0.25 → $1.00
- domain/services/engine_cost_calculator.py: ($0.25, $1.25) → ($1.00, $5.00)
- All 3,235 unit tests still pass (haiku < sonnet invariant intact: $1 < $3)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7b3d983-d61e-4f67-ae36-7caaa3833ce3

📥 Commits

Reviewing files that changed from the base of the PR and between f86706a and fd423c1.

📒 Files selected for processing (2)
  • application/use_cases/cost_estimator.py
  • domain/services/engine_cost_calculator.py

📝 Walkthrough

Walkthrough

This PR updates token pricing for the claude-haiku-4-5-20251001 Anthropic model across two cost-calculation modules. The cost estimator's input token rate increases from 0.25 to 1.00 per 1M tokens, while the engine cost calculator applies a more comprehensive update to both input and output rates (1.00 and 5.00 respectively), and refreshes the pricing verification timestamp to May 2026.

Changes

Model Pricing Update

Layer / File(s) Summary
claude-haiku-4-5-20251001 pricing update
application/use_cases/cost_estimator.py, domain/services/engine_cost_calculator.py
Input token cost per 1M tokens raised from 0.25 to 1.00 in the cost estimator. Engine cost calculator updated with new per-1M-token rates of (1.00 input, 5.00 output) replacing (0.25 input, 1.25 output), and pricing verification timestamp updated from 2026-03 to 2026-05-19.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Prices rise like spring's fresh carrots,
From 0.25 to 1.00, the tokens now soar,
Haiku speaks at higher rates,
Two tables aligned in harmony's dance,
May's pricing blooms anew! 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating Claude Haiku 4.5 pricing from $0.25 to $1.00 per million input tokens to match Anthropic's actual pricing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/haiku-4-5-pricing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@engkimo engkimo merged commit 8ccb3f3 into main May 19, 2026
6 checks passed
@engkimo engkimo deleted the fix/haiku-4-5-pricing branch May 19, 2026 00:54
engkimo added a commit that referenced this pull request May 22, 2026
- Promote Unreleased CHANGELOG entry to v0.6.3 (2026-05-22), rolling up
  7 PRs since v0.6.2: TD-195 router (#40), plan-evaluator fix (#39),
  Haiku A/B (#38), Haiku pricing fix (#37), cost-sim harness (#36),
  TD-189 step 5 CLI (#35).
- Bump pyproject + main.py + version consistency test + uv.lock.
- Refresh CLAUDE.md version banner to 0.6.3 / 2026-05-22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant