Pi Model Switch

Minimal, hackable agent harness from Earendil

CALCULATING...

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.

Switching Instructions & Commands

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 Pricing Impact on Pi

⚠ Signal Ember Rule: Peak hours cost exactly 2x (100% price increase).

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.

Data verified from https://pi.dev/ on 2026-10-17.