How do I use DeepSeek in the Pi coding agent?
Add deepseek/deepseek-v4.1-flash to a standardcompute provider in ~/.pi/agent/models.json (baseUrl https://api.stdcmpt.com/v1, api openai-completions) and start pi --provider standardcompute --model deepseek/deepseek-v4.1-flash: Pi then runs on DeepSeek V4.1 Flash on a plan from $19 a month, and new requests get HTTP 402 when the compute budget reaches 100%.
{
"providers": {
"standardcompute": {
"baseUrl": "https://api.stdcmpt.com/v1",
"api": "openai-completions",
"apiKey": "$STANDARDCOMPUTE_API_KEY",
"models": [
{
"id": "deepseek/deepseek-v4.1-flash",
"name": "DeepSeek V4.1 Flash",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 400000,
"maxTokens": 32000
},
{
"id": "deepseek/deepseek-v4-pro",
"name": "DeepSeek V4 Pro",
"reasoning": true,
"input": ["text"],
"contextWindow": 400000,
"maxTokens": 32000
}
]
}
}
}
Without contextWindow and input, Pi assumes 128,000 tokens and text-only input, so both are set per model. V4 Pro stays text-only.
Thinking levels on DeepSeek
With "reasoning": true, Pi offers off, minimal, low, medium and high, cycled with Shift+Tab or set with /thinking, and sends the level as reasoning_effort. That overrides the Models page. V4.1 Flash reasons by default, and off sends nothing, so it keeps reasoning unless you switch it off on the Models page. A :high suffix on --model sets the level at launch.
What works with DeepSeek in Pi
| Pi feature | On DeepSeek through Standard Compute |
|---|---|
| Images | V4.1 Flash reads them; V4 Pro is listed as text only and answers an image with HTTP 400 |
| Model switching | Ctrl+P cycles models; /model or Ctrl+L opens the picker, Ctrl+S saves the default |
| Selecting the model | Needs --provider standardcompute. Without it, Pi can resolve deepseek/... to another provider's model with the same ID |
From Pi's models, CLI and keybindings docs and its model-resolver source, checked October 14, 2026.
What a day of DeepSeek costs
| Per day | V4.1 Flash, peak | Off-peak | V4 Pro, peak |
|---|---|---|---|
| Typical day | $0.42 | $0.21 | $1.94 |
| Busy day | $4.31 | $2.16 | $20 |
DeepSeek list prices per million tokens: V4.1 Flash $0.30 input, $0.006 cache hit, $1.20 output at peak, half off-peak; V4 Pro $1.32, $0.044, $3.96 at peak. Source. The Agent Burn Index measures coding agents such as OpenCode, Cline and Kilo; Pi is not broken out, so these figures use its median and 90th-percentile coding-agent day (September 13 to October 12, 2026) as a stand-in. Priced at the list rates above; your own days will differ.
The catch
Pi ships a deepseek provider (DEEPSEEK_API_KEY) with deepseek-flash, which is V4.1 Flash, and deepseek-v4-pro at DeepSeek's prices. For DeepSeek alone, that is cheaper than a plan, especially off-peak.
Where Standard Compute fits
Pi's :high suffix and Ctrl+P work across every model in the provider, so once Claude Sonnet 5.5 is in the models list, a hard step can move to it from V4.1 Flash without leaving the session or changing keys.
FAQ
Does Oh My Pi take the same DeepSeek setup?
Yes: a provider in ~/.omp/agent/models.yml using the openai-completions API, base URL https://api.stdcmpt.com/v1 and the model ID deepseek/deepseek-v4.1-flash.
Why is my key rejected even though the variable is set?
Since Pi 0.77, apiKey needs "$STANDARDCOMPUTE_API_KEY" or "${STANDARDCOMPUTE_API_KEY}". A plain string, even an all-caps variable name, is sent as the literal key.