feat: add review effort accounting and budget governor

This commit is contained in:
Claude
2026-09-01 11:41:08 +00:00
parent a202bd3598
commit 3a10deef06
15 changed files with 522 additions and 23 deletions
+11
View File
@@ -741,6 +741,17 @@ def _render_collapsible_usage(usage: dict | None, model: str, config: dict | Non
f"- **Actual**: {actual_s}{actual_note}",
f"- **Scope**: {scope}",
]
if usage.get("budget_cap_hit"):
lines.append(
f"- **Budget**: capped at `{usage.get('budget_cap_reason', 'configured limit')}`"
)
budget = (config or {}).get("budget") or {}
if budget:
limits = ", ".join(
f"{key.removeprefix('max_')}={value}"
for key, value in budget.items()
)
lines.append(f"- **Budget limits**: {limits}")
if eq_rows:
lines.append("")
lines.append("- **Equivalent cost on paid providers** (this run's tokens):")