{% extends "base.html" %} {% block title %}セッション比較 - llm-devproxy{% endblock %} {% block content %}
{% if session_a and session_b %}

{{ session_a.name }}

Steps {{ summary_a.steps }}
Total cost ${{ "%.4f"|format(summary_a.total_cost) }}
Avg cost/step ${{ "%.6f"|format(summary_a.avg_cost) }}
Input tokens {{ "{:,}".format(summary_a.total_input) }}
Output tokens {{ "{:,}".format(summary_a.total_output) }}
{% if summary_a.total_reasoning > 0 %}
🧠 Reasoning tokens {{ "{:,}".format(summary_a.total_reasoning) }} ({{ summary_a.reasoning_pct }}%)
{% endif %}
Cache hits {{ summary_a.cached }}
Models {{ summary_a.models | join(", ") }}
DIFF
{% set cost_diff = summary_b.total_cost - summary_a.total_cost %}
{{ "+" if cost_diff > 0 else "" }}${{ "%.4f"|format(cost_diff) }}
{% set step_diff = summary_b.steps - summary_a.steps %}
{{ "+" if step_diff > 0 else "" }}{{ step_diff }} steps
{% set token_diff = summary_b.total_tokens - summary_a.total_tokens %}
{{ "+" if token_diff > 0 else "" }}{{ "{:,}".format(token_diff) }} tok

{{ session_b.name }}

Steps {{ summary_b.steps }}
Total cost ${{ "%.4f"|format(summary_b.total_cost) }}
Avg cost/step ${{ "%.6f"|format(summary_b.avg_cost) }}
Input tokens {{ "{:,}".format(summary_b.total_input) }}
Output tokens {{ "{:,}".format(summary_b.total_output) }}
{% if summary_b.total_reasoning > 0 %}
🧠 Reasoning tokens {{ "{:,}".format(summary_b.total_reasoning) }} ({{ summary_b.reasoning_pct }}%)
{% endif %}
Cache hits {{ summary_b.cached }}
Models {{ summary_b.models | join(", ") }}

{{ session_a.name }} — ステップ一覧 📍 タイムライン →

{% if records_a %} {% for item in records_a %} {% endfor %}
# Prompt Cost
{{ item.record.step_id }} {{ item.prompt_preview }} {% if item.record.is_cached %} cached {% else %} ${{ "%.4f"|format(item.record.cost_usd) }} {% endif %}
{% else %}

ステップなし

{% endif %}

{{ session_b.name }} — ステップ一覧 📍 タイムライン →

{% if records_b %} {% for item in records_b %} {% endfor %}
# Prompt Cost
{{ item.record.step_id }} {{ item.prompt_preview }} {% if item.record.is_cached %} cached {% else %} ${{ "%.4f"|format(item.record.cost_usd) }} {% endif %}
{% else %}

ステップなし

{% endif %}
{% elif a or b %}

2つのセッションを選択してください

比較するセッションを両方選んでください。

{% else %}

セッションを選択して比較

2つのセッションを選ぶと、コスト・トークン・ステップの比較ができます。
rewind前後のセッションを比較して、プロンプト改善の効果を確認できます。

{% endif %} {% endblock %}