From d7df47cbe83d3b53d46bc6a25bc708a722a1047c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 23 Oct 2026 17:29:36 +0200 Subject: 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 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3