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-gemini-image-bridge

v0.6.0

Published

Pi extension: relay tool-result images to Gemini-family user attachments across Responses proxies.

Readme

Pi Gemini Image Bridge

v0.6.0 - Pi extension that relays tool-result images to Gemini-family models as user-message attachments across Responses proxies.

Purpose

Pi's read tool already produces native image blocks in toolResult messages, and that path works for Claude, GPT, and native Google Gemini. The remaining gap is the proxy boundary: a Responses proxy such as CLIProxyAPI translates top-level user input_image parts correctly but can drop images nested in function_call_output items. This extension closes exactly that gap and does nothing else.

The target setup uses @router-for-me/pi-cliproxyapi-provider alongside this extension. The CPA provider extension discovers models, registers the cliproxyapi-codex-responses API, and sends inference through CPA's Codex Responses endpoint. No models.json entry is required. This project only adapts image placement; it does not register CPA models, credentials, or endpoints.

Install

pi install npm:@router-for-me/pi-cliproxyapi-provider
pi install npm:pi-gemini-image-bridge

For a local checkout, add the package to Pi's settings.json:

{
  "packages": [
    {
      "source": "/path/to/pi-gemini-image-bridge",
      "extensions": ["+src/index.ts"]
    }
  ]
}

Requires Pi >= 0.84.1, Node.js >= 23.6.0, and a configured CPA provider extension. Use /login CLIProxyAPI (or /login cliproxyapi) in Pi to configure the CPA connection.

Behavior

Before each request, a request-scoped context handler runs for Gemini models that declare image input support on the allowlisted Responses APIs:

  • openai-responses
  • openai-codex-responses
  • cliproxyapi-codex-responses

Images from consecutive toolResult messages are moved, in order, into one transient user attachment message. Tool text, names, IDs, and error state remain intact. The session history and model turn count are unchanged; the relayed view exists only for the current request. Applying it twice produces the same result.

Everything else is Pi-native. Clipboard pastes, read execution, image normalization (size and downscaling), rewind, resume, and model switching all follow Pi's built-in behavior; this extension never rewrites user input.

Verify

npm test
npm run typecheck

For a manual check, ask a CPA-proxied Gemini model to read an image file and confirm the model describes its contents.

v0.6.0

  • Removed the clipboard path-to-attachment pipeline, self-contained [Image #N: filename] labels, transcript label compaction, rewind/model-switch rehydration, and the WASM adaptive encoding pipeline. Pi's native read image support replaces the whole input track; image size handling follows Pi's native normalization. The extension now only performs the Responses tool-image relay.

Limits

  • The relay is allowlisted and does not modify native Google Gemini or OpenAI Completions traffic. Unknown models or APIs are left untouched.
  • Image data itself is never re-encoded, resized, or budgeted; whatever Pi's native pipeline produced is what gets relayed.

See architecture/index.md for module contracts and data flow, and architecture/decisions.md for product decisions.

License

MIT