Add token usage stats and consolidate credentials in SQLite
build / build (push) Successful in 2m34s
build / build (push) Successful in 2m34s
- New internal/stats (types) and internal/store (SQLite owner: requests + credentials tables, WAL); store implements stats.Recorder. - Stream (SSE tee) and non-stream chat paths parse upstream usage incl. cached_tokens and record per-request; add /api/stats, /api/stats/reset, /admin/stats HTML with cache hit rate. - Drop credentials.json: remove auth file I/O and ZHANLU_CREDENTIALS_FILE; credential precedence is env vars > db row.
This commit is contained in:
+6
-1
@@ -1,4 +1,9 @@
|
||||
credentials.json
|
||||
zhanlu.db
|
||||
zhanlu.db-shm
|
||||
zhanlu.db-wal
|
||||
*.db
|
||||
*.db-shm
|
||||
*.db-wal
|
||||
extension/
|
||||
*.exe
|
||||
*.log
|
||||
|
||||
Reference in New Issue
Block a user