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-fast-mode

v0.1.1

Published

Persistent fast-mode toggle for pi that injects service_tier for configured provider/model pairs.

Readme

pi-fast-mode

npm version npm downloads license

pi-fast-mode is a pi extension/package that toggles fast mode for selected models by injecting service_tier into provider requests.

It follows the same packaging approach as pi-hodor:

  • normal pi package structure
  • bundled default config
  • optional global config bootstrap command
  • project/global/bundled config resolution
  • persistent per-session and per-branch on/off state

What it does

When fast mode is enabled and the current provider/model matches a configured target, the extension patches the outgoing provider payload to include:

{
  "service_tier": "priority"
}

This is useful when you want a lightweight toggle in pi without changing your provider or model definitions.

Features

  • /fast toggle command
  • /fast on|off|status|reload
  • Ctrl+Shift+F keyboard shortcut
  • --fast CLI flag for starting a session with fast mode enabled
  • supports custom provider names and custom model ids
  • supports custom serviceTier values per target
  • remembers the last on/off state when the session is resumed
  • restores the saved state when navigating branches with /tree
  • persists the latest on/off state across newly created sessions
  • shows status in the footer while fast mode is active
  • supports project-local, global, legacy-global, and bundled config files

Requirements

  • pi with extension support
  • Node.js 20+

Installation

Install from npm

pi install npm:pi-fast-mode

Install from git

pi install git:github.com/vurihuang/pi-fast-mode

Install from a local path

pi install /absolute/path/to/pi-fast-mode

Restart pi after installation so the extension is loaded.

Quick start

1. Bootstrap the global config

/pi-fast-mode:setup

This creates:

~/.pi/agent/extensions/pi-fast-mode/config.json

if it does not already exist.

2. Edit the config

Example:

{
  "targets": [
    {
      "provider": "openai-codex",
      "model": "gpt-5.4",
      "serviceTier": "priority"
    },
    {
      "provider": "my-proxy",
      "model": "gpt-5-4",
      "serviceTier": "priority"
    }
  ]
}

3. Toggle fast mode

/fast

Usage

Slash command

/fast

Explicit control

/fast on
/fast off
/fast status
/fast reload

Keyboard shortcut

Ctrl+Shift+F

CLI flag

pi --fast

--fast makes the current session start with fast mode enabled, regardless of the previously saved state.

Configuration

Config is resolved in this order:

  1. ./.pi-fast-mode.json
  2. ./.pi/pi-fast-mode.json
  3. ~/.pi/agent/extensions/pi-fast-mode/config.json
  4. legacy fallback: ~/.pi/agent/extensions/fast-mode.json
  5. bundled config.json

That means:

  • project config overrides global config
  • global config overrides the bundled defaults
  • the legacy single-file path still works as a compatibility fallback

Config schema

{
  "targets": [
    {
      "provider": "openai-codex",
      "model": "gpt-5.4",
      "serviceTier": "priority"
    }
  ]
}

Fields

| Field | Type | Description | | --- | --- | --- | | targets | FastTarget[] | Allowlist of provider/model pairs that should receive service_tier. | | targets[].provider | string | Exact pi provider name. Official and unofficial provider names are both supported. | | targets[].model | string | Exact pi model id. Official and unofficial model ids are both supported. | | targets[].serviceTier | string | Value written as service_tier. Defaults to priority when omitted. |

Matching behavior

Matching is done with exact string equality against:

  • ctx.model.provider
  • ctx.model.id

So this works with:

  • built-in providers and models
  • providers added via models.json
  • providers registered through other extensions
  • unofficial model names

Example configs

Default Codex target

{
  "targets": [
    {
      "provider": "openai-codex",
      "model": "gpt-5.4"
    }
  ]
}

Multiple custom providers

{
  "targets": [
    {
      "provider": "my-proxy",
      "model": "gpt-5.4",
      "serviceTier": "priority"
    },
    {
      "provider": "openrouter",
      "model": "openai/gpt-5.4",
      "serviceTier": "priority"
    },
    {
      "provider": "local-gateway",
      "model": "gpt-5.4",
      "serviceTier": "priority"
    }
  ]
}

Persistence behavior

Fast mode state is stored in two places:

  • session custom entries for branch-aware restoration
  • ~/.pi/agent/extensions/pi-fast-mode/state.json for cross-session persistence

That means:

  • if you turn fast mode on, quit pi, and resume the same session, it comes back on
  • if you turn it off and resume the same session, it stays off
  • if you switch branches with /tree, the extension restores the saved state for that branch
  • if you create a brand-new pi session later, it inherits the last persisted on/off state

Branch-local session state still wins when it exists. The global state file is used as the fallback for newly created sessions or branches that do not yet have their own saved fast-mode entry.

Notes and limitations

  • The extension only patches request payloads when fast mode is enabled.
  • It only patches requests for configured provider/model pairs.
  • It does not validate whether a provider actually supports service_tier.
  • If a provider ignores unknown fields, the request will continue normally.
  • /fast reload reloads config from disk without restarting pi.

Development

Install dependencies:

npm install

Run type-check:

npm run check

Run release verification:

npm run release:check

Preview the package contents:

npm run pack:check

Publishing checklist

Before publishing:

  1. update version in package.json
  2. verify repository, homepage, and bugs URLs
  3. run npm run release:check
  4. confirm the tarball only contains intended files
  5. publish with npm if desired

Package structure

.
├── config.json
├── index.ts
├── LICENSE
├── README.md
├── package.json
├── package-lock.json
└── tsconfig.json