Appreciate it. For token-based metering, we lean on event-level tracking with strict timestamps and unique identifiers to maintain billing precision, even when upstream responses are delayed or partial. If OpenAI or similar services provide incomplete data, we flag those events for retry or exclusion to avoid corrupting aggregates.Retroactive adjustments are handled by versioning usage records, so instead of overwriting historical events, we apply corrections as delta events. Invoices pull from the latest state, but we preserve full audit logs underneath to avoid integrity gaps.
No comments yet.