DeepSeek in Pi: switch models, pay off-peak
Minimal, hackable agent harness from Earendil
Pi is an MIT-licensed minimal coding-agent harness. It ships four modes (interactive, print/JSON, RPC, SDK), supports 15+ providers, and is designed to be extended with TypeScript packages rather than configured through a large feature matrix.
Switch Pi to DeepSeek in 4 steps
Install Pi
Start Pi in your repo
Switch model mid-session
Run headless in CI
DeepSeek peak and off-peak pricing in Pi
Pi's minimal system prompt keeps context smaller than most harnesses, but long test loops still add up. DeepSeek V4.1 Flash costs $0.15/M input and $0.60/M output off-peak, and double that during weekday peak windows. Schedule overnight batch runs after 10:00 UTC to stay off-peak every weekday.
| Model, $/M tokens | Input off-peak | Input peak | Cache hit off-peak | Cache hit peak | Output off-peak | Output peak | Example day, off-peak / peak |
|---|---|---|---|---|---|---|---|
| DeepSeek V4.1 Flash | $0.15 | $0.30 | $0.003 | $0.006 | $0.60 | $1.20 | $1.05 / $2.10 |
| DeepSeek V4 Pro | $0.66 | $1.32 | $0.022 | $0.044 | $1.98 | $3.96 | $4.29 / $8.58 |
The example day is 5M input and 500K output tokens with no cache hits. Off-peak starts at 10:00 UTC on weekdays and runs all weekend: peak hours in your time zone.
Questions
How do I switch Pi to DeepSeek?
1. Install Pi. 2. Start Pi in your repo. 3. Switch model mid-session. 4. Run headless in CI. The commands for each step are above.
How much does DeepSeek cost in Pi?
DeepSeek V4.1 Flash is $0.15/M input and $0.60/M output off-peak, and $0.30/M and $1.20/M during weekday peak hours (01:00–04:00 and 06:00–10:00 UTC).
When is DeepSeek off-peak?
Every hour outside Mon–Fri 01:00–04:00 and 06:00–10:00 UTC, plus weekends and Chinese public holidays. Off-peak is 50% cheaper; peak costs 2x.