asa / scripts /lib /chat /pricing.py
defenestrate's picture
ASA Space: squashed history (instructions and settings live in the private pack)
526950e
Raw History Blame Contribute Delete
568 Bytes
"""Token pricing constants used by chat analytics and session-core planning."""
from __future__ import annotations
# Pricing per token (USD), Anthropic public pricing as of 2026.
# Sonnet 4.6: $3/M input, $15/M output.
# Cache write costs 1.25x input for ephemeral 5-minute cache.
# Cache read costs 0.10x input. Extended 1-hour cache writes cost 2.00x input.
PRICE_SONNET_IN = 3.00 / 1_000_000
PRICE_SONNET_OUT = 15.00 / 1_000_000
PRICE_SONNET_CACHE_WRITE = 3.75 / 1_000_000
PRICE_SONNET_CACHE_READ = 0.30 / 1_000_000
PRICE_SONNET_CACHE_WRITE_1H = 6.00 / 1_000_000