feat: add review effort accounting and budget governor
This commit is contained in:
@@ -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):")
|
||||
|
||||
Reference in New Issue
Block a user