lesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletelesson 3 of 4 · the 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsoletethe 2023-2026 model price war — and why your cost model is already obsolete
Write cost_per_user_month(usage) that takes a usage profile dict
and returns the projected dollar cost per user per month as a float
rounded to 2 decimals.
usage has four fields:
messages_per_day: int — how many model calls per day for this useravg_input_tokens: int — average input tokens per callavg_output_tokens: int — average output tokens per callmodel: str — one of"haiku","sonnet","opus"
Use these 2026-real prices per million tokens (input / output):
haiku: $1.00 / $5.00sonnet: $2.00 / $10.00opus: $5.00 / $25.00
Treat one month as 30 days.
Two demo users run. Expected output:
power user (haiku): $1.72/user/mo
pro user (sonnet): $2.76/user/mo