Pi Coding Agent extension for Volcengine Coding Plan models.
This package registers one Pi provider:
volcengine-codingplan→https://ark.cn-beijing.volces.com/api/coding/v3
Primary model:
ark-code-latest
Additional models:
doubao-seed-2.0-codedoubao-seed-codeglm-4.7deepseek-v3.2kimi-k2.5minimax-m2.5
{
"packages": [
"git:github.com/gistman/pi-volcengine-provider"
]
}Reload Pi after updating settings.
pi install git:github.com/gistman/pi-volcengine-providergit clone https://github.com/gistman/pi-volcengine-provider.git
cd pi-volcengine-provider
npm install
npm run build
pi -e ./dist/index.jsAPI key resolution order (first match wins):
- Pi auth storage (
~/.pi/agent/auth.json) - Environment variable (
VOLCENGINE_API_KEY)
Use Pi's built-in auth system:
pi auth add volcengine-codingplan <your-api-key>To remove:
pi auth remove volcengine-codingplanexport VOLCENGINE_API_KEY="your-api-key-here"Volcengine console: https://console.volcengine.com/ark/
Select the provider model in Pi:
/model volcengine-codingplan/ark-code-latest
You can also inspect available models with /model.
import { registerVolcengine, getVolcengineApiKey } from "pi-volcengine-provider";
// Register with custom config
// Returns true if registered, false if no API key available (fail-closed)
const registered = await registerVolcengine(pi, {
apiKey: "explicit-key",
// or usePiAuthStorage: false to skip auth.json
});
if (!registered) {
console.log("Provider not registered - no API key available");
}
// Get API key manually (checks auth.json then env)
const apiKey = await getVolcengineApiKey();Fail-closed behavior: If no API key is available (via explicit config, Pi auth.json, or environment variable), the provider is NOT registered. This prevents accidental use with a missing or invalid key.
- Fail-closed auth: Provider is NOT registered if no API key is available
- Transport: custom
volcengine-codingplan-openai-completionsstream wrapper built on Pi'sopenai-completions - Auth:
Authorization: Bearer <key>(key from auth.json orVOLCENGINE_API_KEY) - Thinking/reasoning control surface: use Pi's native thinking setting (
off|minimal|low|medium|high|xhigh). - The provider maps that Pi-native setting to Volcengine request fields:
- Pi
off->thinking: { type: "disabled" }+reasoning_effort: "minimal" - Pi
minimal->thinking: { type: "enabled" }+reasoning_effort: "minimal" - Pi
low|medium|high->thinking: { type: "enabled" }+ samereasoning_effort - Pi
xhigh-> degraded/clamped toreasoning_effort: "high"withthinking: { type: "enabled" }(backend ceiling; not equivalent) - Guardrail:
thinking.type="disabled"withreasoning_effortother than"minimal"throws
- Pi
supportsDeveloperRoleis set conservatively tofalsesupportsReasoningEffortis intentionallyfalsein model metadata; mapping is handled by provider transport logic- Non-primary models are marked
isProvisional: true - Cost fields are placeholders (
0) until verified - Capability metadata remains conservative where official behavior is not yet verified
Before publishing changes:
npm install
npm run typecheck
npm run test
npm run buildKeep claims conservative and implementation-aligned. If a capability is not verified, do not advertise it.
See research.md for design notes.
MIT