Skip to main content

Module pricing

Module pricing 

Source
Expand description

Per-model USD pricing for cost reporting.

Values in $ per 1M tokens. Returns None for unknown models so that the caller can set total_cost_usd = None. Public DeepSeek list pricing as of late 2025 — adjust as needed.

Structs§

ModelPricing

Functions§

map_stop_reason
Map OpenAI finish_reason to a Claude-style stop_reason.
model_pricing
turn_cost_usd
Convert a turn’s UsageInfo into a USD cost given the model. Returns None if pricing is unknown.