Expand description
Model pricing — maps model names to per-million-token costs.
Functions§
- calculate_
cost - Calculate cost in USD from token counts and model name.
- cost_
per_ million - Returns (input_price, output_price) in USD per million tokens. Uses substring matching to handle version suffixes (e.g. “claude-sonnet-4-20250514”).
- format_
cost - Format cost as a human-readable string.