| 128 | |
| 129 | @dataclass |
| 130 | class StatsSummary: |
| 131 | total_requests: int |
| 132 | time_range_s: float |
| 133 | by_tier: dict[str, TierSummary] |
| 134 | by_decision_tier: dict[str, int] |
| 135 | by_served_quality: dict[str, int] |
| 136 | by_capability_lane: dict[str, int] |
| 137 | by_model: dict[str, ModelSummary] |
| 138 | by_transport: dict[str, ModelSummary] |
| 139 | by_cache_mode: dict[str, ModelSummary] |
| 140 | by_cache_family: dict[str, ModelSummary] |
| 141 | by_mode: dict[str, int] |
| 142 | by_method: dict[str, int] |
| 143 | complexity_distribution: dict[str, int] |
| 144 | avg_confidence: float |
| 145 | avg_savings: float |
| 146 | avg_latency_us: float |
| 147 | avg_input_reduction_ratio: float |
| 148 | avg_cache_hit_ratio: float |
| 149 | total_estimated_cost: float |
| 150 | total_baseline_cost: float |
| 151 | total_actual_cost: float |
| 152 | total_savings_absolute: float |
| 153 | total_savings_ratio: float |
| 154 | total_cache_savings: float |
| 155 | total_compaction_savings: float |
| 156 | total_usage_input_tokens: int |
| 157 | total_usage_output_tokens: int |
| 158 | total_cache_read_input_tokens: int |
| 159 | total_cache_write_input_tokens: int |
| 160 | total_cache_breakpoints: int |
| 161 | total_input_tokens_before: int |
| 162 | total_input_tokens_after: int |
| 163 | total_artifacts_created: int |
| 164 | total_compacted_messages: int |
| 165 | total_semantic_summaries: int |
| 166 | total_semantic_calls: int |
| 167 | total_semantic_failures: int |
| 168 | total_semantic_quality_fallbacks: int |
| 169 | total_checkpoints_created: int |
| 170 | total_rehydrated_artifacts: int |
| 171 | |
| 172 | |
| 173 | # ─── Storage abstraction ─── |