"""billing.pricing — Cost calculation per model."""
from __future__ import annotations

PRICING = {
    "claude-sonnet-4-20250514": {"input": 3.0, "output": 15.0},
    "claude-opus-4-20250514": {"input": 15.0, "output": 75.0},
    "gpt-4o": {"input": 2.5, "output": 10.0},
    "gpt-4o-mini": {"input": 0.15, "output": 0.6},
    "qwen-max": {"input": 1.0, "output": 2.0},
    "qwen3-max-2026-01-23": {"input": 1.0, "output": 2.0},
}

def calculate_cost(model: str, input_tokens: int, output_tokens: int) -> float:
    prices = PRICING.get(model, {"input": 1.0, "output": 2.0})
    return (input_tokens / 1_000_000 * prices["input"] +
            output_tokens / 1_000_000 * prices["output"])
