pi-zai-glm

Extra LLM providers for pi (Z.ai GLM).

Package details

extension

Install pi-zai-glm from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-zai-glm
Package
pi-zai-glm
Version
0.1.1
Published
Apr 7, 2026
Downloads
483/mo · 90/wk
Author
rossz
License
unknown
Types
extension
Size
4.3 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-extra-llm

A pi extension that registers extra LLM providers.

Providers

  • zai-glm — Z.ai GLM models via the Anthropic-compatible endpoint (https://api.z.ai/api/anthropic).
    • glm-5.1

Install

pi install npm:pi-extra-llm

To uninstall:

pi remove npm:pi-extra-llm

Configuration

Set your Z.ai API key in the environment:

export ZAI_GLM_API_KEY=sk-...

Then reload pi and pick glm-5.1 (provider zai-glm) from the model picker.

Notes

  • The base URL points at Z.ai's Anthropic-compatible endpoint, so the extension uses pi's anthropic-messages streaming API — no extra compat flags needed.
  • Pricing and context window values in extensions/zai_glm_provider.ts are placeholders; adjust them to match Z.ai's current spec if you want accurate cost tracking.