You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Estimate refused requests at the cost Anthropic bills #489
The session cost estimate counts every request with usage reported by the API, including refused requests. Under Anthropic's refusal billing rules, a refusal that arrives before any output is billed only for some policy categories (bio, frontier_llm, and reasoning_extraction at the time of writing). Other categories and refusals without a category incur no charge, so the estimate overstates the cost of those refusals. Decide whether the estimate should follow these rules, since Anthropic says the billed categories may change.
Acceptance criteria
Record the decision in the session cost section of docs/design/session/persistence.md.
If the estimate follows the rules, refusals before any output in unbilled categories add nothing to the session total. Add a test covering a billed and an unbilled category.
Notes
TurnReport::record collects usage for each round, and Engine::roll_back (#475) bills the rounds of a refused turn.
Activity
fix(engine): roll a refused turn back so a rephrased prompt can succe…