Skip to main content

Module usage

Module usage 

Source
Expand description

Append-only provider-usage recording.

Writes one JSONL line per model call under .aacode/usage/usage.jsonl. Only token counts and request metadata are stored — never prompt or response text. Telemetry must never break a task, so all errors are swallowed.

Env: AACODE_USAGE_LOG=0 disables; AACODE_USAGE_VERBOSE=1 prints one compact line per call.

Structs§

UsageTracker

Functions§

usage_event
Build the JSONL event for one model call. usage is the normalized usage (if the provider reported it); pass None when missing.