Install
Install with PiG
pig install npm:pi-opinionated-glmInstall with Pi
pi install npm:pi-opinionated-glmPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.2.0 (README.md). PiG does not review it.
pi-opinionated-glm
Provider-only Pi package that registers a dedicated glm provider backed by OpenCode Zen:
- provider name is
glm - base URL is
https://opencode.ai/zen/go/v1 - API key env var is
OPENCODE_API_KEY - the package mirrors Pi's built-in OpenCode Go GLM models instead of pretending GLM must come from z.ai directly
That is the point of the package. It is opinionated. For this workspace, OpenCode Go (/zen/go/) is the default GLM backend because the official z.ai/BigModel rate limits are annoying enough to be useless in practice, and the China-optimized gateway offers better latency.
Install
# try temporarily
pi -e ~/coding_agents/pi-opinionated-glm
# or install into the current project
pi install -l ~/coding_agents/pi-opinionated-glm
Set your API key before use:
export OPENCODE_API_KEY=...
What it changes
This package registers a dedicated glm provider that routes requests through OpenCode Zen:
- mirrors Pi's built-in
opencode-goGLM chat models at runtime instead of freezing a handwritten duplicate list here - filters that upstream catalog down to GLM models only, so the package surface stays honest
- seeds a fallback
glm-5.1entry when the local Pi build has not picked it up yet - relies on Pi's normal OpenAI-compatible transport against
https://opencode.ai/zen/go/v1
Registered provider
- Provider name:
glm - API key env var:
OPENCODE_API_KEY - Backend: OpenCode Go (China-optimized Zen gateway)
Usage
Use GLM through the dedicated provider, for example:
glm/glm-5.1glm/glm-5glm/glm-4.7
Scope
This package is intentionally narrow:
- it picks an opinionated backend for GLM access
- it does not masquerade as z.ai anymore
- it does not maintain a giant handwritten model registry when Pi already has most of the catalog upstream
- it only adds the small
glm-5.1fallback metadata needed until the local Pi build catches up