{% macro percent(success, total) %}{% if total %}{{ "%.1f" | format(success / total * 100) }}%{% else %}-{% endif %}{% endmacro %} {% macro ms(value) %}{% if value is none %}-{% else %}{{ value | round | int }}ms{% endif %}{% endmacro %} {% macro dash(value) %}{% if value is none or value == "" %}-{% else %}{{ value }}{% endif %}{% endmacro %} {% macro tiles() %} {% set total = (stats.totals.success or 0) + (stats.totals.error or 0) %}
Total requests
{{ total }}
Success rate
{{ percent(stats.totals.success or 0, total) }}
Models tracked
{{ stats_table_models_total }}
Last updated
{{ local_dt(stats_generated_iso, "ago") }}
{% endmacro %} {% macro model_rows() %} {% for row in stats_table_models %} {% set health = row.health or {} %} {{ row.model }} {{ row.provider }} {{ row.total_requests }} {{ percent(row.success_requests, row.total_requests) }} {{ ms(row.avg_latency_ms) }} {{ dash(row.avg_tokens_per_second) }} {{ dash(health.weight) }} {% if health.circuit_open %}open{% else %}closed{% endif %} {{ row.prompt_tokens }} {{ row.completion_tokens }} {% else %} No requests in this range. {% endfor %} {% endmacro %} {% macro failure_rows() %} {% for row in stats.recent_failures %} {{ local_dt(row.created_at) }} {{ dash(row.model) }} {{ dash(row.provider) }} {{ dash(row.endpoint) }} {{ dash(row.status_code) }} {{ dash(row.reason) }} {{ row.fallback_used_route or "no fallback" }} {% else %} No failures in this range. {% endfor %} {% endmacro %}