{% extends "base.html" %} {% block title %}Cost — didiAI Dashboard{% endblock %} {% block content %}

Cost Tracking

Estimated spend across search + LLM providers. Real billing lives with each provider.

Last 24h

${{ "%.4f"|format(cost_24h) }}

estimated

Last 7 days

${{ "%.2f"|format(cost_7d) }}

rolling

Last 30 days

${{ "%.2f"|format(cost_30d) }}

rolling

Projected monthly

${{ "%.2f"|format(projected_monthly) }}

24h burn × 30

Provider Budgets (live)

{% for b in budgets %}
{{ b.name }} {{ b.kind }} {% if b.plan_price %}· ${{ "%.0f"|format(b.plan_price) }}/mo{% endif %}
{% if b.unit == 'usd' %}${% endif %}{{ "%.2f"|format(b.used) }} / {% if b.unit == 'usd' %}${% endif %}{{ "%.0f"|format(b.limit) }} ({{ b.percent }}%)
{% set color = 'bg-emerald-500' %} {% if b.percent >= 90 %}{% set color = 'bg-rose-500' %} {% elif b.percent >= 70 %}{% set color = 'bg-amber-500' %} {% elif b.percent >= 50 %}{% set color = 'bg-sky-500' %} {% endif %}
{% endfor %}

By Provider (30d)

{% for row in by_provider %} {% else %} {% endfor %}
Provider Requests Cost
{{ row.provider }} {{ row.count }} ${{ "%.4f"|format(row.cost) }}
No data

By Tier (30d)

{% for row in by_tier %} {% else %} {% endfor %}
Tier Requests Cost
{{ row.tier }} {{ row.count }} ${{ "%.4f"|format(row.cost) }}
No data

Top 10 Most Expensive (30d)

{% for item in top %} {% else %} {% endfor %}
Time Tier Query Cost
{{ item.created_at.strftime('%m-%d %H:%M') if item.created_at else '—' }} {{ item.tier }} {{ item.claim or item.query or '—' }} ${{ "%.4f"|format(item.cost_usd|float) }}
No data
{% endblock %}