mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 06:17:41 +00:00
feat(usage): preserve cache tokens in usage events (#1311)
This commit is contained in:
1 parent
89b83af931
commit
606c8e60e1
10 files changed
+230
-93
No files matched your search
@@ -1377,6 +1377,9 @@ CREATE TABLE IF NOT EXISTS usage_events (
|
||||
input_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
output_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
total_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cache_read_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cache_create_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
thinking_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cost_usd NUMERIC(12,6) NOT NULL DEFAULT 0,
|
||||
duration_ms INTEGER NOT NULL DEFAULT 0,
|
||||
call_count INTEGER NOT NULL DEFAULT 1,
|
||||
@@ -1419,6 +1422,9 @@ CREATE TABLE IF NOT EXISTS usage_event_rollups (
|
||||
input_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
output_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
total_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cache_read_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cache_create_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
thinking_tokens BIGINT NOT NULL DEFAULT 0,
|
||||
cost_usd NUMERIC(12,6) NOT NULL DEFAULT 0,
|
||||
duration_ms INTEGER NOT NULL DEFAULT 0,
|
||||
call_count INTEGER NOT NULL DEFAULT 0,
|
||||
|
||||
Reference in new issue
Block a user