npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-zro-provider

v1.2.2

Published

Zro provider extension for pi - GLM-5.2, Kimi K3 & DeepSeek V4 Flash through the Zro inference endpoint

Readme

✨ pi-zro-provider

3+ models through Zro

GLM-5.2, Kimi K3, and DeepSeek V4 Flash — run through the Zro inference endpoint with pi.

pi extension license


Features

  • 3+ AI Models — GLM-5.2 (default), Kimi K3, and DeepSeek V4 Flash, straight from Zro's production catalog
  • Native reasoning effort — every model ships its published piLevel → level-id map (glm-5.2: off/high/max, kimi-k3: low/high/max, deepseek-v4-flash-0731: off/low/high/max), so /thinking high etc. maps exactly to what the Zro proxy expects
  • OpenAI-compatible API at https://zro.moonmath.ai/v1
  • Official catalog sync from Zro's /api/cli/models endpoint — same one zro models uses
  • Zro login reuse — if you've run zro login, the extension picks up ~/.config/zro/credentials.json automatically (no duplicated keys)
  • Footer status widget — session spend/requests and account plan / available spend / usage packs / 30-day activity at a glance

Available Models

| Model | Type | Context | Max Tokens | Input Cost | Output Cost | |-------|------|---------|------------|------------|-------------| | DeepSeek V4 Flash | Text | 1.0M | 384K | $0.14 | $0.28 | | GLM-5.2 | Text | 524K | 64K | $1.10 | $4.00 | | Kimi K3 | Text + Image | 1.0M | 131K | $2.50 | $12.00 | Costs are per million tokens. Billing is metered by your Zro plan and usage packs — see zro.moonmath.ai for pricing.

Installation

Option 1: Using pi install (Recommended)

Install from npm:

pi install npm:pi-zro-provider

Or directly from GitHub:

pi install https://github.com/monotykamary/pi-zro-provider

Then make sure you're logged in (or set a key) and run pi:

# Recommended: reuse your zro CLI login
zro login

# Or set as environment variable
export ZRO_API_KEY=your-api-key-here

pi

Get your API key from zro.moonmath.ai.

Option 2: Manual Clone

  1. Clone this repository:

    git clone https://github.com/monotykamary/pi-zro-provider.git
    cd pi-zro-provider
  2. Make sure you have a Zro credential (any of the Authentication options).

  3. Run pi with the extension:

    pi -e /path/to/pi-zro-provider

Usage

After loading the extension, select a model with:

/model zro glm-5.2

Or start pi directly with a Zro model:

pi --provider zro --model glm-5.2

Reasoning Effort

All Zro models are reasoning models. Control thinking depth with /thinking or the CLI:

pi --provider zro --model glm-5.2 --thinking xhigh

The available levels are model-specific and come straight from Zro's catalog:

| Model | pi levels | Sent as reasoning_effort | |-------|-----------|----------------------------| | glm-5.2 | off, high, max | none, high, max | | kimi-k3 | low, high, max | low, high, max | | deepseek-v4-flash-0731 | off, low, high, max | none, low, high, max |

Levels map one-to-one through thinkingLevelMap, so off sends Zro's none token instead of silently dropping the field.

Footer Status

A Neuralwatt-style status line sits below the editor. It appears after the session's first Zro turn completes (never before — no half-empty line on fresh sessions or other providers), refreshes its balance when the agent run fully settles, and makes no status-related API calls in sessions that never use Zro:

⚡ $0.42 · 7 req                   Pro ◆ $12.34 avail · $2.50 pack · 1.2k req/30d
└─ session spend+requests ─┘     └─ plan · available spend · packs · activity ──┘

The left side tracks what this session has done — request count, the spend Zro attaches to a response when it reports one, and elapsed time (raw token totals stay in pi's own footer, which can't show Zro cost since its catalog carries no pricing). The right side shows your plan name, total available spend, usage-pack balance, and 30-day request/token activity from Zro's /api/cli/status endpoint — the same account view zro status prints — plus a request-rate atom from response headers when present. The right side compresses progressively as the terminal narrows, and turns to a warning color at/below the lowBalanceUsd threshold.

Configuration

Edit ~/.pi/agent/extensions/zro.json or run /zro-status:

| Setting | Values | Default | |---------|--------|---------| | session | widget | statusbar | off | widget | | account | widget | statusbar | off | widget | | hideOnOtherProvider | true | false | true | | lowBalanceUsd | number | null | 10 |

Non-interactive toggles:

/zro-status session widget|statusbar|off
/zro-status account widget|statusbar|off
/zro-status hide true|false
/zro-status lowBalance 25|off
/zro-status refresh
/zro-status reset

Authentication

The Zro API key can be configured in multiple ways (resolved in this order):

  1. auth.json (recommended) — Add to ~/.pi/agent/auth.json:
    { "zro": { "type": "api_key", "key": "your-api-key" } }
    The key field supports literal values, env var names, and shell commands (prefix with !). See pi's auth file docs for details.
  2. Environment variable — Set ZRO_API_KEY
  3. zro login reuse — If you've already run zro login, the extension reads ~/.config/zro/credentials.json (XDG_CONFIG_HOME aware) automatically. No extra configuration needed.
  4. Runtime override — Use the --api-key CLI flag

Get your API key from zro.moonmath.ai.

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | ZRO_API_KEY | No | Your Zro API key (env var fallback) | | ZRO_ENDPOINT_ROOT | No | Override the endpoint root (default https://zro.moonmath.ai) | | ZRO_AUTH_URL | No | Override the authentication/API host (used by zro login; the extension resolves catalog/status from it too) |

Configuration

Add to your pi configuration for automatic loading:

{
  "extensions": [
    "/path/to/pi-zro-provider"
  ]
}

Catalog and Compat Settings

Model metadata matches the transform Zro's own pi adapter applies to its /api/cli/models catalog:

  • canonical ids, display names, context windows, and output caps
  • thinkingLevelMap built from each model's published reasoning levels (piLevel → provider level id)
  • compat.supportsReasoningEffort: true and maxTokensField: "max_tokens" (plain openai-completions, no custom thinkingFormat)
  • supportsDeveloperRole: false
  • all text-only inputs

patch.json is reserved only for a verified provider regression and is currently empty.

Patch Overrides

patch.json is applied on top of models.json only for verified endpoint corrections. It is currently empty because every live field comes from Zro's canonical model catalog.

Updating Models

Run the update script to fetch the latest models from the Zro catalog:

node scripts/update-models.js        # uses zro login credentials
# or
ZRO_API_KEY=your-api-key node scripts/update-models.js

This will:

  1. Fetch models from https://zro.moonmath.ai/api/cli/models
  2. Regenerate models.json as pure metadata from the live catalog
  3. Apply overrides from patch.json only when building the README
  4. Remove custom models now available upstream from custom-models.json
  5. Reconcile delisted models through the 14-day deprecated-models.json grace layer
  6. Update models.json and the README model table

License

MIT