pi-ali-code
v1.0.0
Published
Alibaba Model Studio Coding Plan provider for pi — Qwen, GLM, Kimi, and MiniMax models
Maintainers
Readme
pi-ali-code
A pi extension that adds Alibaba Model Studio Coding Plan models as a provider.
What is the Coding Plan?
Alibaba's Model Studio offers a Coding Plan — a dedicated tier with its own API key (sk-sp-*) and endpoint that provides access to multiple model families at reduced or zero cost:
- Qwen — Qwen 3.5 Plus, Qwen3 Max, Qwen3 Coder Next/Plus
- GLM — GLM-5, GLM-4.7
- Kimi — Kimi K2.5
- MiniMax — MiniMax M2.5
Problem
The Coding Plan uses a dedicated endpoint (coding-intl.dashscope.aliyuncs.com) and API key format (sk-sp-*) that differs from the standard DashScope API. Additionally, the DashScope API has compatibility issues with pi's default OpenAI API handling:
- Tool arguments must be JSON objects, not stringified JSON
- The
developerrole is not supported (must usesysteminstead)
Installation
Option 1: NPM Package (Recommended)
npm install -g pi-ali-codeAdd to ~/.pi/agent/settings.json:
{
"packages": [
"npm:[email protected]"
]
}Option 2: Local Installation
git clone https://github.com/ricardo-nth/pi-ali-code.git ~/.pi/agent/extensions/ali-codeAdd to ~/.pi/agent/settings.json:
{
"packages": [
"./extensions/ali-code"
]
}Configuration
1. Get a Coding Plan API Key
- Go to Alibaba Model Studio
- Subscribe to the Coding Plan
- Copy your dedicated API key (starts with
sk-sp-)
2. Set the Environment Variable
export DASHSCOPE_CODING_API_KEY="sk-sp-your-key-here"Add this to your shell profile (~/.zshrc, ~/.bashrc, etc.) to persist it.
3. Restart pi
The models will appear in the model picker with a [Coding] suffix.
Available Models
| Model | ID | Reasoning | Vision |
|---|---|---|---|
| Qwen 3.5 Plus | qwen3.5-plus | No | Yes |
| Qwen3 Max | qwen3-max-2026-01-23 | Yes | Yes |
| Qwen3 Coder Next | qwen3-coder-next | No | No |
| Qwen3 Coder Plus | qwen3-coder-plus | No | No |
| GLM-5 | glm-5 | Yes | No |
| GLM-4.7 | glm-4.7 | Yes | Yes |
| Kimi K2.5 | kimi-k2.5 | Yes | No |
| MiniMax M2.5 | MiniMax-M2.5 | Yes | No |
Related
- pi-qwen-fix — Fixes for the standard
alibaba-qwenprovider in pi
License
MIT
