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
Commit f816387
Browse filesBrowse the repository at this point in the historyBrowse files
| usage_delta | model_family | deepseek, claude, gpt, gemini, llama, qwen, kimi, glm, other, or unknown |
56
+
| usage_delta | usage_status | reported or missing |
57
+
| usage_delta | accounting_source | provider or engine |
54
58
| session_ended | mode | chat or task |
55
59
| session_ended | duration | a band: under 1m, 1-5m, 5-30m, 30m-2h, 2h or more |
56
60
| session_ended | turns | a count band |
@@ -67,8 +71,8 @@ any of the three drift apart.
67
71
68
72
Count bands are 0, 1, 2-5, 6-20, 21-100 and 100+. Dollar bands are 0, under
69
73
0.01, 0.01-0.1, 0.1-1, 1-10 and 10+.
70
-
Each numeric usage delta is written when provider accounting arrives, including
71
-
tokens read from cache once. Missing usage contributes no event. Deltas, rather
74
+
Each provider usage receipt is appended locally before provider accounting returns, including
75
+
tokens read from cache once. Missing provider receipts produce a `usage_status = missing`event without token fields; a missing receipt never invents a zero total. Routing categories follow the actual attempt, including an explicitly authorized billing-door switch and any later generation receipt. Bounded routing and model-family categories describe reported usage without sending exact model names or endpoint addresses. Hosted engines currently report aggregate turn deltas with unknown routing and family, labelled `accounting_source = engine`; those aggregates are not per-call receipts and can be lost before a turn ends. Deltas, rather
72
76
than repeated session totals, make the stream safe to sum while a run is open.
73
77
74
78
first_run carries only the every-event properties and is sent once per
@@ -82,7 +86,7 @@ ids never leave this machine.
82
86
83
87
Prompts, model replies, code, file names, paths, repo or directory names, git
84
88
remotes, hostnames, usernames, IP addresses, environment values, API keys,
85
-
email addresses, model names, error text, panic messages. A test builds every
89
+
email addresses, exact model names, custom model names, error text, panic messages. Public model-family categories are sent as described above. A test builds every
86
90
event from inputs stuffed with exactly these and fails if any of them reach
87
91
the marshalled output.
88
92
@@ -93,7 +97,7 @@ per request, every 30 seconds while a session is open and once more when it
93
97
ends. Nothing older than 7 days is sent and at most 1000 lines are kept. An
94
98
event whose version is unknown is dropped at send time and never leaves the
95
99
machine. The spool is plain JSON lines, so what has not left yet can be read
96
-
with any editor.
100
+
with any editor. A local warning reports storage failures or counts discarded by the age/size limits; it contains no event contents. These warnings do not establish how many tokens were lost.
97
101
98
102
## Turning it off
99
103
@@ -148,3 +152,5 @@ the count GitHub already shows on the release page. Sidecar files such as
148
152
`.github/workflows/release-downloads.yml`; the script behind it is
149
153
`scripts/release_downloads.py`, and running it with `--dry-run` prints the
150
154
batch it would send.
155
+
156
+
The release-download workflow fails visibly when its production PostHog key or GitHub token is missing; dry-run still works without a PostHog key.
title: Usage receipts distinguish routing, model families and missing counts
4
+
pr: 1755
5
+
surface: [engine, remote, build, docs]
6
+
invalidates:
7
+
- "Usage telemetry carried only positive token totals. It now includes bounded routing and model-family categories and explicitly records missing provider receipts without token totals."
8
+
- "Provider usage appends ran on background goroutines. Completed receipts are now appended before accounting returns, while network delivery stays periodic."
9
+
- "Usage categories named the initial service even after a plan overflow. They now follow the actual attempt route, including later generation receipt recovery. Periodic delivery no longer holds the local append lock across network requests."
10
+
- "Missing release-download credentials silently passed the scheduled job. Production reporting now fails visibly when required credentials are absent."
codeaf sends anonymous session counts and provider-reported input/output token counts when telemetry is enabled. Usage receipts include a bounded routing-service category and public model family, never an exact model name, endpoint address, prompt, code, path or API key. Missing provider receipts have a missing status and no invented token total. Completed local provider receipts are appended before accounting returns, then sent every 30 seconds and at shutdown. Hosted chat currently sends turn aggregates with unknown provider and family; work lost before a turn ends is not guaranteed to appear.
6
+
7
+
## Turning anonymous counts off
8
+
9
+
Set `CODEAF_TELEMETRY=off`, `DO_NOT_TRACK=1`, or the telemetry switch in `/settings`. Project settings can also turn telemetry off. Disabled telemetry sends no usage receipts. The detailed public contract is in `docs/TELEMETRY.md`.
0 commit comments