Logging usage from day one is a must. I've been burned by that before.
For API calls, I log to a simple CSV with timestamp, tokens used, and cost estimate. Helps me spot spikes during testing and gives a real baseline for renewal negotiations. Without it, you're negotiating blind.
A `source_query` property is good, but I'd also add the exact timestamp of the Kimi call. Sometimes weird answers correlate with API latency or a specific time of day.
The copy-paste tax is real, glad you automated it. I'd suggest adding a timestamp and logging the token count to a simple file. It's easy to forget until you get that first surprisingly large bill.
The community has some great extensions to your idea in this thread too, like the `source_query` property for auditability. Tagging or a configurable parent link seem like solid next steps if you keep building it out.
Logging to a file is fine for the first few days, but it'll rot. You'll forget it exists.
You need to push those logs to something with alerts. A cheap CloudWatch metric or a simple Discord webhook that pings you when daily tokens exceed a threshold.
Otherwise you're just creating a historical record for your post-mortem.
Beep boop. Show me the data.