@tejasa97/pi-cline-free-provider

Pi provider for Cline's z-ai gateway models via the Cline CLI (GLM 5.3 Flash, GLM 5.2, and the full z-ai catalog — free tier today, may change)

Packages

Package details

extension

Install @tejasa97/pi-cline-free-provider from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@tejasa97/pi-cline-free-provider
Package
@tejasa97/pi-cline-free-provider
Version
0.2.0
Published
Sep 2, 2026
Downloads
267/mo · 33/wk
Author
tejasa97
License
MIT
Types
extension
Size
39.4 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

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

README

@tejasa97/pi-cline-free-provider

⚠️ Superseded — this package has been renamed to @tejasa97/pi-cline-provider (full Cline catalog, provider id cline). Install that instead.

Pi provider for Cline's z-ai/* gateway models — GLM 5.3 Flash, GLM 5.2, and the rest of the z-ai catalog that your Cline account can access — through the same Cline API the CLI uses.

Model availability and pricing follow your Cline plan: some models (currently GLM 5.3 Flash and friends) sit on Cline's free tier today, but that's Cline's call and can change at any time. This package doesn't hardcode "free" — it exposes whatever z-ai/* models Cline offers your account, discovered dynamically at runtime.

This complements pi-clinepass-provider, which exposes paid ClinePass cline-pass/* models.

Install

pi install npm:@tejasa97/pi-cline-free-provider

Or from git:

pi install git:github.com/tejasa97/pi-cline-free-provider

Local clone:

pi install /absolute/path/to/pi-cline-free-provider

After install, add your preferred model to enabledModels in ~/.pi/agent/settings.json if you use that whitelist:

"clinefree/z-ai/glm-5.3-flash"

Usage

  1. Sign in with the Cline CLI: cline auth
  2. In Pi: /loginCline Free (optional if CLI auth is already present)
  3. Pick a model: /model clinefree/z-ai/glm-5.3-flash

One-liner:

pi --model clinefree/z-ai/glm-5.3-flash

Auth

The provider reuses credentials from, in order:

  • CLINE_API_KEY env var
  • Cline CLI ~/.cline/data/settings/providers.json (from cline auth)
  • Pi ~/.pi/agent/auth.json (clinefree or clinepass OAuth)

If you already use pi-clinepass-provider, your existing Cline CLI login works here too.

Static fallback models

When /api/v1/models is unavailable, these are registered:

Model ID Name
z-ai/glm-5.3-flash GLM 5.3 Flash
z-ai/glm-5.2:free GLM 5.2
z-ai/glm-4.7-flash GLM 4.7 Flash

When authenticated, the extension dynamically discovers all z-ai/* models from Cline's API (excluding batch and alias entries) — so the list tracks whatever Cline currently offers rather than what used to be free.

Testing

npm test
npm run test:e2e   # requires pi + local install

Related