feat: add detailed token usage monitoring and cache write metrics

This commit is contained in:
Sycun committed 2026-10-11 22:30:30 +08:00
1 parent deda642bd6
commit b3d3f48c40
26 files changed
+666 -45

No files matched your search

@@ -321,6 +321,7 @@ CREATE TABLE model_token_usage (
completion_tokens INTEGER NOT NULL DEFAULT 0,
total_tokens INTEGER NOT NULL DEFAULT 0,
cached_tokens INTEGER NOT NULL DEFAULT 0,
cache_write_tokens INTEGER NOT NULL DEFAULT 0,
reasoning_tokens INTEGER NOT NULL DEFAULT 0,
created_at DATETIME NOT NULL,
updated_at DATETIME NOT NULL,