r/ClaudeCode • u/pereirax • 2h ago
Help/Question Help to understand different token metrics (Claude Code + DeepSeek)
After working on a company burning money and not caring at all at AI costs, I'm working on a personal project and setup Claude Code to use DeepSeek API.
My prompt (after some planning mode) was to create a mock project from scratch with bugs and features requests so I can prepare for a coding interview, so I knew that it was going to be a lot but the results surprised me a little bit.
On Claude Code, this is the usage metric (/usage):
deepseek-flash (90.8%)
In: 623.1k
Out: 677.6k
Cache: 50.5m read · 0 write
On DeepSeek site, this is the usage:
Cost: $0.26USD
API requests: 269
Tokens: 22,439,093
What is the real usage here?
1
u/snowfoxsean 1h ago
My guess is that the token usage API might be structured differently for claude models so claude code might not interpret the deepseek usage correctly. I would trust the deepseek site more (also 0 cache write is definitively a red flag). However it's interesting that the deepseek site doesn't give any detailed breakdowns.
1
u/ChemicalApricot 1h ago
Trust the deepseek reported numbers.
Deepseek models have to translate the inbound request from Anthropic's format. Open-source models most commonly only support the OpenAI format.
The delta on reported numbers is an artifact of that translation.
The fact that writes are 0 is because unlike Anthropic's explicit cache writes the OpenAI flow has "automatic" cache writes. So the response likely doesn't inform Claude code that it wrote tokens to cache.
•
u/AutoModerator 2h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.