feat(billing): migration 042 — seed Claude Sonnet 5 COGS, retire Sonnet 4.6#53
Merged
Conversation
…et 4.6 Seeds per-model raw COGS for Claude Sonnet 5 into metric_model_prices (input 2000 / output 10000 / cache_write 2500 / cache_read 200 µ$/1k = USD-per-1M x1000; the x1.2 markup is applied once at rollup, not stored) and deactivates the dropped Sonnet 4.6 rows (active=false, kept for historical reproducibility — never deleted). Opus 4.8 / Fable 5 stay unseeded while disabled (no adapter emit = dead pricing); Haiku 4.5 untouched. Down re-activates Sonnet 4.6 and drops the Sonnet 5 rows. Also repairs init-db.sql, which had drifted (missing the 041 \i line). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… µ$/1k) Match the api-platform roster: seed Sonnet 5 at the standard list price rather than the intro $2/$10, so it doesn't need a Sep 1 2026 hotfix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration 042 — per-model AI pricing catch-up for the 4-Claude roster.
anthropic.claude-sonnet-5) raw COGS intoms_billing.metric_model_prices: input3000/ output15000/ cache_write3750/ cache_read300µ$/1k (Anthropic standard list price $3/$15, = USD-per-1M × 1000). The ×1.2 markup is applied once at rollup, never stored — same RAW-COGS contract as migration 018.active = false, rows kept for historical reproducibility — never deleted; the rollup filtersactive = true).scripts/init-db.sql, which had drifted (missing the\iline for migration 041).Verified on the live dev Postgres: up applies clean, re-run idempotent, down reverses exactly to the 018 seed state.
Companion to api-platform's 4-Claude roster PR.
🤖 Generated with Claude Code