def get_estimated_cost(input_tokens: int, output_tokens: int, llm_model: str):
    """Calculate estimated cost for token usage with a specific model."""
    pricing = get_pricing(llm_model)
    if not pricing:
        return "Unknown"
    
    # Convert token counts to millions for pricing calculation using Decimal
    input_tokens_millions = Decimal(str(input_tokens)) / Decimal('1000000')
    output_tokens_millions = Decimal(str(output_tokens)) / Decimal('1000000')
    
    input_cost = Decimal(str(pricing["input"])) * input_tokens_millions
    output_cost = Decimal(str(pricing["output"])) * output_tokens_millions
    total = input_cost + output_cost

    # to 4 decimal places
    return f"~${float(round(total, 4))}"
Calculate estimated cost for token usage with a specific model.
src/upsonic/model_registry.py