The Settings Billing/Usage chart cannot show prompt-cache savings, and it overstates cost now that caching works (jarvis#861 fix, fleet-agent#229).
What happens: account.py:_direct_llm_usage prices every input token at the model's full input_price_per_1m_usd. Cached reads (roughly 1/10th price on Anthropic, discounted on OpenAI/DeepSeek) are counted as full-price input, and cacheRead/cacheWrite are not stored in the usage rollup at all, so neither the tenant Settings chart nor any admin page can show them. Manual verification currently requires openclaw agent --json in the container or reading session trajectory files.
Expected: the usage rollup carries cached-read (and ideally cache-write) token counts per model, the cost formula prices them at the provider's cached rate, and the Settings usage section shows the cached share so operators can verify caching health from the UI.
Suspected location: jarvis/chat/usage.py (rollup), jarvis/account.py:_direct_llm_usage, frontend/src/charts/usageCharts.js.
The Settings Billing/Usage chart cannot show prompt-cache savings, and it overstates cost now that caching works (jarvis#861 fix, fleet-agent#229).
What happens:
account.py:_direct_llm_usageprices every input token at the model's fullinput_price_per_1m_usd. Cached reads (roughly 1/10th price on Anthropic, discounted on OpenAI/DeepSeek) are counted as full-price input, andcacheRead/cacheWriteare not stored in the usage rollup at all, so neither the tenant Settings chart nor any admin page can show them. Manual verification currently requiresopenclaw agent --jsonin the container or reading session trajectory files.Expected: the usage rollup carries cached-read (and ideally cache-write) token counts per model, the cost formula prices them at the provider's cached rate, and the Settings usage section shows the cached share so operators can verify caching health from the UI.
Suspected location:
jarvis/chat/usage.py(rollup),jarvis/account.py:_direct_llm_usage,frontend/src/charts/usageCharts.js.