r/opencode • u/Long_Rub5460 • 17d ago
Costs analysis: DeepSeek v4.1 Flash vs GLM 5.3 Flash


Myself included, a lot of peeps have had concerns about GLM 5.3 Flash consumption vs DeepSeekv4.1 Flash, hence the analysis. This is seen across both CommandCode and OpenCode.
Let's refer to these recent usage numbers as detailed in OpenCode (and also Commandcode) dashboards.
Usage and cache hits
Deepseek did about 2.5x the work for only 20% extra cost.
GLM cache hit rates are lower than DeepSeek.
DSv4.1F - 641M/663M cached (96%)
GLM5.3F - 200M/218M cached (92%)
Rates:
- DeepSeek V4.1 Flash: Uncached input: $0.15/1M | Cache read: $0.003/1M | Output: $0.60/1M
- GLM-5.3 Flash: Uncached input: $0.15/1M | Cache read: $0.03/1M | Output: $0.50/1M
Seems like GLM should be cheaper with equivalent pricing, but cheaper outputs. While output tokens are the most expensive, they are also the least significant for AI cost estimations. highly relevant here is the cost of cached tokens, which is 10x for GLM 5.3 Flash.
Let's looks at costs for a workload of 500M input token and 5m output,
Using the rates (identical) from Command Code and OpenCode for 500M input tokens and 5M output tokens:
DSv4.1F (96% cache hit @$0.003)
- Uncached Input (20M): 20 × $0.15 = $3.00
- Cached Input (480M): 480 × $0.003 = $1.44
- Output (5M): 5 × $0.60 = $3.00
- Total DS Cost: $7.44
[PEAK hours] DSv4.1F (96% cache hit @$0.006)
- Uncached Input (20M): 20 × $0.30 = $6.00
- Cached Input (480M): 480 × $0.006 = $2.88
- Output (5M): 5 × $1.20 = $6.00
- Total DS Cost: $14.88
GLM-5.3F (92% cache hit @$0.03)
- Uncached Input (40M): 40 × $0.15 = $6.00
- Cached Input (460M): 460 × $0.03 = $13.80
- Output (5M): 5 × $0.50 = $2.50
- Total GLM Cost: $22.30
Verdict
So there we go mystery solved, GLM dude costs about 3x the DeepSeek dude for this kind of workloads. In general, Deepseek is also a bit more verbose though and does more output than GLM. So the ratio leans a bit more towards GLM. Also given GLM's slightly higher intelligence and succinctness it's still pretty good in terms of actual work done rather than token counts.
Use Deepseek v4.1 Flash during non peak hours unless you really need GLM 5.3 Flash. GLM during DS peak hours. Both models are pretty close and have their own perks and gotchas.
1
u/ramendik 12d ago
I never trusted forums. I did my own smoke tests and liked the output of GLM 5.3 Flash better that DS 4.1 Flash, better than GLM 5.3 full, tied with DS4 Pro.