@linioi/pi-fast-mode

A pi extension that adds a protocol-aware /fast command with status indicator and priority service tier injection.

Package details

extension

Install @linioi/pi-fast-mode from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@linioi/pi-fast-mode
Package
@linioi/pi-fast-mode
Version
0.1.0
Published
Apr 17, 2026
Downloads
78/mo · 9/wk
Author
linioi
License
MIT
Types
extension
Size
13.6 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@linioi/pi-fast-mode

npm version License: MIT

A pi extension that adds a protocol-aware /fast command with status indicator. It persists a local enabled flag in Pi's agent dir (fast-mode.json) and patches provider requests for supported targets:

  • openai-responsesservice_tier: "priority"
  • openai-codex-responsesservice_tier: "priority"
  • anthropic-messages with claude-opus-4-6speed: "fast" plus anthropic-beta: fast-mode-2026-02-01

Install

# Via pi package manager
pi install npm:@linioi/pi-fast-mode

# Or from source
git clone https://github.com/RimuruW/pi-fast-mode.git
cd pi-fast-mode
pi install .

Use

/fast          # toggle on ↔ off
/fast on       # enable fast mode
/fast off      # disable fast mode
/fast status   # show current state and supported APIs

Status Indicator

State Footer Meaning
active ⚡ fast fast mode on, current model/API supports it
unsupported ⚡ n/a fast mode on, current model/API unsupported
off (hidden) fast mode off

How It Works

When fast mode is enabled and the current model is supported, the extension applies the provider-specific fast-path patch:

{ "service_tier": "priority" }

for OpenAI responses APIs, and

{ "speed": "fast" }

plus the anthropic-beta: fast-mode-2026-02-01 request header for Claude Opus 4.6 on anthropic-messages.

This keeps OpenAI support as-is while matching Claude Code's fast-mode shape for Anthropic. The flag is persisted across sessions.

Project Structure

├── index.js           # Extension entry point
├── src/
│   └── logic.js       # Pure command parsing & payload injection
├── tests/
│   └── logic.test.mjs # Unit tests
├── package.json
└── README.md

No build step — pi loads JavaScript extensions directly.

Development

npm test     # run tests
npm run check
npm run prepack  # runs check before publish

License

MIT