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

@wuxiangru/pi-vision-bridge

v1.0.2

Published

Give text-only models (DeepSeek, Llama, etc.) vision — describe_image tool + automatic image-to-text fallback, using any vision model configured in pi's model registry.

Readme

Pi Vision Bridge — Vision for Text-Only Models

Give text-only models (DeepSeek, Llama, Qwen, local Ollama models) the ability to see images — without switching models mid-task.

License Pi Zero Deps PRs Welcome

English | 中文


Your coding agent runs on a text-only model and executes the whole task. When it needs to understand an image — a page screenshot, an error message, a UI mockup — it delegates to a vision model, gets a text description back, and keeps going. The active model never changes.

Features

  • describe_image tool — the agent calls it at any point during a task: pass an image path and an optional question, get a text description back. Works with any vision model pi can talk to.
  • Automatic image-to-text fallback — paste or attach an image while your model has no vision; it is described before reaching the model, so the conversation keeps working with no API errors.
  • Automatic model discovery + fallback — finds a vision-capable model in your pi registry; if a candidate fails, it transparently tries the next one.
  • Dual API support — OpenAI-compatible endpoints (/chat/completions) and Google Generative AI (generateContent) out of the box.
  • Proxy-aware — honors the standard HTTPS_PROXY / HTTP_PROXY / PI_VISION_PROXY environment variables via a zero-dependency CONNECT tunnel.
  • Zero runtime dependencies — no npm packages, no binary downloads.

How it works

Your agent (text-only, e.g. DeepSeek)
    │  executing a long task
    │  ── needs to see an image ──▶ calls describe_image(path, question)
    │                                    │
    │                                    ▼
    │                        vision model (Gemini / Qwen-VL / GLM / ...)
    │                                    │
    │  ◀── gets text description ────────┘
    │  continues the task, model never switched

Installation

pi install npm:@wuxiangru/pi-vision-bridge

Or install from git:

pi install git:github.com/wuxiangru915/pi-vision-bridge

Or try it without installing:

pi -e git:github.com/wuxiangru915/pi-vision-bridge

Note: pi extensions run with full system access. Review the source before installing.

Configuration

The vision model is resolved from pi's model registry (~/.pi/agent/models.json), so any provider pi can authenticate with works out of the box.

Option A: Automatic discovery (default)

With no explicit config, the extension picks the first available model that accepts images, has configured auth, and scores best on common chat formats — preferring your current provider, then the top candidates with automatic fallback on failure.

Option B: Explicit configuration (recommended)

Pin a specific provider/model with environment variables:

export PI_VISION_PROVIDER=google
export PI_VISION_MODEL=gemini-3-flash-preview

Both must be set; this takes priority over auto-discovery. The provider and model must be defined in ~/.pi/agent/models.json with "input": ["text", "image"]:

{
  "providers": {
    "google": {
      "baseUrl": "https://generativelanguage.googleapis.com/v1beta",
      "api": "google-generative-ai",
      "apiKey": "$GEMINI_API_KEY",
      "models": [
        { "id": "gemini-3-flash-preview", "input": ["text", "image"], "contextWindow": 1000000 }
      ]
    }
  }
}

Supported vision models

Any model pi can authenticate and call:

| Provider | Example models | API format | |----------|---------------|------------| | Google Gemini | gemini-3-flash-preview, gemini-2.5-pro | google-generative-ai | | Alibaba Qwen | qwen-vl-max, qwen2.5-vl | OpenAI-compatible | | Zhipu GLM | glm-4v, glm-4v-plus | OpenAI-compatible | | OpenAI | gpt-4o-mini, gpt-4o | OpenAI-compatible | | Local | Ollama vision models (llama3.2-vision) | OpenAI-compatible |

Proxy (optional)

If your vision model API requires a proxy, set the standard variables (the extension also honors PI_VISION_PROXY):

export HTTPS_PROXY=http://your-proxy:port

Usage

  • Agent-driven — when a task involves images, the agent calls describe_image on its own. You can direct it: "Screenshot the page and check whether the design matches the requirements."
  • User-driven — paste or attach an image directly in the chat. If your active model is text-only, it is described automatically.

Requirements

  • pi v0.83+ (uses ctx.modelRegistry.getApiKeyAndHeaders)
  • A vision-capable model in ~/.pi/agent/models.json (or set PI_VISION_PROVIDER / PI_VISION_MODEL)
  • Network access to your vision model's API

License

MIT