Small pi package that adds glm-5.2 to the built-in zai-coding-cn provider before it lands in pi's built-in model list.
pi install git:github.com/BlockedPath/pi-zai-coding-cn-glm52Then set your ZAI Coding Plan China API key:
export ZAI_CODING_CN_API_KEY="your-key-here"To make that permanent, add the same line to your shell config, for example ~/.zshrc:
echo 'export ZAI_CODING_CN_API_KEY="your-key-here"' >> ~/.zshrc
source ~/.zshrcThe extension does not save your key anywhere. It only reads ZAI_CODING_CN_API_KEY from your environment when pi runs. If you put the export in ~/.zshrc, your shell is where the key is stored.
Verify the model is available:
pi --list-models | grep 'zai-coding-cn.*glm-5.2'You can select it in pi with /model, or start pi directly with:
pi --provider zai-coding-cn --model glm-5.2Provider: zai-coding-cn
Endpoint: https://open.bigmodel.cn/api/coding/paas/v4
Model: glm-5.2
The extension re-registers the current built-in zai-coding-cn model list and adds glm-5.2, so older pi versions keep the existing provider models too.
pi remove git:github.com/BlockedPath/pi-zai-coding-cn-glm52Once pi includes glm-5.2 built-in, this package is no longer needed.