aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 17:29:36 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 17:29:36 +0200
commitd7df47cbe83d3b53d46bc6a25bc708a722a1047c (patch)
treea98797fa2786900bea72d142d3d0d3a424259f12
parent985d538a5fdb1b58d35621687313ed7d74d80288 (diff)
downloaddesktop-assistant-d7df47cbe83d3b53d46bc6a25bc708a722a1047c.tar.gz
desktop-assistant-d7df47cbe83d3b53d46bc6a25bc708a722a1047c.zip
usage: save each turn's token usage in turns.usage
The daemon used the API's usage block only for the live context meter and threw it away, so llm-cost-dashboard had nothing to track. stream() now keeps each request's last usage chunk (Hetzner sends running totals on every chunk) and answer() saves them per turn as JSON {ts, provider, model, rounds}. Existing databases gain the column. Titles and transcriptions are not counted: always local, $0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 4d3b375..c36e418 100644
--- a/README.md
+++ b/README.md
@@ -91,7 +91,9 @@ socat - UNIX-CONNECT:$XDG_RUNTIME_DIR/desktop-assistant.sock
`~/.local/share/desktop-assistant/history.db` (`$XDG_DATA_HOME`
honoured), directory 0700, file 0600. The model is sent the last 10 turns
of the open conversation. Tool results are stored as a placeholder, not
-their output. Reasoning is shown live and not stored.
+their output. Reasoning is shown live and not stored. Each turn also keeps
+its token usage (`turns.usage`: provider, model, the API's usage block per
+request), read by llm-cost-dashboard.
## Configuration and tools