Keep one account for a multi-request AI task
Purpose
Group related model requests into a task whose outcome and total cost staff can inspect.
How It Works
A consuming feature opens an execution around the work it wants to account for. The wrapper supplies a context that associates its model requests with that execution. Each request still passes through normal admission and settlement. Settlements add to the execution’s counters as they become final. A refusal remains associated with the task without becoming a settled request count. The wrapper closes the task according to whether its work returns or throws. Reusing an idempotency key retrieves the prior execution without repeating the work. Recovery later identifies abandoned tasks and reports counter drift.
Relationships
- Run AI requests with consistent attribution and accounting supplies the prerequisite behavior for this outcome.