Story
As a cost-reporting maintainer,
I want verify that claude-opus-4-8 resolves to the correct standard per-MTok rate in model-pricing.tsv and add a test that pins that behavior,
so that cost reports and ET multipliers stay accurate for the new model id without introducing the rejected Fast Mode rate.
Acceptance Criteria
- It is confirmed (and recorded in the PR) that
price_for claude-opus-4-8 <a-2026-date> resolves via the existing claude-opus-4-* glob (effective 2025-11-01) to 5.00 0.50 6.25 25.00 — the same standard rate that already prices claude-opus-4-7.
- If, and ONLY if, an authoritative source (the Anthropic pricing page cited in
model-pricing.tsv) shows the STANDARD (non-Fast-Mode) Opus 4.8 input/output rate differs from the wildcard, an explicit date-versioned claude-opus-4-8* row is APPENDED (never editing an existing row) with the verified rate; otherwise no row is added and the PR documents that the wildcard already prices it correctly.
- No Fast Mode / express pricing ($10/$50 or any fast-mode surcharge) is added — consistent with
model-pricing.tsv's stated convention that fast-mode surcharges are not modelled, and with the maintainer's rejection of the express tier.
- A bats test in
tests/model_pricing.bats asserts price_for claude-opus-4-8 (and et_multiplier_for claude-opus-4-8 = 5.0) returns the expected standard rate, mirroring the existing opus-4-7 cases, so the behavior is locked against future table edits.
bats tests/model_pricing.bats passes.
Tasks / Subtasks
Dev Notes
- Grounding:
scripts/lib/model-pricing.tsv has the row claude-opus-4-* 2025-11-01 5.00 0.50 6.25 25.00, and the more-specific legacy rows claude-opus-4-1* / claude-opus-4-0* at $15. The selection rule is most-specific-glob then latest-effective_from (see the TSV header and price_for in scripts/lib/model-pricing.sh). claude-opus-4-8 matches only the claude-opus-4-* wildcard, so it already prices at $5/$0.50/$6.25/$25 — identical to how tests/model_pricing.bats line 15-16 asserts for claude-opus-4-7.
- Because the standard rate is already correct via the wildcard, the EXPECTED outcome is: no new pricing row, plus a regression test that locks opus-4-8 to the wildcard rate. Only append a row if the authoritative Anthropic pricing page shows a different STANDARD opus-4-8 rate — do not guess a price.
- The idea's $10/$50 figure is the Fast Mode rate, which this table explicitly does NOT model (see TSV header: 'fast-mode ... surcharges are NOT modelled') and which the maintainer rejected operationally. Do not introduce it.
- PRICE-CHANGE DISCIPLINE: never edit an existing row; APPEND a new effective-dated row (TSV header rule). Prices are data, reviewed as data (AGENTS.md cost reporting).
- Testing standards: extend
tests/model_pricing.bats following the existing opus-4-7 test cases (price_for exact-string assertion + et_multiplier_for = 5.0). Run bats tests/model_pricing.bats.
Project Structure Notes
Touches only the pricing data table and its bats test; both are first-party. No engine or routing change.
References
- scripts/lib/model-pricing.tsv#claude-opus-4-wildcard
- scripts/lib/model-pricing.sh#price_for
- tests/model_pricing.bats#opus-4-7-cases
- AGENTS.md#cost-reporting
Likely target surface
scripts/lib/model-pricing.tsv
tests/model_pricing.bats
Story prepared by the BMAD Scrum Master (Bob) for epic #835. Status: ready-for-dev.
Story
As a cost-reporting maintainer,
I want verify that claude-opus-4-8 resolves to the correct standard per-MTok rate in model-pricing.tsv and add a test that pins that behavior,
so that cost reports and ET multipliers stay accurate for the new model id without introducing the rejected Fast Mode rate.
Acceptance Criteria
price_for claude-opus-4-8 <a-2026-date>resolves via the existingclaude-opus-4-*glob (effective 2025-11-01) to5.00 0.50 6.25 25.00— the same standard rate that already pricesclaude-opus-4-7.model-pricing.tsv) shows the STANDARD (non-Fast-Mode) Opus 4.8 input/output rate differs from the wildcard, an explicit date-versionedclaude-opus-4-8*row is APPENDED (never editing an existing row) with the verified rate; otherwise no row is added and the PR documents that the wildcard already prices it correctly.model-pricing.tsv's stated convention that fast-mode surcharges are not modelled, and with the maintainer's rejection of the express tier.tests/model_pricing.batsassertsprice_for claude-opus-4-8(andet_multiplier_for claude-opus-4-8 = 5.0) returns the expected standard rate, mirroring the existing opus-4-7 cases, so the behavior is locked against future table edits.bats tests/model_pricing.batspasses.Tasks / Subtasks
Dev Notes
scripts/lib/model-pricing.tsvhas the rowclaude-opus-4-* 2025-11-01 5.00 0.50 6.25 25.00, and the more-specific legacy rowsclaude-opus-4-1*/claude-opus-4-0*at $15. The selection rule is most-specific-glob then latest-effective_from (see the TSV header andprice_forinscripts/lib/model-pricing.sh).claude-opus-4-8matches only theclaude-opus-4-*wildcard, so it already prices at $5/$0.50/$6.25/$25 — identical to howtests/model_pricing.batsline 15-16 asserts forclaude-opus-4-7.tests/model_pricing.batsfollowing the existing opus-4-7 test cases (price_for exact-string assertion + et_multiplier_for = 5.0). Runbats tests/model_pricing.bats.Project Structure Notes
Touches only the pricing data table and its bats test; both are first-party. No engine or routing change.
References
Likely target surface
scripts/lib/model-pricing.tsvtests/model_pricing.batsStory prepared by the BMAD Scrum Master (Bob) for epic #835. Status: ready-for-dev.