ctxoptimizer

v{{ version }} · mode {{ mode }} · local only

{% if privacy %}

Privacy: payload capture is enabled ({{ capture }}); captured text stays local. Use Settings or ctxoptimizer purge --all to manage it.

{% endif %}

Period: today · 7d · 30d · all (current: {{ period }})

Requests
{{ summary["requests"] }}
Actual spend
${{ "%.6f"|format(summary["cost_usd"]) }}
Baseline sim.
${{ "%.6f"|format(summary["baseline_usd"]) }}
Savings sim.
${{ "%.6f"|format([summary["baseline_usd"] - summary["cost_usd"], 0]|max) }}
Waste est.
${{ "%.6f"|format(waste["cost_usd"]) }}
Fresh input
{{ summary["fresh_input"] }}
Cache read
{{ summary["cache_read"] }}
Cache hit ratio
{% set total = summary["fresh_input"] + summary["cache_read"] %}{% if total %}{{ "%.1f%%"|format(100 * summary["cache_read"] / total) }}{% else %}—{% endif %}
Tokens removed est.
{{ summary["tokens_removed"] }}
Output
{{ summary["output_tokens"] }}
{% if points %}

Spend over time sim.

{% if spend_line %} {% endif %} {% for point in points %} {% endfor %}
BucketCost (USD)
{{ point["bucket"] }}${{ "%.6f"|format(point["value"] or 0) }}
{% endif %} {% if waste_points %}

Waste over time est.

{% if waste_line %} {% endif %} {% for point in waste_points %} {% endfor %}
BucketFindingsEst. tokensEst. USD
{{ point["bucket"] }}{{ point["findings"] }} {{ point["tokens"] }}${{ "%.6f"|format(point["cost_usd"] or 0) }}
{% endif %}

Recent requests

{% for row in rows %} {% else %} {% endfor %}
TimeClientProviderModel FreshCache readOutputCostOutcome
{{ row["ts"]|round(0) }} {{ row["client"] or "—" }} {{ row["provider"] }} {{ row["model"] or "—" }} {{ row["fresh_input"] if row["fresh_input"] is not none else "—" }} {{ row["cache_read"] if row["cache_read"] is not none else "—" }} {{ row["output_tokens"] if row["output_tokens"] is not none else "—" }} ${{ "%.6f"|format(row["cost_actual_usd"] or 0) }} {{ row["outcome"] or "—" }}
No requests recorded yet.

Per project

{% for row in projects %} {% else %} {% endfor %}
ProjectRequestsCostFreshCache readOutput
{{ row["name"] or "—" }}{{ row["requests"] }} ${{ "%.6f"|format(row["cost_usd"]) }}{{ row["fresh_input"] }} {{ row["cache_read"] }}{{ row["output_tokens"] }}
No project data yet.

Per model

{% for row in models %} {% else %} {% endfor %}
ModelRequestsCostFreshCache readOutput
{{ row["name"] or "—" }}{{ row["requests"] }} ${{ "%.6f"|format(row["cost_usd"]) }}{{ row["fresh_input"] }} {{ row["cache_read"] }}{{ row["output_tokens"] }}
No model data yet.

Metadata only; prompts are not shown. API: summary · requests · timeseries.