DeepSeek in Pi: switch models, pay off-peak

Minimal, hackable agent harness from Earendil

PEAK 01:00–04:00 & 06:00–10:00 UTC WEEKDAYS

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

Step 1

Install Pi

npm install -g --ignore-scripts @earendil-works/pi-coding-agent
Also available via `curl -fsSL https://pi.dev/install.sh | sh`, pnpm or bun.
Step 2

Start Pi in your repo

cd your-project && pi
Authenticate with an API key or OAuth when prompted. Pi reads AGENTS.md at startup.
Step 3

Switch model mid-session

/model
Or press Ctrl+L. Use Ctrl+P to cycle through your favourite models.
Step 4

Run headless in CI

pi -p "run the test suite and fix the first failure" --mode json
Print mode is designed for scripts and CI; JSON mode emits an event stream.

DeepSeek peak and off-peak pricing in Pi

⚠ Weekday peak, 01:00–04:00 and 06:00–10:00 UTC, costs 2x the off-peak rate.

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 tokensInput off-peakInput peakCache hit off-peakCache hit peakOutput off-peakOutput peakExample 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.

Commands checked against https://pi.dev/ on 2026-10-17. Rates from DeepSeek API pricing, checked 2026-10-17.

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.