@marshal/pi-stepfun-provider
StepFun model provider for pi coding agent
Package details
Install @marshal/pi-stepfun-provider from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@marshal/pi-stepfun-provider- Package
@marshal/pi-stepfun-provider- Version
0.1.2- Published
- Sep 8, 2026
- Downloads
- 304/mo · 64/wk
- Author
- marshal
- License
- MIT
- Types
- extension
- Size
- 13.2 KB
- Dependencies
- 1 dependency · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-stepfun-provider
StepFun model provider for pi coding agent.
Features
- 🚀 Native provider integration - Models appear in
/modelselector - 🔑 API key authentication - Via
STEPFUN_API_KEYenvironment variable - 🔄 Dynamic model discovery - Fetches latest models from StepFun API
- 💰 Cost tracking - Input/output/cache token costs displayed
- 🧠 Reasoning support - Reasoning models with
reasoning_effort(low/medium/high) - 🖼️ Vision support - Step 3.7 Flash native image understanding
Installation
Recommended: Install via npm for stable access and install statistics.
# Install directly with pi (recommended)
pi install npm:@marshal/pi-stepfun-provider
Or standard npm install:
npm install -g @marshal/pi-stepfun-provider
Note:
pi install npm:...registers the extension globally. Plainnpm install -gonly downloads the package without registering it as a pi extension.
Alternative: Install from GitHub (for source access or custom modifications).
# Install from GitHub repo
pi install git:github.com/MarshalW/pi-stepfun-provider
Users in China are encouraged to use the npm method, as GitHub access may be unreliable.
Configuration
Set your StepFun API key:
export STEPFUN_API_KEY=sk-xxxxxxxxxxxxxxxx
Step Plan
StepFun's Step Plan subscription uses a separate endpoint. If you subscribed via Step Plan, set the base URL:
export STEPFUN_BASE_URL=https://api.stepfun.com/step_plan/v1
Add both environment variables to your shell profile (
.bashrc,.zshrc, etc.) for persistence.
Usage
pi
Then use /model to select a StepFun model:
stepfun/step-3.7-flash- Flagship multimodal reasoning model (image/video understanding)stepfun/step-3.5-flash- Flagship text reasoning modelstepfun/step-3.5-flash-2603- Agent-optimized reasoning model
Available Models
| Model ID | Name | Reasoning | Vision | Context | Max Output |
|---|---|---|---|---|---|
step-3.7-flash |
Step 3.7 Flash | ✅ | ✅ | 256k | 64k |
step-3.5-flash |
Step 3.5 Flash | ✅ | ❌ | 256k | 64k |
step-3.5-flash-2603 |
Step 3.5 Flash 2603 | ✅ | ❌ | 256k | 64k |
Specs verified against the official docs. Additional models discovered dynamically from StepFun API.
Refreshing Models
Models are fetched from StepFun API on:
- Startup (if API key configured)
- Running
/modelcommand - Running
pi update --models
Development
# Clone and install dependencies
git clone https://github.com/MarshalW/pi-stepfun-provider
cd pi-stepfun-provider
pnpm install
# Test locally without installing globally
pi install -l .
Package Structure
pi-stepfun-provider/
├── package.json # Package manifest with pi config
├── src/
│ ├── index.ts # Extension entry point
│ ├── models.ts # Model definitions + dynamic fetching
│ ├── streaming.ts # Custom streaming (delegates to OpenAI compat)
│ └── auth.ts # OAuth placeholder
├── README.md
└── LICENSE
License
MIT