Status bar reading: $(pulse) 185.7M · 97.6% — total tokens and prompt-cache hit rate, followed by Cost ¥17.45 and, once an API key is set, $(credit-card) ¥110.00.
Hover it for the breakdown: cached input, uncached input, output and total.
Click it (or run DeepSeek Copilot Usage: Open Usage Dashboard) for the dashboard: cards for the selected range's spend / calls / tokens / cache hit rate (plus the balance when it is available), a chart stacked by model, and charts for request counts and token usage — hourly buckets for today / lastHours, daily buckets for all.
Range selector deepseekCopilotUsage.scope: today (default), lastHours, all.
The cost is computed locally in CNY from the log's exact token counts and DeepSeek's published prices, each call at the peak / off-peak rate in force at its own timestamp (Chinese public holidays count as off-peak) — no API needed.
English and Chinese UI, following the VS Code display language by default.
Requirements
VS Code 1.100 or newer.
The vizards.deepseek-v4-for-copilot extension installed — it writes the log this extension reads.
Settings
Key
Default
Description
deepseekCopilotUsage.language
auto
Language of the status bar and tooltip: auto follows VS Code, or force en / zh-cn
deepseekCopilotUsage.scope
today
today = since local midnight (across restarts); lastHours = the last N hours; all = every retained log
deepseekCopilotUsage.hoursBack
24
Hours counted by lastHours, back from the current whole hour (1 to 24)
deepseekCopilotUsage.balance
true
Append the account balance; needs an API key first
deepseekCopilotUsage.refreshIntervalSeconds
5
Fallback polling interval (2 to 3600)
Notes
Reading the log stays offline and never leaves your machine; only the optional balance call goes online (disable it with deepseekCopilotUsage.balance). Only aggregate numbers are read — never request contents or credentials.
The reading covers completed calls, so it ticks over when the call currently being streamed finishes.
Balance needs an API key (DeepSeek Copilot Usage: Set API Key for Balance), kept in VS Code secure storage rather than settings.json. The request always goes to the official endpoint at api.deepseek.com — it deliberately ignores deepseek-copilot.baseUrl, so the key can never be sent to a host some repository picked — and only CNY balances are reported: relaying proxies and foreign-currency-only accounts are not supported. With no key, or when the request fails, only the balance part is hidden.
A ~ in front of the cost means some calls used a model missing from the built-in price table, so the amount is a lower bound.
today, lastHours and all accumulate across VS Code restarts, so a restart does not reset the day.
Every retained log is read from its first line: the first pass parses the whole file, later passes only parse the bytes appended since then, so a growing log stays cheap without dropping older calls.
Nothing shown when the DeepSeek extension is missing → the status bar says $(circle-slash) no log; if the log becomes unreadable, the previous reading is kept with a ? appended.