@pi-vault/pi-providers

Pi extension that adds MiniMax and StepFun custom model providers

Packages

Package details

extension

Install @pi-vault/pi-providers from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@pi-vault/pi-providers
Package
@pi-vault/pi-providers
Version
0.2.0
Published
Jul 12, 2026
Downloads
128/mo · 45/wk
Author
lanhhoang
License
MIT
Types
extension
Size
29.9 KB
Dependencies
0 dependencies · 2 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-vault/pi-providers

npm version Quality Node >= 24.15.0 License: MIT

Register MiniMax M3 and StepFun Flash reasoning models as custom providers for Pi.

Install, Upgrade, And Reload

pi install npm:@pi-vault/pi-providers

Then reload Pi:

/reload

Quick Start

Set the API keys for the providers you want to use before launching Pi:

# MiniMax global endpoint (minimax-openai)
export MINIMAX_API_KEY="..."

# MiniMax China endpoint (minimax-openai-cn)
export MINIMAX_CN_API_KEY="..."

# StepFun Step Plan endpoint (stepfun-ai)
export STEP_API_KEY="..."

After reloading, the providers appear in Pi's model picker:

  • Select minimax-openai (or minimax-openai-cn) and choose MiniMax-M3.
  • Select stepfun-ai and choose one of step-3.7-flash, step-3.5-flash-2603, or step-3.5-flash.

Ask Pi normally; there is no provider-specific prompt syntax. Image input works with MiniMax-M3 and step-3.7-flash.

Providers And Models

Provider Model Input Reasoning Context Max output Input / output per 1M tokens Cache read
minimax-openai / minimax-openai-cn MiniMax-M3 text, image yes 1,000,000 512,000 $0.60 / $2.40 $0.12
stepfun-ai step-3.7-flash text, image low / medium / high 256,000 256,000 $0.20 / $1.15 $0.04
stepfun-ai step-3.5-flash-2603 text low / high 256,000 256,000 $0.10 / $0.30 $0.02
stepfun-ai step-3.5-flash text automatic (shown as high) 256,000 256,000 $0.10 / $0.30 $0.02

API bases:

  • minimax-openai: https://api.minimax.io/v1
  • minimax-openai-cn: https://api.minimaxi.com/v1
  • stepfun-ai: https://api.stepfun.ai/step_plan/v1

Cache writes are free for all models.

Known Limits

  • Key matching. The provider code passes the corresponding environment-variable reference ($MINIMAX_API_KEY, $MINIMAX_CN_API_KEY, $STEP_API_KEY) to Pi. If the variable is unset, the provider cannot authenticate.
  • MiniMax tool-call hardening. MiniMax wraps its stream with a provider-specific pipeline that folds inline think blocks into a proper thinking content block, repairs empty {} tool-call arguments via second-chance JSON parse, and reorders tool-result messages to match the order of preceding tool_use blocks. M3 rejects mismatched ordering.
  • StepFun native stream. StepFun uses Pi's built-in OpenAI-compatible driver directly, without the MiniMax hardening pipeline.
  • Deeply nested tool schemas. MiniMax M3 may produce collapsed nested arguments on complex JSON schemas. The package emits a diagnostic message instead of retrying.

Development And Verification

pnpm install
pnpm check
pnpm release:check

Changelog

See CHANGELOG.md for release notes.

License

MIT. See LICENSE.