Requirements
- macOS, Linux, or Windows with Node.js 22.19 or later and npm.
- An active Step Plan subscription, available quota, and access to the model.
- An API key from the StepFun platform API keys page.
v22.19.0 or later and npm successfully returns a version number, you can proceed with installing Pi.
Install Pi
Install Pi 0.87.1:Configure Step Plan
Set the API key
Set the environment variable in the terminal that will launch Pi. ReplaceYOUR_STEP_API_KEY with your key.
- macOS / Linux / WSL
- Windows PowerShell
Add models
- Open
~/.pi/agent/models.json. IfPI_CODING_AGENT_DIRis set, usemodels.jsonin that directory instead. - Merge the following
providers.stepfunentry into the file, preserving other providers. If the file does not exist, create the directory and save this JSON.
Step 5 Preview has a 1M-token context window; Step 3.7 Flash has a 256K-token window. The configuration uses
1000000 and 256000, respectively.
Set the default model
Merge these fields intosettings.json in the same configuration directory:
Start Pi
Run Pi from your project directory:Verify the integration
Check model configuration
ready means the client can resolve its credentials. The model list should include the configured IDs, with a 1M window for Step 5 Preview and a 256K window for Step 3.7 Flash.
Test a conversation
OK.
Test tool calls
Create a separate test directory on a machine with Python installed. Add aREADME.md containing Pi Step Plan test, start Pi from that directory, and enter:
hello.py exists and outputs Hello, StepFun!.
Check usage
In the StepFun platform usage details, match the request time, model ID, and billing source to confirm that the call used Step Plan.Common questions
Q: Why are Step models missing from the list?
Q: Why are Step models missing from the list?
Check that the active configuration directory contains valid JSON in
models.json and the correct IDs under providers.stepfun.models. Open /model to reload the file, or restart Pi and run pi --list-models stepfun.Q: What if the API key cannot be resolved or authentication fails?
Q: What if the API key cannot be resolved or authentication fails?
Set
STEP_API_KEY in the terminal that launches Pi. Check that the key is complete, valid, and belongs to the account for the configured endpoint. A saved stepfun credential in auth.json takes precedence, so check that entry as well.Q: How do I correct the request path?
Q: How do I correct the request path?
Set
api to anthropic-messages and baseUrl to https://api.stepfun.ai/step_plan. Pi appends /v1/messages; the configuration URL ends at /step_plan.Q: Why does the context window differ from the model specification?
Q: Why does the context window differ from the model specification?
Check the model’s
contextWindow: use 1000000 for step-5-preview and 256000 for step-3.7-flash. Reload the model list after saving and select the model again.
