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

@ganziliang/zhizh-pi-model-setup

v0.2.0

Published

Interactive model setup extension for Pi and Zhizhengroup LLM Gateway

Readme

Zhizh Pi Model Setup

Pi extension for configuring the Zhizhengroup LLM Gateway without an existing model.

Install for team members

Install the published npm package:

pi install npm:@ganziliang/zhizh-pi-model-setup

Start Pi:

pi

Run the setup command inside Pi:

/model-setup

Obtain apiId and API Key

Before running /model-setup, open the following gateway page:

https://llm-gateway.zhizhengroup.com/admin-next/api-stats

Use the page to obtain your apiId and API Key. The apiId is available in the browser address bar after the page loads, for example:

https://llm-gateway.zhizhengroup.com/admin-next/api-stats?apiId=56b07442-eb3d-43af-8c23-c13686fabdd0

You can paste either the complete URL or only the value after apiId= into the setup wizard. Keep the API Key private and do not commit it to source control.

Setup steps

The wizard asks for the following values:

  1. apiId or the complete api-stats URL.
  2. The gateway API key.
  3. The default provider.
  4. The default model.

You can paste either the ID:

56b07442-eb3d-43af-8c23-c13686fabdd0

or the complete URL copied from the browser address bar:

https://llm-gateway.zhizhengroup.com/admin-next/api-stats?apiId=56b07442-eb3d-43af-8c23-c13686fabdd0

The extension queries the gateway, creates the available models, and updates the following local Pi files:

~/.pi/agent/models.json
~/.pi/agent/settings.json
~/.pi/agent/company-gateway.json

On Windows, ~/.pi/agent normally means:

C:\Users\<your-windows-user>\.pi\agent

The extension manages these providers:

company-gpt
company-anthropic

The generated company-gpt configuration marks GPT-5.6 models (gpt-5.6-luna, gpt-5.6-terra, and gpt-5.6-sol, including future suffix variants) as accepting both text and image input. This fallback is applied when the gateway stats response omits image metadata.

Preconfigured model tuning

Some gateway metadata lags behind the upstream providers. The extension corrects it while generating the configuration, so a fresh install is already tuned:

DeepSeek

DeepSeek retired the legacy names and now serves deepseek-v4-flash, deepseek-v4-flash-vision-exp, and deepseek-v4-pro with the DeepSeek-V4.1-Flash model. The official model name is deepseek-flash.

The gateway still reports the old contextWindow (128000), reasoning: false, and no image input for these models, and it does not list deepseek-flash at all. The extension therefore applies the official DeepSeek-V4.1-Flash specification to the whole family:

| Field | Value | | --- | --- | | contextWindow | 1048576 (official context length: 1M) | | maxTokens | 393216 (official maximum output: 384K) | | reasoning | true (thinking mode is the DeepSeek default) | | input | ["text", "image"] (V4.1-Flash is multimodal) |

deepseek-flash is added automatically right after deepseek-v4-flash, but only when the account already provides another DeepSeek model. The retired alias deepseek-v4-flash-vision-exp is skipped because it resolves to the exact same model.

Thinking level

The extension also sets the per-model thinking level in settings.json:

{
  "modelThinkingLevels": {
    "company-anthropic/deepseek-flash": "medium"
  }
}

Existing entries in modelThinkingLevels are preserved; only the keys listed above are added or corrected.

Because these defaults live in the extension, re-running /model-setup keeps the tuned values instead of overwriting them with stale gateway metadata.

After setup completes, run:

/reload

or restart Pi.

Update

Update the installed package when a new version is released:

pi update npm:@ganziliang/zhizh-pi-model-setup

Remove

pi remove npm:@ganziliang/zhizh-pi-model-setup

Removing the package does not automatically remove the generated providers from models.json. Edit or remove company-gpt and company-anthropic if they are no longer needed.

Local development

The local path installation is only for the package maintainer and is not needed by normal users:

pi install "C:/Users/ganziliang/Desktop/ai_work/pi_agent/company-model-setup"

Publish a new version

Maintainers can publish a new version from the package directory:

npm version patch
npm publish --access public