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

@zerodawn/pi-litellm-discovery

v0.1.2

Published

Pi extension that discovers models from a LiteLLM gateway and registers them as a provider.

Readme

@zerodawn/pi-litellm-discovery

Pi extension that fetches models from a LiteLLM gateway and registers them as a custom provider at startup.

Install

Pi package install:

pi install npm:@zerodawn/pi-litellm-discovery

Optional helper command install via npm:

npm install -g @zerodawn/pi-litellm-discovery

That exposes:

pi-litellm-devenv

Local development from this monorepo:

pi -e ./packages/litellm-discovery

Repo-local helper script:

./packages/litellm-discovery/bin/pi-litellm-devenv

Required environment

  • PI_LITELLM_DISCOVERY_BASE_URL: LiteLLM base URL, for example https://litellm.example.com/v1
  • one of:
    • PI_LITELLM_DISCOVERY_API_KEY
    • PI_LITELLM_DISCOVERY_API_KEY_CMD

Optional:

  • PI_LITELLM_DISCOVERY_PROVIDER: provider id shown in Pi, default litellm-discovery
  • PI_LITELLM_DISCOVERY_NAME: provider label shown in Pi, default LiteLLM Discovery

Example

Direct key:

export PI_LITELLM_DISCOVERY_BASE_URL='https://litellm.lan.kappen.io/v1'
export PI_LITELLM_DISCOVERY_API_KEY='...'
pi -e ./packages/litellm-discovery

Shell command for the key:

export PI_LITELLM_DISCOVERY_BASE_URL='https://litellm.lan.kappen.io/v1'
export PI_LITELLM_DISCOVERY_PROVIDER='litellm-devenv'
export PI_LITELLM_DISCOVERY_NAME='LiteLLM Devenv'
export PI_LITELLM_DISCOVERY_API_KEY_CMD='infisical run --log-level error --silent --project-config-dir=/data/private/devenv --env=prod --path=/devenv/litellm -- sh -c '\''printf %s "$LITELLM_MASTER_KEY"'\'''
pi -e ./packages/litellm-discovery

Helper script with the same defaults:

./packages/litellm-discovery/bin/pi-litellm-devenv

Installed helper command after npm install -g:

pi-litellm-devenv

Override the devenv repo path if needed:

DEVENV_REPO=/some/other/devenv pi-litellm-devenv

Alias

If you want this as your normal shortcut, add this once to your shell profile:

alias pi-dev='pi-litellm-devenv'

Then use:

pi-dev

Behavior

At startup the extension:

  1. fetches ${PI_LITELLM_DISCOVERY_BASE_URL}/models
  2. reads data[].id
  3. registers the result as an OpenAI-compatible Pi provider

If discovery fails, Pi continues to start and the extension prints a warning.

Notes

  • the discovered models are currently registered with reasoning: false
  • model metadata falls back to conservative defaults when LiteLLM does not expose context_window or max_tokens
  • reopen /model or restart/reload Pi after changing environment values