213. Usage is observed through each provider's official telemetry into one provider-neutral record, and reported, estimated and billed amounts are never merged
Kontext
The owner ordered automatic token and model tracking (10-12) and then a generic fabric rather than three provider subsystems (10-13). docs/ECONOMICS.md already classes every number, and economics::usage already normalises Anthropic and OpenAI usage for benchmark runs. Telemetry events are runtime volume.
Rozhodnutí
Official seams only (Claude Code OpenTelemetry, Codex app-server notifications, Gemini CLI OpenTelemetry), declared per provider in share/providers.yaml. One usage record, distinct from capability executions, and one normalisation. Events are runtime state, never .ai/repo; .ai holds policy, schema and budgets. Reported tokens, estimates and billed amounts are distinct fields; a missing value is absent, never zero; cumulative snapshots are never summed; provider metadata is observed evidence, never canonical state; no transcript or body is read or kept.
Zamítnuté alternativy
- Transcript parsing
- A MITM proxy or client patch
- Per-provider telemetry subsystems
- One 'cost' field
- Storing events under .ai/repo
Důsledky
execution-telemetry loses its dependency on runtime-adapters; the server gains a loopback OTLP/HTTP-JSON receiver with no new dependency; subscription users see estimates labelled as such.
Sources
Promoted on 2026-10-18 from the owner's ChatGPT project (workspace chatgpt-majordomus, issue I3100). The owner has not accepted it; it is proposed for the owner's decision.
chatgpt-majordomus:c174#18chatgpt-majordomus:c234#0chatgpt-majordomus:c236#4chatgpt-majordomus:c236#7chatgpt-majordomus:c253#2chatgpt-majordomus:c253#3chatgpt-majordomus:c253#4