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

@mcowger/pi-plexus

v0.2.3

Published

Plexus AI provider extension package for pi

Readme

pi-plexus

A pi extension that adds Plexus as a provider, dynamically discovering models from your Plexus instance.

Requirements

  • pi 0.74.0 or later
  • A running Plexus instance with a valid API key

Installation

Via npm (recommended)

pi install npm:@mcowger/pi-plexus

Via git

pi install git:github.com/mcowger/pi-plexus

Configuration

Once installed, run the login command inside pi:

/plexus login

You will be prompted for:

  1. Base URL — the root URL of your Plexus instance, e.g. https://plexus.example.com (no /v1 suffix needed)
  2. API key — your Plexus API key
  3. Default model (optional) — the model ID to use by default, e.g. glm-5.1 (use the raw model name, not the plexus/ prefix)

Credentials are stored in ~/.pi/agent/auth.json (API key, managed by pi) and ~/.pi/agent/extensions/plexus/config.json (base URL and default model).

Environment variables

As an alternative to /plexus login, you can set environment variables before starting pi:

export PLEXUS_BASE_URL=https://plexus.example.com
export PLEXUS_API_KEY=sk-...

Commands

| Command | Description | |---|---| | /plexus login | Configure base URL and API key | | /plexus refresh | Re-fetch the model list from your Plexus instance and update the local cache |

How it works

On startup, the extension loads a cached model list from ~/.pi/agent/extensions/plexus/plexus-models-cache.json so models are available immediately. On each session start it attempts a live refresh from /v1/models to pick up any new or removed models.

Models are registered under the plexus provider and appear in /model alongside all other configured providers.

Provider-specific model fidelity via pi_provider / pi_model

Many models require provider-specific compatibility settings (e.g. DeepSeek needs system role instead of developer, Qwen uses a different thinking format, etc.). pi already knows these settings for built-in providers, but when models are proxied through Plexus, pi can't auto-detect them because the provider and base URL belong to Plexus, not the original provider.

To solve this, configure Plexus to expose pi_provider and pi_model in its /v1/models response. When these fields are set, the extension looks up the full model definition from pi's built-in MODELS registry and uses it for maximum fidelity — picking up the correct api, compat, thinkingLevelMap, reasoning, contextWindow, maxTokens, and input modalities, all sourced from pi's curated configuration rather than inferred from Plexus fields.

In your Plexus model configuration, enable the pi Provider and pi Model fields:

Plexus pi model configuration

For example, a DeepSeek V4 Flash entry configured with pi_provider: deepseek and pi_model: deepseek-v4-flash will automatically get the correct compat settings (including supportsDeveloperRole: false and thinkingFormat: deepseek), ensuring requests are formatted correctly for DeepSeek even though they're routed through Plexus.

If pi_provider / pi_model are not set for a model, the extension falls back to inferring settings from the Plexus API fields (preferred_api, supported_parameters, architecture, etc.) — which works fine for simpler models but won't include provider-specific compat overrides.

Troubleshooting

The extension writes a debug log to ~/.pi/agent/extensions/plexus/plexus.log. If models are missing or requests are failing, check that file first:

cat ~/.pi/agent/extensions/plexus/plexus.log