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-extension-wandb

v0.1.0

Published

pi coding agent extension that adds Weights & Biases Inference as a model provider.

Readme

pi-extension-wandb

A pi coding agent extension that adds Weights & Biases Inference as a model provider. Model list is discovered dynamically from W&B's OpenAI-compatible /v1/models endpoint, so new models show up without code changes.

Install

Get an API key from https://wandb.ai/authorize, then:

export WANDB_API_KEY=...               # required
export WANDB_PROJECT=team/project      # optional, recommended

pi install https://github.com/kirangadhave/pi-extension-wandb

Verify:

pi --list-models | grep wandb

Use

pi --provider wandb --model deepseek-ai/DeepSeek-V3.1 "hello"

Configuration

| Env var | Required | Notes | | --- | --- | --- | | WANDB_API_KEY | yes | From https://wandb.ai/authorize. If unset, the provider is silently skipped (no wandb/* models appear in --list-models). | | WANDB_PROJECT | no* | Sent as the OpenAI-Project header. Format: team/project. If you belong to multiple W&B teams, set this explicitly — otherwise W&B picks a default team for attribution, which can land usage on the wrong team. Single-team users can safely omit. | | WANDB_DEBUG | no | 1 enables stderr logging from the extension (fetch errors, cache hits, etc.). | | WANDB_NO_CACHE | no | 1 bypasses the model-list cache and fetches fresh on every pi startup. |

How it works

On every pi startup the extension:

  1. Reads ~/.cache/pi-extension-wandb/models.json if it's fresh (< 1 hour old).
  2. Otherwise fetches https://api.inference.wandb.ai/v1/models (5s timeout) and writes the result to the cache.
  3. Registers each returned model under the wandb provider with api: "openai-completions".

If the fetch fails and there is no usable cache, the provider is not registered — pi --list-models will not show wandb models, and pi falls back to its other configured providers cleanly.

Known limitations

  • Context windows are guesses. W&B's /v1/models doesn't expose limits. The extension hardcodes known windows for a handful of popular models (KNOWN_CONTEXT_WINDOWS in index.ts); everything else gets a default of 128K. PRs to extend the map are welcome.
  • Reasoning detection is heuristic. Substring match against the model id (REASONING_MODEL_PATTERNS). Edit the list for new families.
  • No cost tracking. All models report zero cost. W&B publishes per-token pricing — PRs to encode it are welcome.
  • No provider-specific compat flags. Some reasoning models (Qwen3 thinking, gpt-oss, DeepSeek-R1) may need provider-specific quirks for thinking mode. If you hit a problem, open an issue with the model id and the exact failure.

Contributing

PRs welcome. The only file you typically need to touch is index.ts:

  • KNOWN_CONTEXT_WINDOWS — add accurate context sizes for new models.
  • REASONING_MODEL_PATTERNS — add model family substrings that support reasoning/thinking.

For editor type-checking, after cloning:

pnpm install
pnpm check

pi loads index.ts directly at runtime (no build step).

License

MIT — see LICENSE.