pi-clinepass-provider

ClinePass provider for pi — access GLM-5.3, Kimi K3, DeepSeek V4.1 Flash and more coding models through Cline's $9.99/mo subscription

Packages

Package details

extension

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

$ pi install npm:pi-clinepass-provider
Package
pi-clinepass-provider
Version
1.7.0
Published
Nov 2, 2026
Downloads
1,121/mo · 280/wk
Author
jellydn
License
MIT
Types
extension
Size
163.3 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

pi-clinepass-provider 🚀

npm npm downloads License CI

ClinePass provider for pi — 12 curated coding models (GLM-5.3, Kimi K3, DeepSeek V4.1 Flash, Muse Spark 1.3 Contributor, Qwen3.8 Max, and more) through Cline's $9.99/month subscription with 2-5x the usage compared to standard API rates.

ClinePass uses Cline's OpenAI-compatible Chat Completions API, so no custom streaming protocol is needed — pi's built-in openai-completions streaming handles SSE parsing, tool calls, and usage tracking.

Image from Gyazo

📦 Installation

As a pi extension (recommended)

pi install npm:pi-clinepass-provider
# or from git
pi install git:github.com/jellydn/pi-clinepass-provider
# or local path
pi install /path/to/pi-clinepass-provider

As an npm package

npm install pi-clinepass-provider
# or
pnpm add pi-clinepass-provider

Note: This package requires @earendil-works/pi-ai and @earendil-works/pi-coding-agent as peer dependencies. They are automatically available when installed as a pi extension; install them manually when using as a standalone npm dependency.

Pre-requirements

  • pi coding agent
  • A ClinePass subscription — $9.99/month

Features

  • Full streaming via Cline's OpenAI-compatible /api/v1/chat/completions endpoint — SSE parsing, tool calls, and usage tracking handled by pi's built-in openai-completions streaming
  • Per-model thinking level support — maps pi's 6 thinking levels (off / minimal / low / medium / high / xhigh) to provider-specific reasoning_effort values, with per-model capability matrices (see table below)
  • Per-token cost tracking against ClinePass reference pricing
  • WorkOS OAuth token refresh — reuses your existing Cline CLI login (cline auth); no separate API key needed
  • API key auto-discovery from CLINE_API_KEY env var, ~/.cline/data/settings/providers.json, or ~/.pi/agent/auth.json
  • Explicit model catalog — registers curated models without a startup catalog request; new models, retirements, and metadata changes require a package update
  • /login integration — automatic WorkOS OAuth detection or browser-assisted manual paste
  • Modular architecture — 8 focused source modules (env, auth, models, workos, oauth, error-handler, errors, utils) + entry point (index), all covered by per-module unit tests

Supported Models

Model Model ID Context Input Reasoning
GLM-5.3 cline-pass/glm-5.3 1M text low / high / xhigh (xhigh → max; always on)
GLM-5.3-Flash cline-pass/glm-5.3-flash 1M text + image low / high / xhigh (xhigh → max; always on)
Kimi K3 cline-pass/kimi-k3 1M text + image high (max; always on)
Kimi K3.1 Pro cline-pass/kimi-k3.1-pro 1M text + image off / low / medium / high / xhigh (xhigh → max)
Muse Spark 1.3 Contributor cline-pass/muse-spark-1.3-contributor 1M text + image minimal / low / medium / high / xhigh (always on)
DeepSeek V4 Pro cline-pass/deepseek-v4-pro 1M text off + high (high used for xhigh)
DeepSeek V4.1 Flash cline-pass/deepseek-v4.1-flash 1M text + image off + high (high used for xhigh)
DeepSeek V4.1 Flash 1017 cline-pass/deepseek-v4.1-flash-1017 1M text + image off + high (high used for xhigh)
MiMo V2.6 Flash cline-pass/mimo-v2.6-flash 1M text + image off / low / medium / high
MiMo V2.6 Pro cline-pass/mimo-v2.6-pro 262K text + image off / low / medium / high
MiniMax M3 cline-pass/minimax-m3 1M text + image off / low / medium / high
MiniMax M3.1 Flash cline-pass/minimax-m3.1-flash 1M text + image off / low / medium / high
Qwen3.7 Max cline-pass/qwen3.7-max 262K text off / low / medium / high
Qwen3.7 Plus cline-pass/qwen3.7-plus 1M text + image off / low / medium / high
Qwen3.8 Max cline-pass/qwen3.8-max 1M text + image low / medium / xhigh

Migration: This update removes four IDs immediately, in preparation for Cline's announced September 21, 2026 cutoff (12:00 AM PST, as quoted in #79). Update saved model selections and scripts: cline-pass/glm-5.2 → cline-pass/glm-5.3; cline-pass/kimi-k2.7-code and cline-pass/kimi-k2.6 → cline-pass/kimi-k3; cline-pass/deepseek-v4-flash → cline-pass/deepseek-v4.1-flash. There are no aliases. Remote catalogs cannot restore retired IDs. The November 2026 lineup refresh additionally replaces the MiMo pair: cline-pass/mimo-v2.5 → cline-pass/mimo-v2.6-flash and cline-pass/mimo-v2.5-pro → cline-pass/mimo-v2.6-pro (both removed from ClinePass).

Contributor data policy: Muse Spark is a hosted model, not open-weight. Meta's Contributor tier permits training on prompts and completions. Check Cline's applicable terms before sending private code or sensitive data; do not assume this tier has the Standard tier's no-training policy.

Reference prices are estimates, not bills or exact quota measurements. ClinePass is a flat subscription. Prices are bundled with this package and do not refresh at startup; they can lag Cline's current rates. The ClinePass reference table now lists DeepSeek V4.1 Flash ($0.30 input / $1.20 output / $0.006 cached read per million tokens at peak; off-peak is half), Muse Spark 1.3 Contributor ($0.10 / $0.20 / $0.002), and GLM-5.3-Flash ($0.15 / $0.50 / $0.03). A vendor's API price is not proof of the ClinePass reference price. Remote or null metadata never overrides the curated prices or token limits.

Image input is configured explicitly in the catalog, as shown in the table's Input column. It is not inferred from a live vendor catalog. Images are sent as base64 image_url content via pi's built-in openai-completions streaming, in the format described by the Cline API image documentation. The pass lineup feed supplies no modality metadata. The contributor to PR #100 reported that all five November 2026 additions accepted image_url content against the live gateway; accepting an image payload alone does not prove visual understanding.

Upstream capabilities do not by themselves verify the ClinePass route. Run CLINE_API_KEY=... npm run test:e2e with pi installed to check the live path: the image cases attach a known shape-count fixture to eight of the twelve configured image-capable models and require the correct visual answer. The image smoke loop does not cover Kimi K3.1 Pro, DeepSeek V4.1 Flash 1017, MiMo V2.6 Pro, or MiniMax M3.1 Flash; a passing run does not verify those image routes. MiMo-V2.5-Pro is not the multimodal MiMo-V2.5 variant.

Maintainers compare all curated IDs with the clinePass bucket of Cline's first-party lineup feed before release (npm run check:catalog, requires Bun). Cline's SDK uses this feed, but it is not an account-entitlement check or a complete metadata API. The generic /api/v1/models currently lists vendor IDs, not pass IDs. Vendor presence cannot grant pass access, and feed omissions require review rather than automatic retirement. See the release checklist.

Thinking levels: pi supports 6 levels — off, minimal, low, medium, high, xhigh. Each model declares which levels it supports, mapped to the provider's reasoning_effort parameter. Set the thinking level with pi's --thinking flag or /thinking command. A level marked as unsupported (not listed above) maps to null — no reasoning_effort is sent to the API, so the model runs with its default reasoning behavior.

Authentication

This extension supports two authentication methods, tried in order:

Option 1: Cline CLI Login (WorkOS OAuth — recommended)

If you already use the Cline CLI (npm i -g cline) and have authenticated with cline auth, this extension automatically reuses your login — no separate API key needed.

Run pi /login and select ClinePass. The extension detects your WorkOS OAuth credentials from ~/.cline/data/settings/providers.json and logs you in instantly. Short-lived access tokens (~1 hour) are refreshed automatically via Cline's server-side endpoint.

Option 2: Static API Key (manual)

  1. Subscribe to ClinePass at app.cline.bot, go to Settings → API Keys and click Generate API key. Copy it.
  2. Set the environment variable:
echo 'export CLINE_API_KEY="your_key_here"' >> ~/.zshrc
source ~/.zshrc

Alternatively, run pi /login and select ClinePass — if no Cline CLI login is detected, it opens the Cline dashboard and prompts you to paste a static API key.

The Cline CLI authenticates via WorkOS OAuth (browser login). The access token is a short-lived JWT (prefixed with workos:) that expires after ~1 hour. The refresh token is longer-lived.

This extension refreshes expired tokens by calling Cline's server-side endpoint:

POST https://api.cline.bot/api/v1/auth/refresh
{"granttype": "refresh_token", "refreshToken": "<your_refresh_token>"}

The response contains a new accessToken (with workos: prefix) and a rotated refreshToken. Both are persisted in pi's auth store for subsequent requests.

If the refresh token expires or is revoked (e.g., you re-login with cline auth), simply run pi /login again to re-import your fresh credentials.

Usage

# Non-interactive
pi --model clinepass/cline-pass/deepseek-v4.1-flash -p "Explain async/await in JavaScript"

# Interactive
pi --model clinepass/cline-pass/glm-5.3-flash

# List available models
pi --list-models clinepass

# Use in another project
cd my-project
pi --model clinepass/cline-pass/glm-5.3 --trust "Refactor the auth module"

Switch models in-session with /model clinepass/cline-pass/glm-5.3.

Thinking levels

Set the reasoning effort per model using pi's --thinking flag or the in-session /thinking command:

# Use high reasoning with DeepSeek V4 Pro
pi --model clinepass/cline-pass/deepseek-v4-pro --thinking high -p "Design a scalable microservice architecture"

# GLM-5.3 always reasons; pick low/high/max effort (xhigh → max)
pi --model clinepass/cline-pass/glm-5.3 --thinking xhigh -p "Solve this complex math proof"

# GLM-5.3-Flash: same always-on reasoning as GLM-5.3, much cheaper
pi --model clinepass/cline-pass/glm-5.3-flash --thinking xhigh -p "Refactor this monolith into services"

# Muse Spark 1.3 Contributor supports minimal through xhigh (always on)
pi --model clinepass/cline-pass/muse-spark-1.3-contributor --thinking medium -p "Write a React form component"

# Disable reasoning for a quick code gen task
pi --model clinepass/cline-pass/deepseek-v4.1-flash --thinking off -p "Write a React form component"

Each model's supported thinking levels are listed in the Supported Models table above. Unsupported levels are not sent to the API — the model runs with its default reasoning behavior.

Run tests

npm test

Pre-commit

This project uses prek to enforce code quality. To install hooks:

prek install

Notes

  • Pricing: ClinePass is a flat $9.99/month subscription. Per-token costs in the model table are reference values for usage tracking only.
  • Context windows: estimates from ClinePass docs — verify against Cline's /models endpoint.
  • Custom API base: set CLINE_API_BASE env var to override the endpoint (default: https://api.cline.bot).

Resources

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📋 Changelog

See CHANGELOG.md for release history.

Author

👤 Huynh Duc Dung

Show your support

Give a ⭐️ if this project helped you!