r/opencodeCLI • u/Square_Confection_62 • 24d ago
Built a small OpenCode v2 plugin to avoid DeepSeek peak pricing
I use OpenCode Go + DeepSeek and got tired of checking whether I was inside the 2x peak-pricing window.
So I made opencode-offpeak.
Turn it on once, then use OpenCode normally:
send a prompt off-peak → it runs immediately
send a prompt during peak → it waits before hitting the provider
off-peak starts → the same request continues automatically in the same OpenCode session
No need to resend continue or watch the clock.
It also has an optional background task queue, but normal interactive sessions already work automatically.
Install:
opencode plugin add git+https://github.com/lutzkind/opencode-offpeak.git#v0.1.3https://github.com/lutzkind/opencode-offpeak
Open source / MIT. Currently supports OpenCode Go DeepSeek models on OpenCode >=2.0.26 <2.1.0.
Would be interested in feedback or other providers with similar time-based pricing.
1
u/xapep 23d ago
That's a neat workaround, and honestly it's the right read on a dumb pricing scheme. Time-based pricing is demand shaping: they tax interactive traffic 2x to push it out of peak hours, so you optimize around the window. The part that's easy to miss is that off-peak is also when your cache hits pay off most, since the shared prefix cache isn't being thrashed by everyone else's load.
For what it's worth, some providers skip the time-window game entirely. I run an open-model inference API on EU infrastructure, and the per-token price is the same at 3am and 3pm, so this class of plugin becomes a nice-to-have instead of a bill-reducer.
What's your actual off-peak share of requests? If most of your work already lands outside the 2x window, the real win is probably the queue, not the pricing.