@v_dev_338/pi-stepfun
v1.0.0
Published
Pi agent extension for StepFun (阶跃星辰) reasoning models. Auto-fetches all available models from StepFun API.
Maintainers
Readme
pi-stepfun
Pi Agent 扩展,自动从 StepFun 阶跃星辰 API 拉取所有可用模型并注册到 Pi。
支持的模型
| 模型 | 类型 | 推理 | 多模态 |
|------|------|------|--------|
| step-3.7-flash | Chat | ✅ | ✅ 图片 |
| step-3.5-flash | Chat | ✅ | - |
| step-3.5-flash-2603 | Chat | ✅ | - |
| step-router-v1 | Chat | ✅ | ✅ 图片 |
| step-image-edit-2 | Image | - | ✅ |
| stepaudio-2.5-chat | Audio | - | - |
| stepaudio-2.5-tts | Audio | - | - |
| stepaudio-2.5-asr | Audio | - | - |
| stepaudio-2.5-realtime | Audio | - | - |
StepFun 上线新模型后,扩展会在下次启动时自动拉取,无需手动更新。
安装
方式一:直接克隆
git clone https://github.com/V-dev-388/pi-stepfun.git ~/.pi/agent/extensions/stepfun
cd ~/.pi/agent/extensions/stepfun方式二:软链接
mkdir -p ~/.pi/agent/extensions
ln -s ~/project/pi-stepfun ~/.pi/agent/extensions/stepfun方式三:作为 Pi Package 安装
pi install git:github.com/V-dev-388/pi-stepfun方式四:通过 npm 安装
pi install npm:@v_dev_338/pi-stepfun配置 API Key
编辑 src/index.ts,把 YOUR_STEPFUN_API_KEY 替换为你的 StepFun API Key:
const STEPFUN_API_KEY = "YOUR_STEPFUN_API_KEY";或者在 settings.json 中通过环境变量引用:
{
"defaultProvider": "stepfun",
"defaultModel": "step-3.7-flash"
}export STEPFUN_API_KEY="your-key"
pi使用
启动 Pi,扩展会自动加载并注册所有模型:
pi --model stepfun/step-3.7-flash切换模型:
/model stepfun/step-3.5-flash调整推理强度:
pi --thinking high --model stepfun/step-3.7-flash支持 off / minimal / low / medium / high / xhigh / max 七档,全部映射到 StepFun 的 low / medium / high 三档。
手动刷新模型
pi update --models原理
扩展在 Pi 启动时:
- 调用
GET https://api.stepfun.com/step_plan/v1/models获取全量模型列表 - 根据模型 ID 前缀自动分类(推理/音频/图像/实时)并分配属性
- 调用
pi.registerProvider()注册到 Pi 的模型运行时
文件结构
pi-stepfun/
├── src/
│ └── index.ts # Extension entry point
├── package.json # Package metadata
├── README.md # Chinese documentation
└── README_EN.md # English documentationLicense
MIT
